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


Java Component.getComponentClass方法代码示例

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

示例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;
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:20,代码来源:PojoInstantiator.java

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

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

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


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