當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。