本文整理汇总了Java中org.hibernate.mapping.Component.getComponentClass方法的典型用法代码示例。如果您正苦于以下问题:Java Component.getComponentClass方法的具体用法?Java Component.getComponentClass怎么用?Java Component.getComponentClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hibernate.mapping.Component
的用法示例。
在下文中一共展示了Component.getComponentClass方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PojoInstantiator
import org.hibernate.mapping.Component; //导入方法依赖的package包/类
public PojoInstantiator(Component component, ReflectionOptimizer.InstantiationOptimizer optimizer) {
this.mappedClass = component.getComponentClass();
this.isAbstract = ReflectHelper.isAbstractClass( mappedClass );
this.optimizer = optimizer;
this.proxyInterface = null;
this.embeddedIdentifier = false;
try {
constructor = ReflectHelper.getDefaultConstructor(mappedClass);
}
catch ( PropertyNotFoundException pnfe ) {
LOG.noDefaultConstructor(mappedClass.getName());
constructor = null;
}
}
示例2: PojoInstantiator
import org.hibernate.mapping.Component; //导入方法依赖的package包/类
public PojoInstantiator(Component component, ReflectionOptimizer.InstantiationOptimizer optimizer) {
this.mappedClass = component.getComponentClass();
this.optimizer = optimizer;
this.proxyInterface = null;
this.embeddedIdentifier = false;
try {
constructor = ReflectHelper.getDefaultConstructor(mappedClass);
}
catch ( PropertyNotFoundException pnfe ) {
log.info(
"no default (no-argument) constructor for class: " +
mappedClass.getName() +
" (class must be instantiated by Interceptor)"
);
constructor = null;
}
}
示例3: PojoComponentTuplizer
import org.hibernate.mapping.Component; //导入方法依赖的package包/类
public PojoComponentTuplizer(Component component) {
super( component );
this.componentClass = component.getComponentClass();
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();
}
final String parentPropertyName = component.getParentProperty();
if ( parentPropertyName == null ) {
parentSetter = null;
parentGetter = null;
}
else {
PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( null );
parentSetter = pa.getSetter( componentClass, parentPropertyName );
parentGetter = pa.getGetter( componentClass, parentPropertyName );
}
if ( hasCustomAccessors || !Environment.useReflectionOptimizer() ) {
optimizer = null;
}
else {
// TODO: here is why we need to make bytecode provider global :(
// TODO : again, fix this after HHH-1907 is complete
optimizer = Environment.getBytecodeProvider().getReflectionOptimizer(
componentClass, getterNames, setterNames, propTypes
);
}
}
示例4: ProxiedInstantiator
import org.hibernate.mapping.Component; //导入方法依赖的package包/类
public ProxiedInstantiator(Component component) {
proxiedClass = component.getComponentClass();
if ( proxiedClass.isInterface() ) {
factory = Environment.getBytecodeProvider()
.getProxyFactoryFactory()
.buildBasicProxyFactory( null, new Class[] { proxiedClass } );
}
else {
factory = Environment.getBytecodeProvider()
.getProxyFactoryFactory()
.buildBasicProxyFactory( proxiedClass, null );
}
}
示例5: ProxyInstantiator
import org.hibernate.mapping.Component; //导入方法依赖的package包/类
/**
* Constructs a new {@code ProxyInstantiator} instance.
*
* @param component
* the hibernate component to build this instantiator for.
*/
@SuppressWarnings("unchecked")
public ProxyInstantiator(Component component) {
componentContract = component.getComponentClass();
}