本文整理匯總了Java中org.hibernate.mapping.PersistentClass.getEntityName方法的典型用法代碼示例。如果您正苦於以下問題:Java PersistentClass.getEntityName方法的具體用法?Java PersistentClass.getEntityName怎麽用?Java PersistentClass.getEntityName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.hibernate.mapping.PersistentClass
的用法示例。
在下文中一共展示了PersistentClass.getEntityName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: processIdPropertiesIfNotAlready
import org.hibernate.mapping.PersistentClass; //導入方法依賴的package包/類
private static void processIdPropertiesIfNotAlready(
Map<XClass, InheritanceState> inheritanceStatePerClass,
Mappings mappings,
PersistentClass persistentClass,
EntityBinder entityBinder,
PropertyHolder propertyHolder,
HashMap<String, IdGenerator> classGenerators,
InheritanceState.ElementsToProcess elementsToProcess,
boolean subclassAndSingleTableStrategy,
Set<String> idPropertiesIfIdClass) {
Set<String> missingIdProperties = new HashSet<String>( idPropertiesIfIdClass );
for ( PropertyData propertyAnnotatedElement : elementsToProcess.getElements() ) {
String propertyName = propertyAnnotatedElement.getPropertyName();
if ( !idPropertiesIfIdClass.contains( propertyName ) ) {
processElementAnnotations(
propertyHolder,
subclassAndSingleTableStrategy ?
Nullability.FORCED_NULL :
Nullability.NO_CONSTRAINT,
propertyAnnotatedElement, classGenerators, entityBinder,
false, false, false, mappings, inheritanceStatePerClass
);
}
else {
missingIdProperties.remove( propertyName );
}
}
if ( missingIdProperties.size() != 0 ) {
StringBuilder missings = new StringBuilder();
for ( String property : missingIdProperties ) {
missings.append( property ).append( ", " );
}
throw new AnnotationException(
"Unable to find properties ("
+ missings.substring( 0, missings.length() - 2 )
+ ") in entity annotated with @IdClass:" + persistentClass.getEntityName()
);
}
}
示例2: ClassPropertyHolder
import org.hibernate.mapping.PersistentClass; //導入方法依賴的package包/類
public ClassPropertyHolder(
PersistentClass persistentClass,
XClass entityXClass,
Map<String, Join> joins,
Mappings mappings,
Map<XClass, InheritanceState> inheritanceStatePerClass) {
super( persistentClass.getEntityName(), null, entityXClass, mappings );
this.persistentClass = persistentClass;
this.joins = joins;
this.inheritanceStatePerClass = inheritanceStatePerClass;
this.attributeConversionInfoMap = buildAttributeConversionInfoMap( entityXClass );
}
示例3: DynamicMapInstantiator
import org.hibernate.mapping.PersistentClass; //導入方法依賴的package包/類
public DynamicMapInstantiator(PersistentClass mappingInfo) {
this.entityName = mappingInfo.getEntityName();
isInstanceEntityNames.add( entityName );
if ( mappingInfo.hasSubclasses() ) {
Iterator itr = mappingInfo.getSubclassClosureIterator();
while ( itr.hasNext() ) {
final PersistentClass subclassInfo = ( PersistentClass ) itr.next();
isInstanceEntityNames.add( subclassInfo.getEntityName() );
}
}
}
示例4: addClass
import org.hibernate.mapping.PersistentClass; //導入方法依賴的package包/類
public void addClass(PersistentClass persistentClass) throws DuplicateMappingException {
Object old = classes.put( persistentClass.getEntityName(), persistentClass );
if ( old != null ) {
throw new DuplicateMappingException( "class/entity", persistentClass.getEntityName() );
}
}