• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PropertyAccessor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.hibernate.property.PropertyAccessor的典型用法代码示例。如果您正苦于以下问题:Java PropertyAccessor类的具体用法?Java PropertyAccessor怎么用?Java PropertyAccessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertyAccessor类属于org.hibernate.property包,在下文中一共展示了PropertyAccessor类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initialize

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private void initialize(String[] aliases) {
	PropertyAccessor propertyAccessor = new ChainedPropertyAccessor(
			new PropertyAccessor[] {
					PropertyAccessorFactory.getPropertyAccessor( resultClass, null ),
					PropertyAccessorFactory.getPropertyAccessor( "field" )
			}
	);
	this.aliases = new String[ aliases.length ];
	setters = new Setter[ aliases.length ];
	for ( int i = 0; i < aliases.length; i++ ) {
		String alias = aliases[ i ];
		if ( alias != null ) {
			this.aliases[ i ] = alias;
			setters[ i ] = propertyAccessor.getSetter( resultClass, alias );
		}
	}
	isInitialized = true;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:AliasToBeanResultTransformer.java


示例2: buildPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
	if ( mappedProperty.isBackRef() ) {
		return mappedProperty.getPropertyAccessor(null);
	}
	else {
		return PropertyAccessorFactory.getDynamicMapPropertyAccessor();
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:DynamicMapEntityTuplizer.java


示例3: getPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private PropertyAccessor getPropertyAccessor(AttributeBinding mappedProperty) throws MappingException {
	// TODO: Fix this then backrefs are working in new metamodel
	return PropertyAccessorFactory.getPropertyAccessor(
			mappedProperty.getContainer().getClassReference(),
			mappedProperty.getPropertyAccessorName()
	);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:PojoEntityTuplizer.java


示例4: PojoComponentTuplizer

import org.hibernate.property.PropertyAccessor; //导入依赖的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


示例5: getGetter

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private static Getter getGetter(Property mappingProperty) {
	if ( mappingProperty == null || !mappingProperty.getPersistentClass().hasPojoRepresentation() ) {
		return null;
	}

	PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( mappingProperty, EntityMode.POJO );
	return pa.getGetter( mappingProperty.getPersistentClass().getMappedClass(), mappingProperty.getName() );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:PropertyFactory.java


示例6: buildPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
	if ( mappedProperty.isBackRef() ) {
		return mappedProperty.getPropertyAccessor(null);
	}
	else {
		return PropertyAccessorFactory.getDom4jPropertyAccessor( 
				mappedProperty.getNodeName(), 
				mappedProperty.getType(),
				getEntityMetamodel().getSessionFactory()
			);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:13,代码来源:Dom4jEntityTuplizer.java


示例7: buildPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
/**
 * return accessors 
 * @param mappedProperty
 * @return
 */
private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
	if ( mappedProperty.isBackRef() ) {
		PropertyAccessor ac = mappedProperty.getPropertyAccessor(null);
		if(ac!=null) return ac;
	}
	return accessor;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:13,代码来源:AbstractEntityTuplizerImpl.java


示例8: initialize

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private void initialize(String[] newAlias) {

		PropertyAccessor propertyAccessor = new ChainedPropertyAccessor(
				new PropertyAccessor[] {
						PropertyAccessorFactory.getPropertyAccessor(
								resultClass, null),
						PropertyAccessorFactory.getPropertyAccessor("field") });
		this.aliases = new String[newAlias.length];
		setters = new Setter[newAlias.length];
		for (int i = 0; i < newAlias.length; i++) {
			String alias = newAlias[i];
			if (alias != null) {
				this.aliases[i] = alias;
				// Diferencia con AliasToBeanResultTransformer

				if (alias.indexOf('.') > 0) {
					// found nested
					setters[i] = new NestedSetter(resultClass, alias);
				} else {

					// -------------------------------------------
					setters[i] = propertyAccessor.getSetter(resultClass, alias);
					// Diferencia con AliasToBeanResultTransformer
				}
				// -------------------------------------------
			}
		}
		isInitialized = true;
	}
 
开发者ID:fpuna-cia,项目名称:karaku,代码行数:30,代码来源:KarakuAliasToBeanTransformer.java


示例9: IgnoringCaseAliasToBeanResultTransformer

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public IgnoringCaseAliasToBeanResultTransformer(final Class resultClass) {
	if (resultClass == null) {
		throw new IllegalArgumentException("resultClass cannot be null");
	}
	this.resultClass = resultClass;
	propertyAccessor = new ChainedPropertyAccessor(new PropertyAccessor[] {
			PropertyAccessorFactory.getPropertyAccessor(resultClass, null),
			PropertyAccessorFactory.getPropertyAccessor("field") });
	fields = this.resultClass.getDeclaredFields();
}
 
开发者ID:SmarterApp,项目名称:TechnologyReadinessTool,代码行数:12,代码来源:IgnoringCaseAliasToBeanResultTransformer.java


示例10: getPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
@Override
public PropertyAccessor getPropertyAccessor(Class clazz) {
	return new BackrefPropertyAccessor(collectionRole, entityName);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:Backref.java


示例11: getPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
@Override
public PropertyAccessor getPropertyAccessor(Class clazz) {
	return new IndexPropertyAccessor(collectionRole, entityName);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:IndexBackref.java


示例12: getPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
public PropertyAccessor getPropertyAccessor(Class clazz) throws MappingException {
	return PropertyAccessorFactory.getPropertyAccessor( clazz, getPropertyAccessorName() );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:Property.java


示例13: buildPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private PropertyAccessor buildPropertyAccessor(Property property) {
	return PropertyAccessorFactory.getDynamicMapPropertyAccessor();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:DynamicMapComponentTuplizer.java


示例14: getPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
public PropertyAccessor getPropertyAccessor(Class clazz) {
	return new BackrefPropertyAccessor(collectionRole, entityName);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:4,代码来源:Backref.java


示例15: getPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
public PropertyAccessor getPropertyAccessor(Class clazz) {
	return new IndexPropertyAccessor(collectionRole, entityName);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:4,代码来源:IndexBackref.java


示例16: AliasToBeanResultTransformer

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
public AliasToBeanResultTransformer(Class resultClass) {
	if(resultClass==null) throw new IllegalArgumentException("resultClass cannot be null");
	this.resultClass = resultClass;
	propertyAccessor = new ChainedPropertyAccessor(new PropertyAccessor[] { PropertyAccessorFactory.getPropertyAccessor(resultClass,null), PropertyAccessorFactory.getPropertyAccessor("field")}); 		
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:6,代码来源:AliasToBeanResultTransformer.java


示例17: buildPropertyAccessor

import org.hibernate.property.PropertyAccessor; //导入依赖的package包/类
private PropertyAccessor buildPropertyAccessor(Property property) {
	//TODO: currently we don't know a SessionFactory reference when building the Tuplizer
	//      THIS IS A BUG (embedded-xml=false on component)
	// TODO : fix this after HHH-1907 is complete
	return PropertyAccessorFactory.getDom4jPropertyAccessor( property.getNodeName(), property.getType(), null );
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:7,代码来源:Dom4jComponentTuplizer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ModelWither类代码示例发布时间:2022-05-22
下一篇:
Java VangavException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap