📄 basecdeptdao.java
字号:
package cn.hope.front.pojo.base;
import net.sf.hibernate.Hibernate;
import net.sf.hibernate.Session;
import cn.hope.front.pojo.dao.CDeptDAO;
import net.sf.hibernate.expression.Order;
/**
* This is an automatically generated DAO class which should not be edited.
*/
public abstract class BaseCDeptDAO extends cn.hope.front.pojo.dao._RootDAO {
// query name references
public static CDeptDAO instance;
/**
* Return a singleton of the DAO
*/
public static CDeptDAO getInstance () {
if (null == instance) instance = new CDeptDAO();
return instance;
}
public Class getReferenceClass () {
return cn.hope.front.pojo.CDept.class;
}
public Order getDefaultOrder () {
return null;
}
/**
* Cast the object as a cn.hope.front.pojo.CDept
*/
public cn.hope.front.pojo.CDept cast (Object object) {
return (cn.hope.front.pojo.CDept) object;
}
public cn.hope.front.pojo.CDept get(java.lang.Integer key)
throws net.sf.hibernate.HibernateException {
return (cn.hope.front.pojo.CDept) get(getReferenceClass(), key);
}
public cn.hope.front.pojo.CDept get(java.lang.Integer key, Session s)
throws net.sf.hibernate.HibernateException {
return (cn.hope.front.pojo.CDept) get(getReferenceClass(), key, s);
}
public cn.hope.front.pojo.CDept load(java.lang.Integer key)
throws net.sf.hibernate.HibernateException {
return (cn.hope.front.pojo.CDept) load(getReferenceClass(), key);
}
public cn.hope.front.pojo.CDept load(java.lang.Integer key, Session s)
throws net.sf.hibernate.HibernateException {
return (cn.hope.front.pojo.CDept) load(getReferenceClass(), key, s);
}
public cn.hope.front.pojo.CDept loadInitialize(java.lang.Integer key, Session s)
throws net.sf.hibernate.HibernateException {
cn.hope.front.pojo.CDept obj = load(key, s);
if (!Hibernate.isInitialized(obj)) {
Hibernate.initialize(obj);
}
return obj;
}
/**
* 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.)
* @param cDept a transient instance of a persistent class
* @return the class identifier
*/
public java.lang.Integer save(cn.hope.front.pojo.CDept cDept)
throws net.sf.hibernate.HibernateException {
return (java.lang.Integer) super.save(cDept);
}
/**
* 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.)
* Use the Session given.
* @param cDept a transient instance of a persistent class
* @param s the Session
* @return the class identifier
*/
public java.lang.Integer save(cn.hope.front.pojo.CDept cDept, Session s)
throws net.sf.hibernate.HibernateException {
return (java.lang.Integer) save((Object) cDept, s);
}
/**
* Either save() or update() the given instance, depending upon the value of its identifier property. By default
* the instance is always saved. This behaviour may be adjusted by specifying an unsaved-value attribute of the
* identifier property mapping.
* @param cDept a transient instance containing new or updated state
*/
public void saveOrUpdate(cn.hope.front.pojo.CDept cDept)
throws net.sf.hibernate.HibernateException {
saveOrUpdate((Object) cDept);
}
/**
* Either save() or update() the given instance, depending upon the value of its identifier property. By default the
* instance is always saved. This behaviour may be adjusted by specifying an unsaved-value attribute of the identifier
* property mapping.
* Use the Session given.
* @param cDept a transient instance containing new or updated state.
* @param s the Session.
*/
public void saveOrUpdate(cn.hope.front.pojo.CDept cDept, Session s)
throws net.sf.hibernate.HibernateException {
saveOrUpdate((Object) cDept, s);
}
/**
* 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 cDept a transient instance containing updated state
*/
public void update(cn.hope.front.pojo.CDept cDept)
throws net.sf.hibernate.HibernateException {
update((Object) cDept);
}
/**
* 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.
* Use the Session given.
* @param cDept a transient instance containing updated state
* @param the Session
*/
public void update(cn.hope.front.pojo.CDept cDept, Session s)
throws net.sf.hibernate.HibernateException {
update((Object) cDept, s);
}
/**
* 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.
* @param id the instance ID to be removed
*/
public void delete(java.lang.Integer id)
throws net.sf.hibernate.HibernateException {
delete((Object) load(id));
}
/**
* 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.
* Use the Session given.
* @param id the instance ID to be removed
* @param s the Session
*/
public void delete(java.lang.Integer id, Session s)
throws net.sf.hibernate.HibernateException {
delete((Object) load(id, s), s);
}
/**
* 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.
* @param cDept the instance to be removed
*/
public void delete(cn.hope.front.pojo.CDept cDept)
throws net.sf.hibernate.HibernateException {
delete((Object) cDept);
}
/**
* 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.
* Use the Session given.
* @param cDept the instance to be removed
* @param s the Session
*/
public void delete(cn.hope.front.pojo.CDept cDept, Session s)
throws net.sf.hibernate.HibernateException {
delete((Object) cDept, s);
}
/**
* 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.
* For example
* <ul>
* <li>where a database trigger alters the object state upon insert or update</li>
* <li>after executing direct SQL (eg. a mass update) in the same session</li>
* <li>after inserting a Blob or Clob</li>
* </ul>
*/
public void refresh (cn.hope.front.pojo.CDept cDept, Session s)
throws net.sf.hibernate.HibernateException {
refresh((Object) cDept, s);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -