@Override public String determineConcreteSubclassEntityName(Object entityInstance, SessionFactoryImplementor factory) { if ( entityInstance == null ) { return getEntityName(); } final Class concreteEntityClass = entityInstance.getClass(); if ( concreteEntityClass == getMappedClass() ) { return getEntityName(); } else { String entityName = getEntityMetamodel().findEntityNameByEntityClass( concreteEntityClass ); if ( entityName == null ) { throw new HibernateException( "Unable to resolve entity name from Class [" + concreteEntityClass.getName() + "]" + " expected instance/subclass of [" + getEntityName() + "]" ); } return entityName; } }
if ( !proxyInterface.isInterface() ) { throw new MappingException( "proxy must be either an interface, or the class itself: " + getEntityName() ); try { pf.postInstantiate( getEntityName(), mappedClass, proxyInterfaces, LOG.unableToCreateProxyFactory( getEntityName(), he ); pf = null;
/** * {@inheritDoc} */ public String determineConcreteSubclassEntityName(Object entityInstance, SessionFactoryImplementor factory) { final Class concreteEntityClass = entityInstance.getClass(); if ( concreteEntityClass == getMappedClass() ) { return getEntityName(); } else { String entityName = getEntityMetamodel().findEntityNameByEntityClass( concreteEntityClass ); if ( entityName == null ) { throw new HibernateException( "Unable to resolve entity name from Class [" + concreteEntityClass.getName() + "]" + " expected instance/subclass of [" + getEntityName() + "]" ); } return entityName; } }
/** * {@inheritDoc} */ public String determineConcreteSubclassEntityName(Object entityInstance, SessionFactoryImplementor factory) { final Class concreteEntityClass = entityInstance.getClass(); if ( concreteEntityClass == getMappedClass() ) { return getEntityName(); } else { String entityName = getEntityMetamodel().findEntityNameByEntityClass( concreteEntityClass ); if ( entityName == null ) { throw new HibernateException( "Unable to resolve entity name from Class [" + concreteEntityClass.getName() + "]" + " expected instance/subclass of [" + getEntityName() + "]" ); } return entityName; } }
/** * {@inheritDoc} */ @Override public void afterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session) { if ( isInstrumented() ) { Set lazyProps = lazyPropertiesAreUnfetched && getEntityMetamodel().hasLazyProperties() ? lazyPropertyNames : null; //TODO: if we support multiple fetch groups, we would need // to clone the set of lazy properties! FieldInterceptionHelper.injectFieldInterceptor( entity, getEntityName(), lazyProps, session ); } }
/** * {@inheritDoc} */ @Override public void afterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session) { if ( isInstrumented() ) { Set lazyProps = lazyPropertiesAreUnfetched && getEntityMetamodel().hasLazyProperties() ? lazyPropertyNames : null; //TODO: if we support multiple fetch groups, we would need // to clone the set of lazy properties! FieldInterceptionHelper.injectFieldInterceptor( entity, getEntityName(), lazyProps, session ); } }
if ( !proxyInterface.isInterface() ) { throw new MappingException( "proxy must be either an interface, or the class itself: " + getEntityName() ); try { pf.postInstantiate( getEntityName(), mappedClass, proxyInterfaces, LOG.unableToCreateProxyFactory(getEntityName(), he); pf = null;
if ( !proxyInterface.isInterface() ) { throw new MappingException( "proxy must be either an interface, or the class itself: " + getEntityName() ); try { pf.postInstantiate( getEntityName(), mappedClass, proxyInterfaces, LOG.unableToCreateProxyFactory(getEntityName(), he); pf = null;
if ( ! proxyInterface.isInterface() ) { throw new MappingException( "proxy must be either an interface, or the class itself: " + getEntityName() ); try { pf.postInstantiate( getEntityName(), mappedClass, proxyInterfaces, LOG.unableToCreateProxyFactory(getEntityName(), he); pf = null;
if ( ! proxyInterface.isInterface() ) { throw new MappingException( "proxy must be either an interface, or the class itself: " + getEntityName() ); try { pf.postInstantiate( getEntityName(), mappedClass, proxyInterfaces, LOG.unableToCreateProxyFactory(getEntityName(), he); pf = null;