Search in sources :

Example 6 with ByteArrayType

use of org.apache.cayenne.access.types.ByteArrayType 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

ByteArrayType (org.apache.cayenne.access.types.ByteArrayType)6 CharType (org.apache.cayenne.access.types.CharType)6 ByteType (org.apache.cayenne.access.types.ByteType)3 ShortType (org.apache.cayenne.access.types.ShortType)3 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