Can I declare arraylists in data transfer object

Can I use arraylists in data transfer objects

Yes, and don't double post:
http://forum.java.sun.com/thread.jsp?thread=540027&forum=425&message=2616354
Answers don't always come in three minutes. Be patient.

Similar Messages

  • Business Objects(BOs) & Data Transfer Objects(DTOs)-both needed ?

    In a J2EE system...
    I know that "Business Objects" (BOs) are basically value objects (VOs) ...lots of getters and setters and some business logic. These are basically to model nouns in the system. Eg Student BO.
    I know that "Data Transfer Objects" (DTOs) are value objects (VOs)....with getters and setters... with the purpose of avoiding multiple method calls...to avoid overhead...which effects performance. eg it's better to pass a Student DTO then say...pass the student ID and student name and student age etc etc.
    Main question : Should a system have both ? If yes, why do I need a StudentBO.java and then another StudentDTO.java....when they are so similar ?...when both are basically VOs ? Can't I just use BOs to serve as DTOs ?
    Thanks.

    Hi,
    I've started using BO's and DTO's since 3 months .With my experiece i understand we nned both of them.
    The BusinessObject represents the data client. It is the object that requires access to the data source to obtain and store data.
    DTO
    This represents a Transfer Object used as a data carrier. The DataAccessObject may use a Transfer Object to return data to the client. The DataAccessObject may also receive the data from the client in a Transfer Object to update the data in the data source.
    From this i want to tell you that We are not gonna do any operation on BO's but we do operations on DTO
    Ashwin

  • Data Transfer Objects

    Is it safe to assume that Data Transfer Objects should be populated by Business Objects that are local to entity beans or whatever is being used to populate them?

    jschell wrote:
    ttb999 wrote:
    jschell wrote:
    So if the point of DTOs is to reduce network traffic, why would you initially populate them using a remote object? That doesn't have anything to do with what I said.Well that was the jist of my question.Your statement has a historical perspective which probably doesn't mean much in current DTO usage.
    Originally RMI was promoted as a a 'method' interface. As such you would have had the equivalent of a DTO with setter/getter for each attribute. Each setter/getter would invoke a remote procedure call to the server.
    Thus a data object with 5 attributes would cause 5 network calls to 'populate' the attributes.
    That was vastly inefficient.
    Consequently the first DTO type (which was not called a DTO) was promoted as a way to avoid that.
    If you want you can look up "Remote Procedure Call" (RPC) which would have been the origin of where the 'method' idiom originated.And quite apart from performance, populating a local object from the remote prevents disruption of the local data in case the network connection is (temporarilly) lost.

  • Hierarchical data transfer objects confusing Flex compiler...

    I just posted this same query on FlexCoders... but then I
    thought this might be a better target group to ask, so here goes:
    We are working on a set of data transfer objects where we
    have matching server-side java classes and client-side AS classes.
    Some of these DTO contain lists of other DTOs. As an example:
    A.java:
    public class A {
    List<B> blist
    In A.as we have...
    class A {
    public var blist : ArrayCollection;
    And we have B.java and B.as
    Then we have a RemoteObject call to pull down a bunch of A
    objects....
    Here's the problem, Flex does not compile B.as at build-time.
    So if B.as has a compiler problem, you never know about it,
    except that the 'blist' in A never gets populated. If you break
    down the data transfer and debug it. You find that during
    RemoteObject call, the blist data comes "down the wire", but as an
    ArrayCollection generic Objects, they never get turned into
    instances of Bs...
    I am guessing that this is happening because at compile time,
    there is not direct reference to B in the clientside project. Our
    covering .mxml wants one or more A objects, and inside A the blist
    is an ArrayCollection. So the compiler doesn't see a reference to
    B..
    So anyone know how we can fairly seamlessly make sure B.as
    gets compiled at build time so we'd know of compiler issues with it
    rather than spending lots of time debugging mysterious null values?
    (This appears to happen whether the project is set to compile
    on the client-side or the server-side. We are using Flex and FDS
    2.0.1 and Java 1.5)

    up...

  • How can avoid mandatory fields in data transfer

    hai
    please respond me
    how can avoid mandatory fields in data transfer like bdc

    hi,
    u have to pass values for mandatory fields in bdc method, u have to prepare u r bdc data such a way that all the mandatory fields are filled, other wise it will give error

  • Simple Question - Data Transfer Object

    Hey gurus,
    I like the option in JBuilder to automatically create Data Transfer Objects and an Assembler for it. But what? I used to make the assembler a Session Bean, and JBuilder makes it a normal Java class with static methods. I know JBuilder always ships with the best solutions, but...
    what is the advantage of the static class here? And in my case, i have the session beans and the entity beans deployed on a different server, would that make a difference for the advantage?
    greets,
    Nick.

    Hey gurus,
    I like the option in JBuilder to automatically create
    Data Transfer Objects and an Assembler for it. But
    what? I used to make the assembler a Session Bean,
    and JBuilder makes it a normal Java class with static
    methods. I know JBuilder always ships with the best
    solutions, but...
    well....... not always
    :-)

  • Data Transfer Object Class

    HI, i'm new with the web dynpro,  so i been told to use java web dynpro  using the Data Transfer Object, with a conection to Oracle.
    anybody has information about the web dynpro using Data Transfer Object.
    thanks in advance!!

    Hi,
    Their are lot of articles on the same here, please search for java bean models. Will give some hints
    I guess what you are planning to do is
    DB--> EJB/POJO--
    > Webdynpro
    Regards
    Ayyapparaj

  • Is there a place in my CS6 that will show the key so I can have Mac do a data transfer?

    My college provided all design graduates with a Macbook with CS6 Illustrator, Photoshop, InDesign, Dreamweaver, Fireworks, Bridge, Extension manager, and Flash installed and registered with the key to Adobe. My laptop that they gave has gone bad and is being replaced this weekend by myself since my school won't fix it(per their contract they are required to so I plan to go after them for this but int he meantime) The school never provided us with the license key for this CS6, they did the install themselves, is there a place in my programs on my laptop that I can go to in order to get this key so I can have Mac do a data transfer?

    Thanks, thats  a good resource. However, it doesn't help in my situation, I didn't [urchase this or install it directly thru Adobe, as stated my college, College america(famous for their promotion that if you go to school with them and graduate you get a free laptop with all of CS6 included) this means they installed it as a mass install on all Design students laptops. They originally gave us CS5 then sent us a link to a site for upgrading to CS6, the email said this from the college;
    Great News Regarding the Upgrade to CS6:
    As it has been announced in your Design courses the free upgrade to CS6 is now available for all active Graphic Arts and Web Design students.
    To get the upgrade please follow these 3 simple steps:
    1-     Copy and paste this link to your web browser:  getmyisos.myvalcom.net
    2-     Select the download for your specific computer (Mac or HP)
    It will take a long time to download, make sure you reset your “sleep” timer on your computer so it does not doze off during the download process.  When it is complete…
    When downloading the upgrade it (I guess, just speculating here) had the license bult in because it was never displayed it just downloaded and
    i have used it ever since. I of course tried contacting the school for this but when you graduate from them, and are no longer a potential student they can suck up to sell you on their courses, they stop responding and being nice.
    Does anyone have any other ideas? Is there a spot in the programs where if I open preferences in my Mac book or if I open he programs I can click something that displays the license in my laptop?
    Thanks

  • Can we declare arrayList as variable ??

    Hi,
    Can we declare arrayList as variable ???
    Help me regarding this....
    Thanks in advance

    Plz can u show me with example....ArrayList al = new ArrayList().
    http://www.google.co.in/search?hl=en&safe=off&q=ArrayList+Java&btnG=Search&meta=

  • How can we find the obsolete data dictionary objects in ecc 6.0 version

    My Question is How can trace the obsolete data dictionary objects in ecc 6.0 version such that we could
    anticipate the obsolete objects before upgradation.
    Regards,
    Raghunadh Babu.

    Hi Raghunadh,
                        The data dictionary objects will be in the repository itself if activated.If the data dictionary objects was created by user and if it is not activated.In this scenarion the data dictionary object can be seen in object navigator.Please check the transaction SE80 and SE81.
    Hope your query resolves.
    Have a best day ahead.

  • User-Defined Data Type (Data Transfer Objects) is null

    hi
    i try to access a nested complex datatype over blazeds. i always see that the second level of the  complex datatye is NULL but the other data's like String are ok.
    here an example:
    as you can see TT1 has a member TT2, and a String
    TT2 has a member TT3 and a string
    and TT3 has just a string.
    in the ActionScript the TT2 referenz in TT1 is always NULL.
    Java Code
    Java code:
    package clientreportingserver;
    public class TT1 {
        public String getT1s() {
            return t1s;
        public void setT1s(String t1s) {
            this.t1s = t1s;
        String t1s;
        public TT2 getTt2() {
             return tt2;
        public void setTt2(TT2 tt2) {
             this.tt2 = tt2;
        TT2 tt2;
    =================================================
    package clientreportingserver;
    public class TT2 {
        public String getT2s() {
            return t2s;
        public void setT2s(String t2s) {
            this.t2s = t2s;
        String t2s;
        public TT3 getTt3() {
             return tt3;
        public void setTt3(TT3 tt3) {
             this.tt3 = tt3;
        TT3 tt3;
    =================================================
    package clientreportingserver;
    public class TT3 {
         public String getT3s() {
            return t3s;
        public void setT3s(String t3s) {
            this.t3s = t3s;
        String  t3s;
    ActionScript DataType
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingserver.TT1")]
    [Bindable]
    public class TT1
        public var t1s:String;
        public var t2:TT2
    ====================================================================
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingserver.TT2")]
    [Bindable]
    public class TT2
        public var t2s:String;
        public var t2:TT3
    ===================================================================
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingapi.TT3")]
    [Bindable]
    public class TT3
        public var t3s:String;
    here the output from blazeds. for me it looks perfect, all data are transmitted
    BlazeDs output
    [BlazeDS]Deserializing AMF/HTTP request
    Version: 3
      (Message #0 targetURI=null, responseURI=/5)
        (Array #0)
          [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
            source = null
            operation = "getTT"
            destination = "exposedServiceWrapper"
            clientId = "E57066B1-170E-503A-D4EC-004166E95FC3"
            body = (Array #1)
            timeToLive = 0
            headers = (Object #2)
              DSEndpoint = "channel-amf"
              DSId = "E570490A-C218-4A29-4229-8CD6F29222FC"
            timestamp = 0
            messageId = "5FDB47AD-9066-DD95-4CD4-0CE0D3F6C337"
    [BlazeDS]Adapter 'java-object' called 'null.getTT(java.util.Arrays$ArrayList (Collection size:0)
    [BlazeDS]Result: 'clientreportingserver.TT1
      t1s = TT 1 String
      tt2 = clientreportingserver.TT2
        t2s = TT 2 String
        tt3 = clientreportingserver.TT3
          t3s = TT 3 String
    [BlazeDS]Serializing AMF/HTTP response
    Version: 3
      (Message #0 targetURI=/5/onResult, responseURI=)
        (Externalizable Object #0 'DSK')
          (Typed Object #1 'clientreportingserver.TT1')
            t1s = "TT 1 String"
            tt2 = (Typed Object #2 'clientreportingserver.TT2')
              t2s = "TT 2 String"
              tt3 = (Typed Object #3 'clientreportingserver.TT3')
                t3s = "TT 3 String"
    1.262936445958E12
    (Byte Array #4, Length 16)
    (Byte Array #5, Length 16)
    (Byte Array #6, Length 16)
    the last Alert (accessing t2) got always a null pointer, the fist Alert works fine and print out the string i expected to see
    call in ActionScript
        public function loadTT():void {
           _policyService.getTT(loadTTHandle);
        private function loadTTHandle(content:TT1):void {
           Alert.show("" + content.t1s);
           Alert.show("" + content.t2.t2s);
    is it possible to access a nested complex type? i only could find simple examples.
    thanks for your help joe

    I found the problem
    in the flashlog.txt i found :ReferenceError: Error #1056: Cannot create property AFoo on [...]
    this let me to this blog http://blog.comtaste.com/java/  ==>
    Automating  ActionScript 3 classes generation from Java Beans in a LiveCycle Data Services context
    it was a naming problem.

  • Flex - Java Data transfer objects. How do you usually work ? (Brainstorming)

    Hi,
    I would like to explain you how I work and to know how you guys do.
    All this discussion is just an example of how I work. I really want to know how other coders usually work. This way, maybe I can improve my code.
    I would like to know how do you do when you want to retreive data into typed objects when these data contains reference to other typed objects.
    Here is how I always work :
    I want to retreive all my customers into a flex datagrid and to display all information.
    Here is my Customer table structure (just an example)
    id, name, refCompany, refLanguage, refCountry, refCustomerGroup
    refCompany, refLanguage, refCountry, refCustomerGroup are IDs that reference to other tables.
    To ensure to retreive all data into typed object, I make a Customer,Company, Language, Country, CustomerGroup, Flex and Java classes.
    I make a query that looks like : Select * from Customer
    My java code will looks like :
    List<Customer> customers = new ArrayList<Customer>;
    ResultSet rs = myConn.execSelect(query);
    while(rs.next)
         customers.add(new Customer(rs))
    return customers;
    In my Customer class, I have a constuctor that takes a resultSet
    My customer class contains variables (refCompany that is actually a Company object (not an id), refLanguage that is actually a Language object (not an id),... )
    Customer(ResultSet rs)
         this.name = rs.getString("name")
         this.refCompany = new Company.findById(rs.getInt("refCompany"))     //This function returns a Company object
         this.refLanguage = new Language.findById(rs.getInt("refLanguage"))     // This function returns a Language object
    Here is how I always do. I don't know if it is a good way because for each customer found in the database, I will make 4 queries (4 findById to find each object : company, language, country, customerGroup of the current customer).
    But this way is generic, I don't have to make a specific query that will retreive all objects in one time. I select all customers, and in the constructor I select all objects that I have the reference...
    The big problem with this way is when I retreive objects, I always retreive all referenced objects and I do not necessarily want it.
    What do you think about the way I work ? How you guys do ? what is the best practice ?

    up...

  • Can u have a spry data set Object array.....

    Ok this is what i need to do. I need a spry object array to
    be created with in a function.
    Just like this.....
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Hijax Demo - Notes 1</title>
    <script language="JavaScript" type="text/javascript"
    src="includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript">
    * @author nadeerak
    function test5(){
    funObjects = new Array();
    funObjectsObserver = new Array();
    funListList = new Array();
    x = new Array();
    x[0] = "First";
    x[1] = "Second";
    x[2] = "Third";
    x[3] = "Fourth";
    for(y in x)
    funObjects[x[y]] = new
    Spry.Data.XMLDataSet("notes"+y+".xml", "notes/note");
    funObjectsObserver[x[y]] = new Object;
    funListList[x[y]] = null;
    funObjects[x[y]].useCache = false;
    funObjects[x[y]].loadData();
    funObjectsObserver[x[y]].onDataChanged = function(dataSet,
    data)
    funListList[x[y]]=funObjects[x[y]].getData();
    alert(funListList[x[y]].length);
    funObjectsObserver[x[y]].onPreLoad = function(dataSet, data)
    alert("preload");
    funObjectsObserver[x[y]].onPostLoad = function(dataSet,
    data)
    funObjects[x[y]].addObserver(funObjectsObserver[x[y]]);
    </script>
    </head>
    <body>
    <input type="button" value="button" name="button"
    onclick="test5();">
    </body>
    </html>
    i have note0.xml to note6.xml
    once the button clicked i need all the alerts to give the
    length. But this dyanimically created objects does not load. Why?
    Can we do something like this in SPY? like creating a spry
    object array........... can we?
    The error im getting is after two alerts i get
    "funListList[]. is null or not an object " individually it works
    very well?
    why is this?
    To my knowladge the data is not loaded after the second....
    Hmmmm how come? im using seperate objects....
    PLS ALL SPRY LOVERS help me......

    Hi,
    Check this sample:
    http://labs.adobe.com/technologies/spry/samples/DataSetSample.html
    Check the source code to see how we build a data set from an
    array.
    Hope this helps,
    Donald Booth
    Adobe Spry Team

  • Can I use bluetooth for data transfer to/from iPhone?

    I was wondering why I cant get my iPhone Bluetooth feature to work/connect with a Razor phone...
    Can I not hook up, using Bluetooth, to another phone and recieve ringtones?
    Or am I not doing something right in the Bluetooth mode?
    Any help would be great!!!

    The iPhone's bluetooth is limited at the moment to bluetooth headsets and car kits
    Even if you would succeed in pairing it you cannot transfer any type of files from it to the other phone

  • Data Transfer Objects Design Pattern

    Hi All,
    Could anyone tell me more about this DTO design pattern, as such when one should prefer it.
    Second is this pattern transaction safe or one would have to implement the same manually. Any updates would prove benefecial to me.

    Hi
    I do not understand what you mean.
    A dto is just an object which you populate in one layer and use in another layer.
    you do not need any jndi look for DTO , instead you lookup for ejbs , datasources ,....
    for example you lookup for some CMP , search and find some CMPs , populate DTO with those CMP and send the DTO to front layer.
    if it is not the answer , can you explain more about your requirements(S)

Maybe you are looking for

  • Custom Swatch Panel

    Hello, I want to create a custom color swatch panel for Illustrator. But I cant figure out a way to add swatches to the panel and drag/drop them into file. Kindly guide me to an example or the steps required to build such a panel. I'm new to flex sdk

  • Help in this query

    How to do query for this: Table: Acct_To_Print Fields: SELECT * FROM Acct_To_Print where BILL_DATE='19-FEB-07' BILL_DATE ACCT_NO BP_PARTN_NUM 19-FEB-07 A500088 197 19-FEB-07 A306004 197 19-FEB-07 A570105 197 19-FEB-07 R500088 197 19-FEB-07 L306004 19

  • Device error: 400

    Hi: I have a 7290 blackberry and I have a serious problem. I was installing many aplications in my blackberry but when I installed the last aplication,It´s appear in the blackberry screen: DEVICE ERROR: 400. How I can to fix this problem? Thank you f

  • [Solved] Starcraft 2 crashe with wine bunblebee nvidia driver

    After the upgrade of yesterday (2013/05/12) my starcraft II (under wine) crashes. After a downgrade of the nvidia driver ( and linux kernel ) my SCII is running once again perfectly, so I guess there is something wrong between the new nvidia driver (

  • Text message distribution list

    How do I set up a text message distribution list on an iPhone 4S?