use of org.apache.cayenne.access.types.JsonType in project cayenne by apache.
the class DerbyAdapter 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
CharType charType = new CharType(true, true);
map.registerType(charType);
// address Derby driver inability to handle java.lang.Short and java.lang.Byte
map.registerType(new ShortType(true));
map.registerType(new ByteType(true));
map.registerType(new JsonType(charType, true));
}
use of org.apache.cayenne.access.types.JsonType in project cayenne by apache.
the class PostgresAdapter method configureExtendedTypes.
/**
* Installs appropriate ExtendedTypes as converters for passing values
* between JDBC and Java layers.
*/
@Override
protected void configureExtendedTypes(ExtendedTypeMap map) {
super.configureExtendedTypes(map);
CharType charType = new CharType(true, false);
map.registerType(charType);
map.registerType(new PostgresByteArrayType(true, true));
map.registerType(new JsonType(charType, false));
}
use of org.apache.cayenne.access.types.JsonType 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)
CharType charType = new CharType(false, false);
map.registerType(charType);
map.registerType(new ByteArrayType(false, false));
map.registerType(new JsonType(charType, true));
// register non-default types for the dates, see CAY-2691
map.registerType(new DateType(true));
map.registerType(new TimeType(true));
map.registerType(new TimestampType(true));
map.registerType(new UtilDateType(true));
}
Aggregations