本文整理汇总了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
// );
}
}
示例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;
}
}