public class PgTypeHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PgTypeHelper.PgTypeDataHolder |
| Constructor and Description |
|---|
PgTypeHelper() |
| Modifier and Type | Method and Description |
|---|---|
static PgRow |
asPGobject(Object o) |
static PgRow |
asPGobject(Object o,
String typeHint) |
static PgRow |
asPGobject(Object o,
String typeHint,
Connection connection) |
static PgRow |
asPGobject(Object o,
String typeHint,
Connection connection,
boolean forceTypeHint) |
static DatabaseFieldDescriptor |
getDatabaseFieldDescriptor(Field field)
get the database field annotation from a given field.
|
static PgTypeHelper.PgTypeDataHolder |
getObjectAttributesForPgSerialization(Object obj,
String typeHint) |
static PgTypeHelper.PgTypeDataHolder |
getObjectAttributesForPgSerialization(Object obj,
String typeHint,
Connection connection) |
static PgTypeHelper.PgTypeDataHolder |
getObjectAttributesForPgSerialization(Object obj,
String typeHint,
Connection connection,
boolean forceTypeHint) |
static String |
getSQLNameForClass(Class<?> elementClass) |
static int |
getSQLType(String typeName)
A simple method to get an appropriate java.sql.types.* value for the given PostgreSQL type name
|
static String |
toPgString(Object o) |
static String |
toPgString(Object o,
Connection connection)
Serialize an object into a PostgreSQL string.
|
public static final int getSQLType(String typeName)
typeName - public static PgTypeHelper.PgTypeDataHolder getObjectAttributesForPgSerialization(Object obj, String typeHint)
public static PgTypeHelper.PgTypeDataHolder getObjectAttributesForPgSerialization(Object obj, String typeHint, Connection connection)
public static PgTypeHelper.PgTypeDataHolder getObjectAttributesForPgSerialization(Object obj, String typeHint, Connection connection, boolean forceTypeHint)
public static DatabaseFieldDescriptor getDatabaseFieldDescriptor(Field field)
Column definition so that both annotations can be used to mark a DatabaseField.field - the field to be checkedDatabaseFieldDescriptor based on a found DatabaseField or
Columnpublic static String toPgString(Object o, Connection connection)
o - object to be serializedpublic static PgRow asPGobject(Object o) throws SQLException
SQLExceptionpublic static PgRow asPGobject(Object o, String typeHint) throws SQLException
SQLExceptionpublic static PgRow asPGobject(Object o, String typeHint, Connection connection) throws SQLException
SQLExceptionpublic static PgRow asPGobject(Object o, String typeHint, Connection connection, boolean forceTypeHint) throws SQLException
SQLExceptionCopyright © 2012–2022 Zalando SE. All rights reserved.