Search in sources :

Example 6 with CharType

use of org.apache.cayenne.access.types.CharType in project cayenne by apache.

the class SybaseAdapter method configureExtendedTypes.

/**
 * Installs appropriate ExtendedTypes as converters for passing values
 * between JDBC and Java layers.
 */
@Override
protected void configureExtendedTypes(ExtendedTypeMap map) {
    super.configureExtendedTypes(map);
    // create specially configured CharType handler
    map.registerType(new CharType(true, false));
    // create specially configured ByteArrayType handler
    map.registerType(new ByteArrayType(true, false));
    // address Sybase driver inability to handle java.lang.Short and
    // java.lang.Byte
    map.registerType(new ShortType(true));
    map.registerType(new ByteType(true));
}
Also used : ByteArrayType(org.apache.cayenne.access.types.ByteArrayType) ShortType(org.apache.cayenne.access.types.ShortType) CharType(org.apache.cayenne.access.types.CharType) ByteType(org.apache.cayenne.access.types.ByteType)

Example 7 with CharType

use of org.apache.cayenne.access.types.CharType in project cayenne by apache.

the class DB2Adapter method configureExtendedTypes.

@Override
protected void configureExtendedTypes(ExtendedTypeMap map) {
    super.configureExtendedTypes(map);
    // create specially configured CharType handler
    map.registerType(new CharType(true, true));
    // configure boolean type to work with numeric columns
    map.registerType(new DB2BooleanType());
    map.registerType(new ByteArrayType(false, false));
}
Also used : ByteArrayType(org.apache.cayenne.access.types.ByteArrayType) CharType(org.apache.cayenne.access.types.CharType)

Example 8 with CharType

use of org.apache.cayenne.access.types.CharType in project cayenne by apache.

the class HSQLDBAdapter method configureExtendedTypes.

/**
 * @since 4.0
 */
@Override
protected void configureExtendedTypes(ExtendedTypeMap map) {
    super.configureExtendedTypes(map);
    // create specially configured CharType handler
    map.registerType(new CharType(true, true));
}
Also used : CharType(org.apache.cayenne.access.types.CharType)

Example 9 with CharType

use of org.apache.cayenne.access.types.CharType in project cayenne by apache.

the class MySQLAdapter method configureExtendedTypes.

/**
 * Installs appropriate ExtendedTypes used as converters for passing values
 * between JDBC and Java layers.
 */
@Override
protected void configureExtendedTypes(ExtendedTypeMap map) {
    super.configureExtendedTypes(map);
    // must handle CLOBs as strings, otherwise there
    // are problems with NULL clobs that are treated
    // as empty strings... somehow this doesn't happen
    // for BLOBs (ConnectorJ v. 3.0.9)
    map.registerType(new CharType(false, false));
    map.registerType(new ByteArrayType(false, false));
}
Also used : ByteArrayType(org.apache.cayenne.access.types.ByteArrayType) CharType(org.apache.cayenne.access.types.CharType)

Aggregations

CharType (org.apache.cayenne.access.types.CharType)9 ByteArrayType (org.apache.cayenne.access.types.ByteArrayType)6 ByteType (org.apache.cayenne.access.types.ByteType)4 ShortType (org.apache.cayenne.access.types.ShortType)4 Calendar (java.util.Calendar)2 GregorianCalendar (java.util.GregorianCalendar)2 DefaultObjectMapRetainStrategy (org.apache.cayenne.access.DefaultObjectMapRetainStrategy)2 ObjectMapRetainStrategy (org.apache.cayenne.access.ObjectMapRetainStrategy)2 BatchTranslatorFactory (org.apache.cayenne.access.translator.batch.BatchTranslatorFactory)2 BigDecimalType (org.apache.cayenne.access.types.BigDecimalType)2 BigIntegerValueType (org.apache.cayenne.access.types.BigIntegerValueType)2 BooleanType (org.apache.cayenne.access.types.BooleanType)2 CalendarType (org.apache.cayenne.access.types.CalendarType)2 DateType (org.apache.cayenne.access.types.DateType)2 DefaultValueObjectTypeRegistry (org.apache.cayenne.access.types.DefaultValueObjectTypeRegistry)2 DoubleType (org.apache.cayenne.access.types.DoubleType)2 FloatType (org.apache.cayenne.access.types.FloatType)2 IntegerType (org.apache.cayenne.access.types.IntegerType)2 LocalDateTimeValueType (org.apache.cayenne.access.types.LocalDateTimeValueType)2 LocalDateValueType (org.apache.cayenne.access.types.LocalDateValueType)2