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


Java Property.isBasicPropertyAccessor方法代码示例

本文整理汇总了Java中org.hibernate.mapping.Property.isBasicPropertyAccessor方法的典型用法代码示例。如果您正苦于以下问题:Java Property.isBasicPropertyAccessor方法的具体用法?Java Property.isBasicPropertyAccessor怎么用?Java Property.isBasicPropertyAccessor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hibernate.mapping.Property的用法示例。


在下文中一共展示了Property.isBasicPropertyAccessor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AbstractComponentTuplizer

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
protected AbstractComponentTuplizer(Component component) {
	propertySpan = component.getPropertySpan();
	getters = new Getter[propertySpan];
	setters = new Setter[propertySpan];

	Iterator iter = component.getPropertyIterator();
	boolean foundCustomAccessor=false;
	int i = 0;
	while ( iter.hasNext() ) {
		Property prop = ( Property ) iter.next();
		getters[i] = buildGetter( component, prop );
		setters[i] = buildSetter( component, prop );
		if ( !prop.isBasicPropertyAccessor() ) {
			foundCustomAccessor = true;
		}
		i++;
	}
	hasCustomAccessors = foundCustomAccessor;
	instantiator = buildInstantiator( component );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:AbstractComponentTuplizer.java

示例2: AbstractComponentTuplizer

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
protected AbstractComponentTuplizer(Component component) {
	propertySpan = component.getPropertySpan();
	getters = new Getter[propertySpan];
	setters = new Setter[propertySpan];

	Iterator iter = component.getPropertyIterator();
	boolean foundCustomAccessor=false;
	int i = 0;
	while ( iter.hasNext() ) {
		Property prop = ( Property ) iter.next();
		getters[i] = buildGetter( component, prop );
		setters[i] = buildSetter( component, prop );
		if ( !prop.isBasicPropertyAccessor() ) {
			foundCustomAccessor = true;
		}
		i++;
	}
	hasCustomAccessors = foundCustomAccessor;

	String[] getterNames = new String[propertySpan];
	String[] setterNames = new String[propertySpan];
	Class[] propTypes = new Class[propertySpan];
	for ( int j = 0; j < propertySpan; j++ ) {
		getterNames[j] = getters[j].getMethodName();
		setterNames[j] = setters[j].getMethodName();
		propTypes[j] = getters[j].getReturnType();
	}
	instantiator = buildInstantiator( component );
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:30,代码来源:AbstractComponentTuplizer.java

示例3: AbstractEntityTuplizer

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
/**
 * Constructs a new AbstractEntityTuplizer instance.
 *
 * @param entityMetamodel The "interpreted" information relating to the mapped entity.
 * @param mappingInfo The parsed "raw" mapping data relating to the given entity.
 */
public AbstractEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappingInfo) {
	this.entityMetamodel = entityMetamodel;

	if ( !entityMetamodel.getIdentifierProperty().isVirtual() ) {
		idGetter = buildPropertyGetter( mappingInfo.getIdentifierProperty(), mappingInfo );
		idSetter = buildPropertySetter( mappingInfo.getIdentifierProperty(), mappingInfo );
	}
	else {
		idGetter = null;
		idSetter = null;
	}

	propertySpan = entityMetamodel.getPropertySpan();

       getters = new Getter[propertySpan];
	setters = new Setter[propertySpan];

	Iterator iter = mappingInfo.getPropertyClosureIterator();
	boolean foundCustomAccessor=false;
	int i=0;
	while ( iter.hasNext() ) {
		//TODO: redesign how PropertyAccessors are acquired...
		Property property = (Property) iter.next();
		getters[i] = buildPropertyGetter(property, mappingInfo);
		setters[i] = buildPropertySetter(property, mappingInfo);
		if ( !property.isBasicPropertyAccessor() ) foundCustomAccessor = true;
		i++;
	}
	hasCustomAccessors = foundCustomAccessor;

       instantiator = buildInstantiator( mappingInfo );

	if ( entityMetamodel.isLazy() ) {
		proxyFactory = buildProxyFactory( mappingInfo, idGetter, idSetter );
		if (proxyFactory == null) {
			entityMetamodel.setLazy( false );
		}
	}
	else {
		proxyFactory = null;
	}
	
	Component mapper = mappingInfo.getIdentifierMapper();
	identifierMapperType = mapper==null ? null : (AbstractComponentType) mapper.getType();
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:52,代码来源:AbstractEntityTuplizer.java


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