Java 类org.hibernate.IdentifierLoadAccess 实例源码
项目:lams
文件:SessionImpl.java
protected final IdentifierLoadAccess getIdentifierLoadAccess() {
final IdentifierLoadAccessImpl identifierLoadAccess = new IdentifierLoadAccessImpl( entityPersister );
if ( this.lockOptions != null ) {
identifierLoadAccess.with( lockOptions );
}
return identifierLoadAccess;
}
项目:ldadmin
文件:GenericDaoHibernate.java
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public T get(PK id) {
Session sess = getSession();
IdentifierLoadAccess byId = sess.byId(persistentClass);
T entity = (T) byId.load(id);
if (entity == null) {
log.warn("Uh oh, '" + this.persistentClass + "' object with id '" + id + "' not found...");
throw new ObjectRetrievalFailureException(this.persistentClass, id);
}
return entity;
}
项目:ldadmin
文件:GenericDaoHibernate.java
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public boolean exists(PK id) {
Session sess = getSession();
IdentifierLoadAccess byId = sess.byId(persistentClass);
T entity = (T) byId.load(id);
return entity != null;
}
项目:ldadmin
文件:GenericDaoHibernate.java
/**
* {@inheritDoc}
*/
public void remove(PK id) {
Session sess = getSession();
IdentifierLoadAccess byId = sess.byId(persistentClass);
T entity = (T) byId.load(id);
sess.delete(entity);
}
项目:musicrecital
文件:GenericDaoHibernate.java
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public T get(PK id) {
Session sess = getSession();
IdentifierLoadAccess byId = sess.byId(persistentClass);
T entity = (T) byId.load(id);
if (entity == null) {
log.warn("Uh oh, '" + this.persistentClass + "' object with id '" + id + "' not found...");
throw new ObjectRetrievalFailureException(this.persistentClass, id);
}
return entity;
}
项目:musicrecital
文件:GenericDaoHibernate.java
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public boolean exists(PK id) {
Session sess = getSession();
IdentifierLoadAccess byId = sess.byId(persistentClass);
T entity = (T) byId.load(id);
return entity != null;
}
项目:musicrecital
文件:GenericDaoHibernate.java
/**
* {@inheritDoc}
*/
public void remove(PK id) {
Session sess = getSession();
IdentifierLoadAccess byId = sess.byId(persistentClass);
T entity = (T) byId.load(id);
sess.delete(entity);
}
项目:lams
文件:SessionDelegatorBaseImpl.java
@Override
public IdentifierLoadAccess byId(String entityName) {
return session.byId( entityName );
}
项目:lams
文件:SessionDelegatorBaseImpl.java
@Override
public IdentifierLoadAccess byId(Class entityClass) {
return session.byId( entityClass );
}
项目:hql-builder
文件:ServiceImpl.java
protected <P> IdentifierLoadAccess byId(Class<P> entityClass) {
return this.getSession().byId(entityClass);
}
项目:hql-builder
文件:ServiceImpl.java
protected <P> IdentifierLoadAccess byId(String entityName) {
return this.getSession().byId(entityName);
}