當前位置: 首頁>>代碼示例>>Java>>正文


Java PersistentClass.getProxyInterface方法代碼示例

本文整理匯總了Java中org.hibernate.mapping.PersistentClass.getProxyInterface方法的典型用法代碼示例。如果您正苦於以下問題:Java PersistentClass.getProxyInterface方法的具體用法?Java PersistentClass.getProxyInterface怎麽用?Java PersistentClass.getProxyInterface使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.hibernate.mapping.PersistentClass的用法示例。


在下文中一共展示了PersistentClass.getProxyInterface方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PojoEntityTuplizer

import org.hibernate.mapping.PersistentClass; //導入方法依賴的package包/類
public PojoEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity) {
		super( entityMetamodel, mappedEntity );
		this.mappedClass = mappedEntity.getMappedClass();
		this.proxyInterface = mappedEntity.getProxyInterface();
		this.lifecycleImplementor = Lifecycle.class.isAssignableFrom( mappedClass );
		this.isInstrumented = entityMetamodel.isInstrumented();

		Iterator iter = mappedEntity.getPropertyClosureIterator();
		while ( iter.hasNext() ) {
			Property property = (Property) iter.next();
			if ( property.isLazy() ) {
				lazyPropertyNames.add( property.getName() );
			}
		}

		String[] getterNames = new String[propertySpan];
		String[] setterNames = new String[propertySpan];
		Class[] propTypes = new Class[propertySpan];
		for ( int i = 0; i < propertySpan; i++ ) {
			getterNames[i] = getters[i].getMethodName();
			setterNames[i] = setters[i].getMethodName();
			propTypes[i] = getters[i].getReturnType();
		}

		if ( hasCustomAccessors || !Environment.useReflectionOptimizer() ) {
			optimizer = null;
		}
		else {
			// todo : YUCK!!!
			optimizer = Environment.getBytecodeProvider().getReflectionOptimizer( mappedClass, getterNames, setterNames, propTypes );
//			optimizer = getFactory().getSettings().getBytecodeProvider().getReflectionOptimizer(
//					mappedClass, getterNames, setterNames, propTypes
//			);
		}

	}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:37,代碼來源:PojoEntityTuplizer.java

示例2: PojoInstantiator

import org.hibernate.mapping.PersistentClass; //導入方法依賴的package包/類
public PojoInstantiator(PersistentClass persistentClass, ReflectionOptimizer.InstantiationOptimizer optimizer) {
	this.mappedClass = persistentClass.getMappedClass();
	this.isAbstract = ReflectHelper.isAbstractClass( mappedClass );
	this.proxyInterface = persistentClass.getProxyInterface();
	this.embeddedIdentifier = persistentClass.hasEmbeddedIdentifier();
	this.optimizer = optimizer;

	try {
		constructor = ReflectHelper.getDefaultConstructor( mappedClass );
	}
	catch ( PropertyNotFoundException pnfe ) {
		LOG.noDefaultConstructor(mappedClass.getName());
		constructor = null;
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:16,代碼來源:PojoInstantiator.java


注:本文中的org.hibernate.mapping.PersistentClass.getProxyInterface方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。