Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > [newbe]Transfer objects

Reply
Thread Tools

[newbe]Transfer objects

 
 
polilop
Guest
Posts: n/a
 
      01-09-2007
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


 
Reply With Quote
 
 
 
 
Alex Hunsley
Guest
Posts: n/a
 
      01-09-2007
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).


 
Reply With Quote
 
 
 
 
polilop
Guest
Posts: n/a
 
      01-09-2007
Thanks for reply. Have you any web-s, tutorials like that involve database
with TO-s (POJO's) ?
"Alex Hunsley" <(E-Mail Removed)> wrote in message
news:45a37afe$0$759$(E-Mail Removed)...
> 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).

>



 
Reply With Quote
 
Alex Hunsley
Guest
Posts: n/a
 
      01-09-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
class objects, method objects, function objects 7stud Python 11 03-20-2007 06:05 PM
form objects into class objects =?Utf-8?B?c3RldmVuIHNjYWlmZQ==?= ASP .Net 1 07-06-2006 08:33 AM
Unable to serialize the session state. Please note that non-serializable objects or MarshalByRef objects are not permitted when session state mode is 'StateServer' or 'SQLServer'. Mike Larkin ASP .Net 1 05-23-2005 12:33 PM
Inheritance of objects within objects Simon Elliott C++ 2 12-10-2004 10:59 AM
objects of objects, vectors and sessions bigbinc Java 3 11-18-2003 09:26 AM



Advertisments