Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.ibatis.dao.client.template
Class OjbBrokerDaoTemplate  view OjbBrokerDaoTemplate download OjbBrokerDaoTemplate.java

java.lang.Object
  extended bycom.ibatis.dao.client.template.DaoTemplate
      extended bycom.ibatis.dao.client.template.OjbBrokerDaoTemplate
All Implemented Interfaces:
com.ibatis.dao.client.Dao

public abstract class OjbBrokerDaoTemplate
extends DaoTemplate

A DaoTemplate for OJB broker implementations that provides a convenient method to access the broker.

This is the base class for OJB DAOs and provides the CRUD pattern necessary methods plus an additional method to retrieve all instances of a given class.


Field Summary
 
Fields inherited from class com.ibatis.dao.client.template.DaoTemplate
daoManager
 
Constructor Summary
OjbBrokerDaoTemplate(com.ibatis.dao.client.DaoManager daoManager)
          The DaoManager that manages this Dao instance will be passed in as the parameter to this constructor automatically upon instantiation.
 
Method Summary
 void create(java.lang.Object vo)
          Puts an instance/value object on the persistentence layer.
 void delete(java.lang.Object vo)
          Removes an instance/value object from the persistence layer.
protected  org.apache.ojb.broker.PersistenceBroker getPersistenceBroker()
          Gets the OJB persistence broker associated with the current DaoTransaction that this Dao is working under.
 java.lang.Object retrieveByPk(java.lang.Object vo)
          Retrieves an instance/value object, according to its primary key,
 java.util.Collection retrieveExtent(java.lang.Class clazz)
          Retrieves all instances of a given class, from the persistence layer.
 void update(java.lang.Object vo)
          Updates the instance/value object representation on the persistence layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OjbBrokerDaoTemplate

public OjbBrokerDaoTemplate(com.ibatis.dao.client.DaoManager daoManager)
The DaoManager that manages this Dao instance will be passed in as the parameter to this constructor automatically upon instantiation.

Method Detail

create

public final void create(java.lang.Object vo)
Puts an instance/value object on the persistentence layer.


retrieveByPk

public final java.lang.Object retrieveByPk(java.lang.Object vo)
Retrieves an instance/value object, according to its primary key,


update

public final void update(java.lang.Object vo)
Updates the instance/value object representation on the persistence layer.


delete

public final void delete(java.lang.Object vo)
Removes an instance/value object from the persistence layer.


retrieveExtent

public final java.util.Collection retrieveExtent(java.lang.Class clazz)
Retrieves all instances of a given class, from the persistence layer.


getPersistenceBroker

protected final org.apache.ojb.broker.PersistenceBroker getPersistenceBroker()
Gets the OJB persistence broker associated with the current DaoTransaction that this Dao is working under.