类org.hibernate.type.AbstractSingleColumnStandardBasicType源码实例Demo

下面列出了怎么用org.hibernate.type.AbstractSingleColumnStandardBasicType的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: lams   文件: ModelBinder.java
private void resolveLob(final SingularAttributeSourceBasic attributeSource, SimpleValue value) {
	// Resolves whether the property is LOB based on the type attribute on the attribute property source.
	// Essentially this expects the type to map to a CLOB/NCLOB/BLOB sql type internally and compares.
	if ( !value.isLob() && value.getTypeName() != null ) {
		final TypeResolver typeResolver = attributeSource.getBuildingContext().getMetadataCollector().getTypeResolver();
		final BasicType basicType = typeResolver.basic( value.getTypeName() );
		if ( basicType instanceof AbstractSingleColumnStandardBasicType ) {
			if ( isLob( ( (AbstractSingleColumnStandardBasicType) basicType ).getSqlTypeDescriptor().getSqlType(), null ) ) {
				value.makeLob();
			}
		}
	}

	// If the prior check didn't set the lob flag, this will inspect the column sql-type attribute value and
	// if this maps to CLOB/NCLOB/BLOB then the value will be marked as lob.
	if ( !value.isLob() ) {
		for ( RelationalValueSource relationalValueSource : attributeSource.getRelationalValueSources() ) {
			if ( ColumnSource.class.isInstance( relationalValueSource ) ) {
				if ( isLob( null, ( (ColumnSource) relationalValueSource ).getSqlType() ) ) {
					value.makeLob();
				}
			}
		}
	}
}
 
源代码2 项目: jadira   文件: AbstractHeuristicUserType.java
public void setParameterValues(Properties parameters) {
	
	@SuppressWarnings("unchecked")
	final AbstractSingleColumnStandardBasicType<? extends Object> heuristicType = (AbstractSingleColumnStandardBasicType<? extends Object>) new TypeResolver().heuristicType(identifierType.getName(), parameters);
	if (heuristicType == null) {
		throw new HibernateException("Unsupported identifier type " + identifierType.getName());
	}
	
	type = heuristicType;
	sqlTypes = new int[]{ type.sqlType() };
}
 
源代码3 项目: jadira   文件: AbstractHeuristicUserType.java
protected AbstractSingleColumnStandardBasicType<?> getType() {
	return type;
}
 
 类所在包
 同包方法