[newbe]Transfer objects

Discussion in 'Java' started by polilop, Jan 9, 2007.

  1. polilop

    polilop Guest

    Is it possible to make Transfer object (as i found somwhere, known as:Value
    object's) with POJO's.
    If so, any tutorials on the web would be appriciated (been googl-ing but
    found only with ejb's).
    Thanks
     
    polilop, Jan 9, 2007
    #1
    1. Advertising

  2. polilop

    Alex Hunsley Guest

    polilop wrote:
    > Is it possible to make Transfer object (as i found somwhere, known as:Value
    > object's) with POJO's.


    Yes. Just write a java class with some member values that can be set (or
    specified at constructor time) and also get. Rather than writing
    getters, if the value object/transfer object is immutable (won't change
    after creation), it's worth considering making the member values public
    final and hence allowing direct access to them.

    > If so, any tutorials on the web would be appriciated (been googl-ing but
    > found only with ejb's).
     
    Alex Hunsley, Jan 9, 2007
    #2
    1. Advertising

  3. polilop

    polilop Guest

    Thanks for reply. Have you any web-s, tutorials like that involve database
    with TO-s (POJO's) ?
    "Alex Hunsley" <> wrote in message
    news:45a37afe$0$759$...
    > polilop wrote:
    >> Is it possible to make Transfer object (as i found somwhere, known
    >> as:Value object's) with POJO's.

    >
    > Yes. Just write a java class with some member values that can be set (or
    > specified at constructor time) and also get. Rather than writing getters,
    > if the value object/transfer object is immutable (won't change after
    > creation), it's worth considering making the member values public final
    > and hence allowing direct access to them.
    >
    >> If so, any tutorials on the web would be appriciated (been googl-ing but
    >> found only with ejb's).

    >
     
    polilop, Jan 9, 2007
    #3
  4. polilop

    Alex Hunsley Guest

    polilop wrote:
    > Thanks for reply. Have you any web-s, tutorials like that involve database
    > with TO-s (POJO's) ?


    One of the best places I know for this is Sun's own Core J2EE patterns site:

    http://java.sun.com/blueprints/corej2eepatterns/

    It's also available as a book, but the patterns are all there on the web
    page above. Example: click on the "Core J2EE Patterns Catalog" link,
    then click on "Transfer object" in the graphic.
    HTH,
    lex
     
    Alex Hunsley, Jan 9, 2007
    #4
    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. EyeOfRa

    vga newbe

    EyeOfRa, Jul 5, 2004, in forum: VHDL
    Replies:
    0
    Views:
    655
    EyeOfRa
    Jul 5, 2004
  2. MS News \(MS ILM\)

    Re: Newbe: Understanding DB results and and ASP.NET

    MS News \(MS ILM\), Aug 15, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    361
    Troy Stanley - CyberWarehouse.com
    Aug 19, 2003
  3. Replies:
    1
    Views:
    587
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Aug 29, 2006
  4. 7stud
    Replies:
    11
    Views:
    700
    Dennis Lee Bieber
    Mar 20, 2007
  5. Jim
    Replies:
    1
    Views:
    906
    Aaron Bertrand - MVP
    Jan 28, 2004
Loading...

Share This Page