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

下面列出了怎么用org.hibernate.type.TypeResolver的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 项目: lams   文件: IdsClauseBuilder.java
/**
 * @deprecated Use {{@link IdsClauseBuilder#IdsClauseBuilder(Dialect, Type, TypeConfiguration, String[], List)}} instead.
 */
@Deprecated
protected IdsClauseBuilder(
		Dialect dialect,
		Type identifierType,
		TypeResolver typeResolver,
		String[] columns,
		List<Object[]> ids) {
	this.dialect = dialect;
	this.identifierType = identifierType;
	this.typeResolver = typeResolver;
	this.columns = columns;
	this.ids = ids;
}
 
源代码3 项目: lams   文件: TypeConfiguration.java
public TypeConfiguration() {
	this.scope = new Scope();
	this.javaTypeDescriptorRegistry = new JavaTypeDescriptorRegistry( this );
	this.sqlTypeDescriptorRegistry = new SqlTypeDescriptorRegistry( this );

	this.basicTypeRegistry = new BasicTypeRegistry();
	this.typeFactory = new TypeFactory( this );
	this.typeResolver = new TypeResolver( this, typeFactory );

	TypeConfigurationRegistry.INSTANCE.registerTypeConfiguration( this );
}
 
源代码4 项目: 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() };
}
 
源代码5 项目: lams   文件: TypeLocatorImpl.java
public TypeLocatorImpl(TypeResolver typeResolver) {
	this.typeResolver = typeResolver;
}
 
源代码6 项目: lams   文件: InlineIdsInClauseBuilder.java
public InlineIdsInClauseBuilder(
		Dialect dialect, Type identifierType, TypeResolver typeResolver, String[] columns, List<Object[]> ids) {
	super( dialect, identifierType, typeResolver, columns, ids );
	this.chunkLimit = dialect.getInExpressionCountLimit();
}
 
源代码7 项目: lams   文件: InlineIdsOrClauseBuilder.java
public InlineIdsOrClauseBuilder(
		Dialect dialect, Type identifierType, TypeResolver typeResolver, String[] columns, List<Object[]> ids) {
	super( dialect, identifierType, typeResolver, columns, ids );
}
 
public InlineIdsSubSelectValuesListBuilder(
		Dialect dialect, Type identifierType, TypeResolver typeResolver, String[] columns, List<Object[]> ids) {
	super( dialect, identifierType, typeResolver, columns, ids );
}
 
源代码9 项目: gorm-hibernate5   文件: HibernateQuery.java
@Deprecated
protected TypeResolver getTypeResolver(SessionFactory sessionFactory) {
    return ((SessionFactoryImplementor) sessionFactory).getTypeResolver();
}
 
源代码10 项目: lemon   文件: SessionFactoryWrapper.java
public TypeResolver getTypeResolver() {
    return sessionFactoryImplementor.getTypeResolver();
}
 
源代码11 项目: lams   文件: SessionFactoryImplementor.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.2) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
TypeResolver getTypeResolver();
 
源代码12 项目: lams   文件: SessionFactoryDelegatingImpl.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
public TypeResolver getTypeResolver() {
	return delegate.getTypeResolver();
}
 
源代码13 项目: lams   文件: SessionFactoryImpl.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
public TypeResolver getTypeResolver() {
	return metamodel.getTypeConfiguration().getTypeResolver();
}
 
源代码14 项目: lams   文件: MetadataImplementor.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
TypeResolver getTypeResolver();
 
源代码15 项目: lams   文件: AbstractDelegatingMetadata.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
public TypeResolver getTypeResolver() {
	return delegate.getTypeResolver();
}
 
源代码16 项目: lams   文件: InFlightMetadataCollectorImpl.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
public TypeResolver getTypeResolver() {
	return bootstrapContext.getTypeConfiguration().getTypeResolver();
}
 
源代码17 项目: lams   文件: MetadataImpl.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
public TypeResolver getTypeResolver() {
	return bootstrapContext.getTypeConfiguration().getTypeResolver();
}
 
源代码18 项目: lams   文件: IdsClauseBuilder.java
/**
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
public TypeResolver getTypeResolver() {
	return typeResolver;
}
 
源代码19 项目: lams   文件: TypeConfiguration.java
/**
 * Temporarily needed to support deprecations
 *
 * Retrieve the {@link Type} resolver associated with this factory.
 *
 * @return The type resolver
 *
 * @deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
 */
@Deprecated
public TypeResolver getTypeResolver(){
	return typeResolver;
}
 
源代码20 项目: gorm-hibernate5   文件: AbstractHibernateQuery.java
protected abstract TypeResolver getTypeResolver(SessionFactory sessionFactory); 
 类所在包
 同包方法