Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Object relationship

Object relationship

2005-01-05       - By Bayarsaikhan VOLODYA (YAZ-ArGe)

 Back
Reply:     1     2     3     4     5  

firstly, thanks for reply.

i use POJOs, DAO, mysql as db, jakarta as server. nothing more.
i mean, without ejb.



-- --Original Message-- --
From: An interest list for Sun Java Center J2EE Pattern Catalog [mailto
:J2EEPATTERNS-INTEREST@(protected)]On Behalf Of jon
Sent: Wednesday, January 05, 2005 4:23 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: Object relationship


Depending on your usage, you may also want to consider a
TransferObjectAssembler to differentiate between cases when you need the
company with sub-companies or without.  Then apply the Mutiple Transfer
Object strategy so you have slightly different TransferObjects (ValueObjects)
for the two cases.  One could be a subclass of the other to make things a bit
more transparent.

--
Jonathan Petruk
J. Petruk Consulting Inc.
E-mail: jon@(protected)
http://www.petruk.net/


On Wed, 5 Jan 2005 14:13:43 -0000, Ramnish Kalsi wrote
> This would actually depend upon the usage. If the company object is not
> complete without members information, then yes, you would have to
> load the member information.
>
> Alternately, if you do not need the information about the members,
> you could either maintain a list of ID's of the organization
> (instead of whole objects) , that this company is member of.
>
> But, firstly, you should redefine your business model slightly -
> when you say "a company is member of other companies", what exactly
> do you mean. Is it an amalgamation of companies ?? If so, will the
> company object be accurate depiction of this umbrella business
> entity. ?
>
> think about these before you finalise your model.
>
> --ramnish.
>
> -- --Original Message-- --
> From: An interest list for Sun Java Center J2EE Pattern Catalog
> [mailto:J2EEPATTERNS-INTEREST@(protected)]On Behalf Of Bayarsaikhan
> VOLODYA (YAZ-ArGe)
> Sent: 05 January 2005 14:03
> To: J2EEPATTERNS-INTEREST@(protected)
> Subject: Object relationship
>
> Hi all,
>
> a company can be member of other companies.
> class company{
>   ArrayList membersOf;
> }
>
> when i load this company from database, do i have to load member companies
> too?
> if yes, i must load members of the members'. huh?
> if no, nullpointer issue !!!
>
> how do i handle that?
>
> thanks.
> Bayarsaikhan VOLODYA
>
> ===================================================================>
Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive:
> http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
> listserv@(protected)
>
> ********************************************************************** This
email and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. If you
have received this email in error please notify the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************
>
> ===================================================================>
Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive: http://archives.java.sun.com/archives/j2eepatterns-
interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)

===================================================================Companion
Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

===================================================================Companion
Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.