S
slightlykirix
Hi,
I am using the xmlencoder/decoder classes to save objects, some of
which do not have no-argument constructors. I understand that one could
use something like:
String[] prop = {"param1", "param2"};
MyEncoder.setPersistenceDelegate(MyClass.class
new DefaultPersistenceDelegate(prop);
My question is, what if one has a class like:
class A{
-----
B objB = new B(C c, D d);
-----
}
class B{
-----
E objE = new E(F f, G g);
-----
}
I need to save an object of A that contains an object of B that does
not have a default constructor and B in turn needs to store an object
of E which again does not have a default constructor. Assuming that all
attributes of all classes that need to be saved do have the required
setter and getter methods, I couldn't find a way to save all those
objects because I can set the persistence delegate for only one class.
Is it possible to save all the objects?
TIA.
--Jo
I am using the xmlencoder/decoder classes to save objects, some of
which do not have no-argument constructors. I understand that one could
use something like:
String[] prop = {"param1", "param2"};
MyEncoder.setPersistenceDelegate(MyClass.class
new DefaultPersistenceDelegate(prop);
My question is, what if one has a class like:
class A{
-----
B objB = new B(C c, D d);
-----
}
class B{
-----
E objE = new E(F f, G g);
-----
}
I need to save an object of A that contains an object of B that does
not have a default constructor and B in turn needs to store an object
of E which again does not have a default constructor. Assuming that all
attributes of all classes that need to be saved do have the required
setter and getter methods, I couldn't find a way to save all those
objects because I can set the persistence delegate for only one class.
Is it possible to save all the objects?
TIA.
--Jo