private OuterJoinLoadable getOuterJoinLoadable(String entityName) throws MappingException { EntityPersister persister = factory.getEntityPersister(entityName); if ( !(persister instanceof OuterJoinLoadable) ) { throw new MappingException( "class persister is not OuterJoinLoadable: " + entityName ); } return ( OuterJoinLoadable ) persister; }
private OuterJoinLoadable getOuterJoinLoadable(String entityName) throws MappingException { EntityPersister persister = factory.getEntityPersister(entityName); if ( !(persister instanceof OuterJoinLoadable) ) { throw new MappingException( "class persister is not OuterJoinLoadable: " + entityName ); } return ( OuterJoinLoadable ) persister; }
public Object instantiate(String entityName, Serializable id) throws HibernateException { return instantiate( factory.getEntityPersister(entityName), id ); }
public Type getIdentifierType(String className) throws MappingException { return getEntityPersister(className).getIdentifierType(); } public String getIdentifierPropertyName(String className) throws MappingException {
private OuterJoinLoadable getOuterJoinLoadable(String entityName) throws MappingException { EntityPersister persister = factory.getEntityPersister(entityName); if ( !(persister instanceof OuterJoinLoadable) ) { throw new MappingException( "class persister is not OuterJoinLoadable: " + entityName ); } return ( OuterJoinLoadable ) persister; }
public Type getPropertyType(String className, String propertyName) throws MappingException { return getEntityPersister(className).getPropertyType(propertyName); }
public Type getIdentifierType(String className) throws MappingException { return getEntityPersister(className).getIdentifierType(); } public String getIdentifierPropertyName(String className) throws MappingException {
public Type getReferencedPropertyType(String className, String propertyName) throws MappingException { return getEntityPersister(className).getPropertyType(propertyName); }
public String getIdentifierPropertyName(String className) throws MappingException { return getEntityPersister(className).getIdentifierPropertyName(); }
public EntityPersister getEntityPersister(final String entityName, final Object object) { if (entityName==null) { return factory.getEntityPersister( guessEntityName(object) ); } else { return factory.getEntityPersister( entityName ).getSubclassEntityPersister( object, getFactory(), entityMode ); } }
public EntityPersister getEntityPersister(String entityName, Object object) throws HibernateException { errorIfClosed(); if ( entityName==null ) { return factory.getEntityPersister( guessEntityName( object ) ); } else { return factory.getEntityPersister( entityName ) .getSubclassEntityPersister( object, getFactory(), EntityMode.POJO ); } }
public void evict(Class persistentClass) throws HibernateException { EntityPersister p = getEntityPersister( persistentClass.getName() ); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + p.getEntityName() ); } p.getCache().clear(); } }
public void evict(Class persistentClass) throws HibernateException { EntityPersister p = getEntityPersister( persistentClass.getName() ); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + p.getEntityName() ); } p.getCache().clear(); } }
public void evictEntity(String entityName) throws HibernateException { EntityPersister p = getEntityPersister(entityName); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + p.getEntityName() ); } p.getCache().clear(); } }
public void evictEntity(String entityName) throws HibernateException { EntityPersister p = getEntityPersister(entityName); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + p.getEntityName() ); } p.getCache().clear(); } }
public void evict(Class persistentClass, Serializable id) throws HibernateException { EntityPersister p = getEntityPersister( persistentClass.getName() ); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + MessageHelper.infoString(p, id, this) ); } CacheKey cacheKey = new CacheKey( id, p.getIdentifierType(), p.getRootEntityName(), EntityMode.POJO, this ); p.getCache().remove( cacheKey ); } }
public void evict(Class persistentClass, Serializable id) throws HibernateException { EntityPersister p = getEntityPersister( persistentClass.getName() ); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + MessageHelper.infoString(p, id, this) ); } CacheKey cacheKey = new CacheKey( id, p.getIdentifierType(), p.getRootEntityName(), EntityMode.POJO, this ); p.getCache().remove( cacheKey ); } }
public void evictEntity(String entityName, Serializable id) throws HibernateException { EntityPersister p = getEntityPersister(entityName); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + MessageHelper.infoString(p, id, this) ); } CacheKey cacheKey = new CacheKey( id, p.getIdentifierType(), p.getRootEntityName(), EntityMode.POJO, this ); p.getCache().remove( cacheKey ); } }
public void evictEntity(String entityName, Serializable id) throws HibernateException { EntityPersister p = getEntityPersister(entityName); if ( p.hasCache() ) { if ( log.isDebugEnabled() ) { log.debug( "evicting second-level cache: " + MessageHelper.infoString(p, id, this) ); } CacheKey cacheKey = new CacheKey( id, p.getIdentifierType(), p.getRootEntityName(), EntityMode.POJO, this ); p.getCache().remove( cacheKey ); } }
/** * give the interceptor an opportunity to override the default instantiation */ public Object instantiate(EntityPersister persister, Serializable id) throws HibernateException { errorIfClosed(); checkTransactionSynchStatus(); Object result = interceptor.instantiate( persister.getEntityName(), entityMode, id ); if ( result == null ) { result = persister.instantiate( id, entityMode ); } return result; }