You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Ilia Honsali <IH...@omnidata.co.ma> on 2003/06/16 12:45:36 UTC

[Newbie] persistence layer

Hi

When reading the beer4all example, I remark that the use of OJB is done in
the service layer.
My question is: 
Why there is no separated persistence layer that can be implemented by OJB
(or other)?
Can't we make, in OJB, an implementation of an interface like


public interface PersistenceService {

public Object getObjectById(int id);

public Collection getCollectionById(int id);

public Object getObjectByCriteria(Object criteria);

public Collection getCollectionByCriteria(Object criteria);

public Object getObjectForUpdate(Object criteria);

public void updateObject(Object o);

public void updateCollection(Collection o);

public void createObject(Object o);

}