ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: Read Only Properties
Date Tue, 09 Jan 2007 06:51:14 GMT
Jeff,

Can we get this documented in the user guide? :)

Paul

Jeff Butler wrote:
> iBATIS can use private getters/setters as of iBATIS 2.2.  I think this 
> is better than the interface.
>  
> Jeff Butler
> 
> 
>  
> On 1/8/07, *Brett Knights* <brett@knightsofthenet.com 
> <mailto:brett@knightsofthenet.com>> wrote:
> 
>     Does anyone have a pattern for creating read only fields?
> 
>     While I am obviously not persisting the RO properties having to have
>     the
>     setters as public methods is bad design. Is there any downside(from an
>     iBatis POV) to exposing an interface as the business class and using a
>     concrete class for managing persistence (see below) ? Does it seem
>     pointless to worry about?
> 
>     interface modelObj{
>     A getA()
>     }
> 
>     class iBatisObj implements modelObj{
>     public setA(A a);
>     public A getA();
>     }
> 
> 

Mime
View raw message