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


Java Property.getValue方法代码示例

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


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

示例1: addProperty

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
public void addProperty(Property prop, XClass declaringClass) {
	if ( prop.getValue() instanceof Component ) {
		//TODO handle quote and non quote table comparison
		String tableName = prop.getValue().getTable().getName();
		if ( getJoinsPerRealTableName().containsKey( tableName ) ) {
			final Join join = getJoinsPerRealTableName().get( tableName );
			addPropertyToJoin( prop, declaringClass, join );
		}
		else {
			addPropertyToPersistentClass( prop, declaringClass );
		}
	}
	else {
		addPropertyToPersistentClass( prop, declaringClass );
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:ClassPropertyHolder.java

示例2: getNestedInnerComponentNames

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
public List<String> getNestedInnerComponentNames(String parentClassname, String topLevelComponentName,
    String nestedComponentName, String innerComponentNamePrefix) {
    List<String> names = new ArrayList<String>();
    PersistentClass parent = configuration.getClassMapping(parentClassname);
    Property topLevelProperty = parent.getProperty(topLevelComponentName);
    Component topLevelComponent = (Component) topLevelProperty.getValue();
    Property nestedProperty = topLevelComponent.getProperty(nestedComponentName);
    Set nestedSet = (Set) nestedProperty.getValue();
    Component nestedComponent = (Component) nestedSet.getElement();
    Iterator<?> propertyIter = nestedComponent.getPropertyIterator();
    while (propertyIter.hasNext()) {
        Property prop = (Property) propertyIter.next();
        if (prop.getName().startsWith(innerComponentNamePrefix)) {
            names.add(prop.getName());
        }
    }
    return names;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:19,代码来源:HibernateConfigTypesInformationResolver.java

示例3: internalInitSubclassPropertyAliasesMap

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private void internalInitSubclassPropertyAliasesMap(String path, Iterator propertyIterator) {
	while ( propertyIterator.hasNext() ) {

		Property prop = ( Property ) propertyIterator.next();
		String propname = path == null ? prop.getName() : path + "." + prop.getName();
		if ( prop.isComposite() ) {
			Component component = ( Component ) prop.getValue();
			Iterator compProps = component.getPropertyIterator();
			internalInitSubclassPropertyAliasesMap( propname, compProps );
		}
		else {
			String[] aliases = new String[prop.getColumnSpan()];
			String[] cols = new String[prop.getColumnSpan()];
			Iterator colIter = prop.getColumnIterator();
			int l = 0;
			while ( colIter.hasNext() ) {
				Selectable thing = ( Selectable ) colIter.next();
				aliases[l] = thing.getAlias( getFactory().getDialect(), prop.getValue().getTable() );
				cols[l] = thing.getText( getFactory().getDialect() ); // TODO: skip formulas?
				l++;
			}

			subclassPropertyAliases.put( propname, aliases );
			subclassPropertyColumnNames.put( propname, cols );
		}
	}

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:AbstractEntityPersister.java

示例4: buildGenerationStrategyPair

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private static GenerationStrategyPair buildGenerationStrategyPair(
		final SessionFactoryImplementor sessionFactory,
		final Property mappingProperty) {
	final ValueGeneration valueGeneration = mappingProperty.getValueGenerationStrategy();
	if ( valueGeneration != null && valueGeneration.getGenerationTiming() != GenerationTiming.NEVER ) {
		// the property is generated in full. build the generation strategy pair.
		if ( valueGeneration.getValueGenerator() != null ) {
			// in-memory generation
			return new GenerationStrategyPair(
					FullInMemoryValueGenerationStrategy.create( valueGeneration )
			);
		}
		else {
			// in-db generation
			return new GenerationStrategyPair(
					create(
							sessionFactory,
							mappingProperty,
							valueGeneration
					)
			);
		}
	}
	else if ( mappingProperty.getValue() instanceof Component ) {
		final CompositeGenerationStrategyPairBuilder builder = new CompositeGenerationStrategyPairBuilder( mappingProperty );
		interpretPartialCompositeValueGeneration( sessionFactory, (Component) mappingProperty.getValue(), builder );
		return builder.buildPair();
	}

	return NO_GEN_PAIR;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:32,代码来源:EntityMetamodel.java

示例5: determineInsertValueGenerationType

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private ValueInclusion determineInsertValueGenerationType(Property mappingProperty, NonIdentifierAttribute runtimeProperty) {
	if ( isInsertGenerated( runtimeProperty ) ) {
		return ValueInclusion.FULL;
	}
	else if ( mappingProperty.getValue() instanceof Component ) {
		if ( hasPartialInsertComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {
			return ValueInclusion.PARTIAL;
		}
	}
	return ValueInclusion.NONE;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:EntityMetamodel.java

示例6: hasPartialInsertComponentGeneration

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private boolean hasPartialInsertComponentGeneration(Component component) {
	Iterator subProperties = component.getPropertyIterator();
	while ( subProperties.hasNext() ) {
		final Property prop = ( Property ) subProperties.next();
		if ( isInsertGenerated( prop ) ) {
			return true;
		}
		else if ( prop.getValue() instanceof Component ) {
			if ( hasPartialInsertComponentGeneration( (Component) prop.getValue() ) ) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:EntityMetamodel.java

示例7: determineUpdateValueGenerationType

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private ValueInclusion determineUpdateValueGenerationType(Property mappingProperty, NonIdentifierAttribute runtimeProperty) {
	if ( isUpdateGenerated( runtimeProperty ) ) {
		return ValueInclusion.FULL;
	}
	else if ( mappingProperty.getValue() instanceof Component ) {
		if ( hasPartialUpdateComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {
			return ValueInclusion.PARTIAL;
		}
	}
	return ValueInclusion.NONE;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:EntityMetamodel.java

示例8: hasPartialUpdateComponentGeneration

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private boolean hasPartialUpdateComponentGeneration(Component component) {
	Iterator subProperties = component.getPropertyIterator();
	while ( subProperties.hasNext() ) {
		Property prop = (Property) subProperties.next();
		if ( isUpdateGenerated( prop ) ) {
			return true;
		}
		else if ( prop.getValue() instanceof Component ) {
			if ( hasPartialUpdateComponentGeneration( ( Component ) prop.getValue() ) ) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:EntityMetamodel.java

示例9: mapPropertyToIndex

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private void mapPropertyToIndex(Property prop, int i) {
	propertyIndexes.put( prop.getName(), i );
	if ( prop.getValue() instanceof Component ) {
		Iterator iter = ( (Component) prop.getValue() ).getPropertyIterator();
		while ( iter.hasNext() ) {
			Property subprop = (Property) iter.next();
			propertyIndexes.put(
					prop.getName() + '.' + subprop.getName(),
					i
				);
		}
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:EntityMetamodel.java

示例10: determineInsertValueGenerationType

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private ValueInclusion determineInsertValueGenerationType(Property mappingProperty, StandardProperty runtimeProperty) {
	if ( runtimeProperty.isInsertGenerated() ) {
		return ValueInclusion.FULL;
	}
	else if ( mappingProperty.getValue() instanceof Component ) {
		if ( hasPartialInsertComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {
			return ValueInclusion.PARTIAL;
		}
	}
	return ValueInclusion.NONE;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:12,代码来源:EntityMetamodel.java

示例11: hasPartialInsertComponentGeneration

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private boolean hasPartialInsertComponentGeneration(Component component) {
	Iterator subProperties = component.getPropertyIterator();
	while ( subProperties.hasNext() ) {
		Property prop = ( Property ) subProperties.next();
		if ( prop.getGeneration() == PropertyGeneration.ALWAYS || prop.getGeneration() == PropertyGeneration.INSERT ) {
			return true;
		}
		else if ( prop.getValue() instanceof Component ) {
			if ( hasPartialInsertComponentGeneration( ( Component ) prop.getValue() ) ) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:16,代码来源:EntityMetamodel.java

示例12: determineUpdateValueGenerationType

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private ValueInclusion determineUpdateValueGenerationType(Property mappingProperty, StandardProperty runtimeProperty) {
	if ( runtimeProperty.isUpdateGenerated() ) {
		return ValueInclusion.FULL;
	}
	else if ( mappingProperty.getValue() instanceof Component ) {
		if ( hasPartialUpdateComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {
			return ValueInclusion.PARTIAL;
		}
	}
	return ValueInclusion.NONE;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:12,代码来源:EntityMetamodel.java

示例13: hasPartialUpdateComponentGeneration

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private boolean hasPartialUpdateComponentGeneration(Component component) {
	Iterator subProperties = component.getPropertyIterator();
	while ( subProperties.hasNext() ) {
		Property prop = ( Property ) subProperties.next();
		if ( prop.getGeneration() == PropertyGeneration.ALWAYS ) {
			return true;
		}
		else if ( prop.getValue() instanceof Component ) {
			if ( hasPartialUpdateComponentGeneration( ( Component ) prop.getValue() ) ) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:16,代码来源:EntityMetamodel.java

示例14: mapPropertyToIndex

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
private void mapPropertyToIndex(Property prop, int i) {
	propertyIndexes.put( prop.getName(), new Integer(i) );
	if ( prop.getValue() instanceof Component ) {
		Iterator iter = ( (Component) prop.getValue() ).getPropertyIterator();
		while ( iter.hasNext() ) {
			Property subprop = (Property) iter.next();
			propertyIndexes.put(
					prop.getName() + '.' + subprop.getName(),
					new Integer(i)
				);
		}
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:14,代码来源:EntityMetamodel.java

示例15: testComparator

import org.hibernate.mapping.Property; //导入方法依赖的package包/类
public void testComparator() {
	PersistentClass cm = cfg.getClassMapping("org.hibernate.test.legacy.Wicked");
	
	Property property = cm.getProperty("sortedEmployee");
	Collection col = (Collection) property.getValue();
	assertEquals(col.getComparatorClassName(),"org.hibernate.test.legacy.NonExistingComparator");
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:8,代码来源:NonReflectiveBinderTest.java


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