Feature Requests item #500114, was opened at 2002-01-06 03:29
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=402707&aid=500114&group_id=31602

Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Mathias Bogaert (pathoss)
>Assigned to: Vincent Harcq (vharcq)
Summary: Remote to Data util method

Initial Comment:
Hello,

What do you guys think about a utility method to 
convert a collection of remote objects to a 
collection of data objects. This is very usefull IMHO.

   <XDtEjbIntf:ifRemoteEjb>
   /**
    * Convert a collection of remote objects to a 
collection of data objects.
    */
   public static Collection toDataCollection
(Collection remoteObjects) throws RemoteException {
       if (remoteObjects != null) {
           if (remoteObjects.isEmpty()) return 
remoteObjects;

           Iterator i = remoteObjects.iterator();
           Collection dataObjects = new ArrayList();

           <XDtEjbDataObj:dataObjectClass/> 
dataObject = null;

           while (i.hasNext()) {
               <XDtEjbIntf:componentInterface 
type="remote"/> remoteObject = 
(<XDtEjbIntf:componentInterface type="remote"/>) 
i.next();
               dataObject = remoteObject.getData();
               dataObjects.add(dataObject);
           }

           return dataObjects;
       }
       return null;
   }
   </XDtEjbIntf:ifRemoteEjb>

Mathias


----------------------------------------------------------------------

>Comment By: Vincent Harcq (vharcq)
Date: 2002-01-25 10:26

Message:
Logged In: YES 
user_id=125677

I will include that while i am at the reviewing of data-
objects.
I also plan kind of lazy / eager instantiation of the data 
object depending of the nature of the link at the attribute 
level (aggregation/composition)
Some patience though I advance like a turtle...

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=402707&aid=500114&group_id=31602

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to