  | 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
|
|
|
  | | | Inner classes as value objects | Inner classes as value objects 2004-12-21 - By Kingshuk Choudhury
Back If the value object is to be used only in this class then its a good design to have it as a inner class. But it should be used if the value object is a composite data type ( consisting of multiple individual value items).
Regrs, k.
Laxmish R Hegde wrote:
>This is to model a relationship which will be used only in that class >and is (potentially) not of much use outside this piece of code. > >Thanking you and Regards, >Laxmish Hegde > >-- --Original Message-- -- >From: An interest list for Sun Java Center J2EE Pattern Catalog >[mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of Ranjeeth kumar >Sent: Tuesday, December 21, 2004 6:39 PM >To: J2EEPATTERNS-INTEREST@(protected) >Subject: Re: Inner classes as value objects > >Laxmish- > Just wanted to know the functional requirement behind this >requirement to answer ur query > >-Ranjeeth > > >On Tue, 21 Dec 2004 12:19:10 +0530, Laxmish R Hegde ><laxmish.h@(protected)> wrote: > > >>Hi all, >>Though this question does not refer to any design pattern per-se, I >>would like to know your views on the same. >> >>I am being asked to have a value object as an Inner class in order >>implement a small piece of functionality. I would like to know the >>pluses and minuses of having to use the Inner class this way. >> >>Thanking you and Regards, >>Laxmish Hegde >> >>==================================================================== >>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) > > > > >-- >***************************** >Ranjeeth kumar, >SCEA >************************************* > >==================================================================== >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)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1"> <title></title> </head> <body text="#000000" bgcolor="#ffffff"> If the value object is to be used only in this class then its a good design to have it as a inner class. <br> But it should be used if the value object is a composite data type ( consisting of multiple individual value items). <br> <br> Regrs,<br> k.<br> <br> Laxmish R Hegde wrote:<br> <blockquote type="cite" cite="midF2A662AFFDFD854799CA5A8FC8C8BA6F1589F8@(protected)"> <pre wrap="">This is to model a relationship which will be used only in that class and is (potentially) not of much use outside this piece of code.
Thanking you and Regards, Laxmish Hegde
-- --Original Message-- -- From: An interest list for Sun Java Center J2EE Pattern Catalog ==================================================================== 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)
|
|
 |