Java Code Examples for org.hibernate.type.descriptor.sql.VarcharTypeDescriptor#INSTANCE

The following examples show how to use org.hibernate.type.descriptor.sql.VarcharTypeDescriptor#INSTANCE . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: lams   File: DB297Dialect.java    License: GNU General Public License v2.0 6 votes vote down vote up
@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 );
	}
}
 
Example 2
@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 );
	}
}
 
Example 3
Source Project: hibernate-types   File: ZoneIdType.java    License: Apache License 2.0 5 votes vote down vote up
public ZoneIdType(Configuration configuration) {
    super(
        VarcharTypeDescriptor.INSTANCE,
        ZoneIdTypeDescriptor.INSTANCE,
        configuration
    );
}
 
Example 4
public BitSetType() {
    super( VarcharTypeDescriptor.INSTANCE, BitSetTypeDescriptor.INSTANCE );
}
 
Example 5
public CommaDelimitedStringsType() {
    super(
        VarcharTypeDescriptor.INSTANCE,
        new CommaDelimitedStringsJavaTypeDescriptor()
    );
}
 
Example 6
Source Project: lams   File: ClassType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ClassType() {
	super( VarcharTypeDescriptor.INSTANCE, ClassTypeDescriptor.INSTANCE );
}
 
Example 7
Source Project: lams   File: StringType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public StringType() {
	super( VarcharTypeDescriptor.INSTANCE, StringTypeDescriptor.INSTANCE );
}
 
Example 8
Source Project: lams   File: CharArrayType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public CharArrayType() {
	super( VarcharTypeDescriptor.INSTANCE, PrimitiveCharacterArrayTypeDescriptor.INSTANCE );
}
 
Example 9
Source Project: lams   File: CurrencyType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public CurrencyType() {
	super( VarcharTypeDescriptor.INSTANCE, CurrencyTypeDescriptor.INSTANCE );
}
 
Example 10
public CharacterArrayType() {
	super( VarcharTypeDescriptor.INSTANCE, CharacterArrayTypeDescriptor.INSTANCE );
}
 
Example 11
Source Project: lams   File: UUIDCharType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public UUIDCharType() {
	super( VarcharTypeDescriptor.INSTANCE, UUIDTypeDescriptor.INSTANCE );
}
 
Example 12
Source Project: lams   File: TimeZoneType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public TimeZoneType() {
	super( VarcharTypeDescriptor.INSTANCE, TimeZoneTypeDescriptor.INSTANCE );
}
 
Example 13
Source Project: lams   File: LocaleType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public LocaleType() {
	super( VarcharTypeDescriptor.INSTANCE, LocaleTypeDescriptor.INSTANCE );
}
 
Example 14
Source Project: lams   File: UrlType.java    License: GNU General Public License v2.0 4 votes vote down vote up
public UrlType() {
	super( VarcharTypeDescriptor.INSTANCE, UrlTypeDescriptor.INSTANCE );
}
 
Example 15
Source Project: hibernate-types   File: ZoneIdType.java    License: Apache License 2.0 4 votes vote down vote up
public ZoneIdType() {
    super(
        VarcharTypeDescriptor.INSTANCE,
        ZoneIdTypeDescriptor.INSTANCE
    );
}
 
Example 16
Source Project: tutorials   File: LocalDateStringType.java    License: MIT License 4 votes vote down vote up
public LocalDateStringType() {
    super(VarcharTypeDescriptor.INSTANCE, LocalDateStringJavaDescriptor.INSTANCE);
}
 
Example 17
Source Project: tutorials   File: LocalDateStringType.java    License: MIT License 4 votes vote down vote up
public LocalDateStringType() {
    super(VarcharTypeDescriptor.INSTANCE, LocalDateStringJavaDescriptor.INSTANCE);
}