1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
|
package stt.base;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import stt.dao.iface.BcnDAO;
import org.hibernate.criterion.Order;
/**
* This is an automatically generated DAO class which should not be edited.
*/
public abstract class BaseBcnDAO extends stt.dao._RootDAO {
public BaseBcnDAO () {}
public BaseBcnDAO (Session session) {
super(session);
}
// query name references
public static BcnDAO instance;
/**
* Return a singleton of the DAO
*/
public static BcnDAO getInstance () {
if (null == instance) instance = new stt.dao.BcnDAO();
return instance;
}
public Class getReferenceClass () {
return stt.Bcn.class;
}
public Order getDefaultOrder () {
return null;
}
/**
* Cast the object as a stt.Bcn
*/
public stt.Bcn cast (Object object) {
return (stt.Bcn) object;
}
public stt.Bcn get(stt.BcnPK key)
{
return (stt.Bcn) get(getReferenceClass(), key);
}
public stt.Bcn get(stt.BcnPK key, Session s)
{
return (stt.Bcn) get(getReferenceClass(), key, s);
}
public stt.Bcn load(stt.BcnPK key)
{
return (stt.Bcn) load(getReferenceClass(), key);
}
public stt.Bcn load(stt.BcnPK key, Session s)
{
return (stt.Bcn) load(getReferenceClass(), key, s);
}
public stt.Bcn loadInitialize(stt.BcnPK key, Session s)
{
stt.Bcn obj = load(key, s);
if (!Hibernate.isInitialized(obj)) {
Hibernate.initialize(obj);
}
return obj;
}
/* Generic methods */
/**
* Return all objects related to the implementation of this DAO with no filter.
*/
public java.util.List<stt.Bcn> findAll () {
return super.findAll();
}
/**
* Return all objects related to the implementation of this DAO with no filter.
*/
public java.util.List<stt.Bcn> findAll (Order defaultOrder) {
return super.findAll(defaultOrder);
}
/**
* Return all objects related to the implementation of this DAO with no filter.
* Use the session given.
* @param s the Session
*/
public java.util.List<stt.Bcn> findAll (Session s, Order defaultOrder) {
return super.findAll(s, defaultOrder);
}
/**
* 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 bcn a transient instance of a persistent class
* @return the class identifier
*/
public stt.BcnPK save(stt.Bcn bcn)
{
return (stt.BcnPK) super.save(bcn);
}
/**
* 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 bcn a transient instance of a persistent class
* @param s the Session
* @return the class identifier
*/
public stt.BcnPK save(stt.Bcn bcn, Session s)
{
return (stt.BcnPK) save((Object) bcn, 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 bcn a transient instance containing new or updated state
*/
public void saveOrUpdate(stt.Bcn bcn)
{
saveOrUpdate((Object) bcn);
}
/**
* 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 bcn a transient instance containing new or updated state.
* @param s the Session.
*/
public void saveOrUpdate(stt.Bcn bcn, Session s)
{
saveOrUpdate((Object) bcn, 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 bcn a transient instance containing updated state
*/
public void update(stt.Bcn bcn)
{
update((Object) bcn);
}
/**
* 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 bcn a transient instance containing updated state
* @param the Session
*/
public void update(stt.Bcn bcn, Session s)
{
update((Object) bcn, 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(stt.BcnPK id)
{
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(stt.BcnPK id, Session s)
{
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 bcn the instance to be removed
*/
public void delete(stt.Bcn bcn)
{
delete((Object) bcn);
}
/**
* 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 bcn the instance to be removed
* @param s the Session
*/
public void delete(stt.Bcn bcn, Session s)
{
delete((Object) bcn, 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 (stt.Bcn bcn, Session s)
{
refresh((Object) bcn, s);
} |