📄 _baserootdao.java
字号:
package domain.dao.basedao;
import java.io.Serializable;
import org.springframework.orm.hibernate.support.HibernateDaoSupport;
/** * This class has been automatically generated by Hibernate Synchronizer. * For more information or documentation, visit The Hibernate Synchronizer page * at http://www.binamics.com/hibernatesync or contact Joe Hudson at joe@binamics.com. */public abstract class _BaseRootDAO extends HibernateDaoSupport{
/**
* Return the name of the configuration file to be used with this DAO or null if default
*/
public String getConfigurationFileName () {
return null;
}
/**
* Return the specific Object class that will be used for class-specific
* implementation of this DAO.
* @return the reference Class
*/
protected abstract Class getReferenceClass();
/**
* Execute a query.
* @param query a query expressed in Hibernate's query language
* @return a distinct list of instances (or arrays of instances)
*/
public java.util.List find(String query) {
return getHibernateTemplate().find(query);
}
/**
* Obtain an instance of Query for a named query string defined in the mapping file.
* @param name the name of a query defined externally
* @return Query
*/
public java.util.List getNamedQuery(String name) {
return getHibernateTemplate().findByNamedQuery(name);
}
/**
* Obtain an instance of Query for a named query string defined in the mapping file.
* @param name the name of a query defined externally
* @return Query
*/
public java.util.List getNamedQuery(String queryName, Object value) {
return getHibernateTemplate().findByNamedQuery(queryName,value);
}
/**
* Obtain an instance of Query for a named query string defined in the mapping file.
* Use the parameters given.
* @param name the name of a query defined externally
* @param params the parameter array
* @return Query
*/
public java.util.List getNamedQuery(String queryName, Object[] values){
return getHibernateTemplate().findByNamedQuery(queryName,values);
}
/**
* Execute a query.
* @param query a query expressed in Hibernate's query language
* @return a distinct list of instances (or arrays of instances)
*/
public java.util.List find(String query, Object obj, net.sf.hibernate.type.Type type) {
return getHibernateTemplate().findByNamedQuery(query,obj,type);
}
/**
* Execute a query.
* @param query a query expressed in Hibernate's query language
* @return a distinct list of instances (or arrays of instances)
*/
public java.util.List find(String query, Object[] obj, net.sf.hibernate.type.Type[] type) {
return getHibernateTemplate().findByNamedQuery(query,obj,type);
}
/**
* Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found.
.
* @param query a query expressed in Hibernate's query language
* @return a distinct list of instances (or arrays of instances)
*/
public Object load(Class entityClass,Serializable id,net.sf.hibernate.LockMode lockMode){
return getHibernateTemplate().load(entityClass,id,lockMode);
}
/**
* Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found.
.
* @param query a query expressed in Hibernate's query language
* @return a distinct list of instances (or arrays of instances)
*/
public java.util.List loadAll(Class entityClass){
return getHibernateTemplate().loadAll(entityClass);
}
/**
* Used by the base DAO classes but here for your modification
* Load object matching the given key and return it.
*/
protected Object load(Class refClass,java.io.Serializable key) {
return getHibernateTemplate().load(refClass, key);
}
/**
* Used by the base DAO classes but here for your modification
* Persist the given transient instance, first assigning a generated identifier.
* (Or using the current value of the identifier property if the assigned generator is used.)
*/
protected Object save(final Object obj) {
getHibernateTemplate().save(obj);
return obj;
}
/**
* Used by the base DAO classes but here for your modification
* Either save() or update() the given instance, depending upon the value of its
* identifier property.
*/
public void saveOrUpdate(final Object obj) {
getHibernateTemplate().saveOrUpdate(obj);
}
/**
* Used by the base DAO classes but here for your modification
* Update the persistent state associated with the given identifier. An exception is thrown if there is a persistent
* instance with the same identifier in the current session.
* @param obj a transient instance containing updated state
*/
protected void update(final Object obj) {
getHibernateTemplate().update(obj);
}
/**
* Used by the base DAO classes but here for your modification
* Remove a persistent instance from the datastore. The argument may be an instance associated with the receiving
* Session or a transient instance with an identifier associated with existing persistent state.
*/
public void delete(final Object obj) {
getHibernateTemplate().delete(obj);
}
/**
* Used by the base DAO classes but here for your modification
* Re-read the state of the given instance from the underlying database. It is inadvisable to use this to implement
* long-running sessions that span many business tasks. This method is, however, useful in certain special circumstances.
*/
protected void refresh(Object obj) {
getHibernateTemplate().refresh(obj);
}
/**
* Used by the base DAO classes but here for your modification
* Re-read the state of the given instance from the underlying database. It is inadvisable to use this to implement
* long-running sessions that span many business tasks. This method is, however, useful in certain special circumstances.
*/
protected void refresh(final Object obj,net.sf.hibernate.LockMode lockMode) {
getHibernateTemplate().refresh(obj,lockMode);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -