By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

Serialization of Object Graph (Inheriting ArrayList)

P: n/a
Hi to All, I am new to this newsgroup, so please bare with me.
Here is the deal:
I have the following Object Graph:
Icell (Interface)
Iline (Interface)
Itable (Interface)

Classes: Cell: implements Icell
Line: inherits Arraylist
Implements Iline
Table: inherits Arraylist
Implements Itable
And I want to serialize Class Table to a file. Cell will contain Object
types (Date, String, Decimal). Line will just implement the property
Item to find a given Cell in the ArrayList. And Table will enable the
methods Add, Remove, RemoveAt, Clear, TrimToSize & the property Count.

My question is: Should I do the following to serialize
<Serializable()> Class Cell ....
<Serializable()> Class Line ....
Class Table Implements Iserializable, IdeserializationCallback ....

OR

<Serializable()> Class Cell ....
Class Line Implements Iserializable, IdeserializationCallback ....
Class Table Implements Iserializable, IdeserializationCallback ....

OR something else ?

Please Help!!

Thank you.

Lucile.

Apr 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
hmm. I don't know about 2005, but in 2003, I gave up and made my own
serialization mechanism by defining an interface having

Save
Load
Version

methods

Each class serialized/deserialized in these methods and used the stored
version to limit new features on loading so that it could still load
previously saved things with older versions.

The built in stuff just seemed too much of a head ache. There is plenty to
read about with it. Jeffery Richter wrote three good papers on it. I just
came away with the impression that it was great to serialize over the
network and for things you will immediately deserialize, but very hokey
otherwise.

Good luck,

Shane
"Lucile" <lu**********@dexia-am.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi to All, I am new to this newsgroup, so please bare with me.
Here is the deal:
I have the following Object Graph:
Icell (Interface)
Iline (Interface)
Itable (Interface)

Classes: Cell: implements Icell
Line: inherits Arraylist
Implements Iline
Table: inherits Arraylist
Implements Itable
And I want to serialize Class Table to a file. Cell will contain Object
types (Date, String, Decimal). Line will just implement the property
Item to find a given Cell in the ArrayList. And Table will enable the
methods Add, Remove, RemoveAt, Clear, TrimToSize & the property Count.

My question is: Should I do the following to serialize
<Serializable()> Class Cell ....
<Serializable()> Class Line ....
Class Table Implements Iserializable, IdeserializationCallback ....

OR

<Serializable()> Class Cell ....
Class Line Implements Iserializable, IdeserializationCallback ....
Class Table Implements Iserializable, IdeserializationCallback ....

OR something else ?

Please Help!!

Thank you.

Lucile.

Apr 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.