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();
}

Reply via email to