当前位置: 首页>>代码示例>>Java>>正文


Java PersistentClass.getEntityName方法代码示例

本文整理汇总了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()
		);
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:41,代码来源:AnnotationBinder.java

示例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 );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:ClassPropertyHolder.java

示例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() );
		}
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:DynamicMapInstantiator.java

示例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() );
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:Configuration.java


注:本文中的org.hibernate.mapping.PersistentClass.getEntityName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。