org.hibernate.type.descriptor.sql.VarcharTypeDescriptor源码实例Demo

类org.hibernate.type.descriptor.sql.VarcharTypeDescriptor源码实例Demo

下面列出了org.hibernate.type.descriptor.sql.VarcharTypeDescriptor 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

public ClobType(Dialect dialect) {
	super(new VarcharTypeDescriptor() {
		@Override
		public int getSqlType() {
			//force the use of byte instead of oid on Postgres
			return dialect instanceof PostgreSQL10Dialect
					? Types.LONGVARCHAR
					: Types.CLOB;
		}

		@Override
		public boolean canBeRemapped() {
			return false;
		}
	}, StringTypeDescriptor.INSTANCE);
}
 
源代码2 项目: lams   文件: DB297Dialect.java
@Override
protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
	// See HHH-12753
	// It seems that DB2's JDBC 4.0 support as of 9.5 does not support the N-variant methods like
	// NClob or NString.  Therefore here we overwrite the sql type descriptors to use the non-N variants
	// which are supported.
	switch ( sqlCode ) {
		case Types.NCHAR:
			return CharTypeDescriptor.INSTANCE;

		case Types.NCLOB:
			if ( useInputStreamToInsertBlob() ) {
				return ClobTypeDescriptor.STREAM_BINDING;
			}
			else {
				return ClobTypeDescriptor.CLOB_BINDING;
			}

		case Types.NVARCHAR:
			return VarcharTypeDescriptor.INSTANCE;

		default:
			return super.getSqlTypeDescriptorOverride( sqlCode );
	}
}
 
源代码3 项目: lams   文件: AbstractHANADialect.java
@Override
protected SqlTypeDescriptor getSqlTypeDescriptorOverride(final int sqlCode) {
	switch ( sqlCode ) {
		case Types.CLOB:
			return this.clobTypeDescriptor;
		case Types.NCLOB:
			return this.nClobTypeDescriptor;
		case Types.BLOB:
			return this.blobTypeDescriptor;
		case Types.TINYINT:
			// tinyint is unsigned on HANA
			return SmallIntTypeDescriptor.INSTANCE;
		case Types.BOOLEAN:
			return this.useLegacyBooleanType ? BitTypeDescriptor.INSTANCE : BooleanTypeDescriptor.INSTANCE;
		case Types.VARCHAR:
			return this.useUnicodeStringTypes ? NVarcharTypeDescriptor.INSTANCE : VarcharTypeDescriptor.INSTANCE;
		case Types.CHAR:
			return this.useUnicodeStringTypes ? NCharTypeDescriptor.INSTANCE : CharTypeDescriptor.INSTANCE;
		default:
			return super.getSqlTypeDescriptorOverride( sqlCode );
	}
}
 
源代码4 项目: hibernate-types   文件: ZoneIdType.java
public ZoneIdType(Configuration configuration) {
    super(
        VarcharTypeDescriptor.INSTANCE,
        ZoneIdTypeDescriptor.INSTANCE,
        configuration
    );
}
 
public BitSetType() {
    super( VarcharTypeDescriptor.INSTANCE, BitSetTypeDescriptor.INSTANCE );
}
 
public CommaDelimitedStringsType() {
    super(
        VarcharTypeDescriptor.INSTANCE,
        new CommaDelimitedStringsJavaTypeDescriptor()
    );
}
 
源代码7 项目: lams   文件: ClassType.java
public ClassType() {
	super( VarcharTypeDescriptor.INSTANCE, ClassTypeDescriptor.INSTANCE );
}
 
源代码8 项目: lams   文件: StringType.java
public StringType() {
	super( VarcharTypeDescriptor.INSTANCE, StringTypeDescriptor.INSTANCE );
}
 
源代码9 项目: lams   文件: CharArrayType.java
public CharArrayType() {
	super( VarcharTypeDescriptor.INSTANCE, PrimitiveCharacterArrayTypeDescriptor.INSTANCE );
}
 
源代码10 项目: lams   文件: CurrencyType.java
public CurrencyType() {
	super( VarcharTypeDescriptor.INSTANCE, CurrencyTypeDescriptor.INSTANCE );
}
 
源代码11 项目: lams   文件: CharacterArrayType.java
public CharacterArrayType() {
	super( VarcharTypeDescriptor.INSTANCE, CharacterArrayTypeDescriptor.INSTANCE );
}
 
源代码12 项目: lams   文件: UUIDCharType.java
public UUIDCharType() {
	super( VarcharTypeDescriptor.INSTANCE, UUIDTypeDescriptor.INSTANCE );
}
 
源代码13 项目: lams   文件: TimeZoneType.java
public TimeZoneType() {
	super( VarcharTypeDescriptor.INSTANCE, TimeZoneTypeDescriptor.INSTANCE );
}
 
源代码14 项目: lams   文件: LocaleType.java
public LocaleType() {
	super( VarcharTypeDescriptor.INSTANCE, LocaleTypeDescriptor.INSTANCE );
}
 
源代码15 项目: lams   文件: UrlType.java
public UrlType() {
	super( VarcharTypeDescriptor.INSTANCE, UrlTypeDescriptor.INSTANCE );
}
 
源代码16 项目: hibernate-types   文件: ZoneIdType.java
public ZoneIdType() {
    super(
        VarcharTypeDescriptor.INSTANCE,
        ZoneIdTypeDescriptor.INSTANCE
    );
}
 
源代码17 项目: tutorials   文件: LocalDateStringType.java
public LocalDateStringType() {
    super(VarcharTypeDescriptor.INSTANCE, LocalDateStringJavaDescriptor.INSTANCE);
}
 
源代码18 项目: tutorials   文件: LocalDateStringType.java
public LocalDateStringType() {
    super(VarcharTypeDescriptor.INSTANCE, LocalDateStringJavaDescriptor.INSTANCE);
}
 
如果文章对您有帮助,请点击页面广告。以鼓励作者做出的努力。
 类所在包
 类方法
 同包方法