handy access to attributes of entity beans from session beans

Discussion in 'Java' started by Torsten Schmeissel, Apr 29, 2005.

  1. Hi all together,

    I am just through with the design of the structure of a data layer of a
    J2EE app. For example i got a partner that is a person that has a
    address. address has an attribute town. In my business logic I dont want
    place a call like this

    java.lang.String town=partnerLocal.getPerson().getAddress().getTown();

    a more convenient way to me would be something like

    java.lang.String town.partnerLocal.getTown();

    but the structure of my data layer doesnt have this. I could continue
    with that with many examples now...but is there perhaps a way to deal
    with that in general? I feel like writing a wrapper that wraps those
    long call to short ones but am not sure. Maybe, there is an pattern or
    something like that.

    Any help is highly appreciate.

    Have a nice weekend.

    -Torsten.
    Torsten Schmeissel, Apr 29, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kabal
    Replies:
    0
    Views:
    922
    Kabal
    Jul 22, 2003
  2. MP
    Replies:
    2
    Views:
    2,574
    John C. Bollinger
    Nov 11, 2003
  3. Tim

    Entity beans

    Tim, Jan 25, 2004, in forum: Java
    Replies:
    4
    Views:
    544
    Ashton
    Jan 26, 2004
  4. Tim

    Entity beans questions

    Tim, Jan 28, 2004, in forum: Java
    Replies:
    1
    Views:
    322
    Sudsy
    Jan 28, 2004
  5. markla
    Replies:
    1
    Views:
    531
    Steven Cheng
    Oct 6, 2008
Loading...

Share This Page