MoyaPostgreSQLPlatform.java
783 Bytes
package fi.codecrew.moya.database;
import java.util.Hashtable;
import org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition;
import org.eclipse.persistence.platform.database.PostgreSQLPlatform;
public class MoyaPostgreSQLPlatform extends PostgreSQLPlatform {
private static final long serialVersionUID = 6351395815598077327L;
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
protected Hashtable buildFieldTypes() {
Hashtable map = super.buildFieldTypes();
map.put(String.class, new FieldTypeDefinition("TEXT", false));
map.put(java.sql.Timestamp.class, new FieldTypeDefinition("TIMESTAMPTZ", false));
map.put(javax.json.JsonObject.class, new FieldTypeDefinition("JSON", false));
return map;
}
}