ash9696
02-07-2007, 12:08 AM
hi there,
I am working on a project where i have a lot of instances where i am trying to convert between two user types according to some custom logic.
I am wondering if i could use spring's type conversion utility, where i can then replace type conversion logic if needed.
I am mostly using prototype objects, so for example i would have to do something like
class supervisor
{}
class manager{}
and in the code
supervisor super = new supervisor(); // create instance from spring...
manager manage = super; // somehow convert it
its not very clear from reading the documentation if i can do this, and how this can be done in the code, although i can see how i can do this from configuration file
can someone post a small example on how this might be accomplished ?
Thanks
-ashish
I am working on a project where i have a lot of instances where i am trying to convert between two user types according to some custom logic.
I am wondering if i could use spring's type conversion utility, where i can then replace type conversion logic if needed.
I am mostly using prototype objects, so for example i would have to do something like
class supervisor
{}
class manager{}
and in the code
supervisor super = new supervisor(); // create instance from spring...
manager manage = super; // somehow convert it
its not very clear from reading the documentation if i can do this, and how this can be done in the code, although i can see how i can do this from configuration file
can someone post a small example on how this might be accomplished ?
Thanks
-ashish