Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Defines a logical type which can translate between one or more Java types and one or more JDBC types. This should be independent of the underlying database dialect.
public interface LogicalType<T>
Returns a descriptive name for this logical type.
    String getName();
Returns the Java types that are handled by this logical type. Only one logical type can handle any given Java type.
    ImmutableSet<Class<?>> getTypes();
Returns the set of JDBC types that can be translated into this logical type.
Returns the default JDBC type to use when writing values to the database. This can be overridden by each database provider in the SchemaProperties.
    int getDefaultJdbcWriteType();
Returns a boolean specifying if this type can be used as a primary key value.

if it's allowed or not
    boolean isAllowedAsPrimaryKey();
Attempts to parse a string into a value of this logical type.
    T parse(String inputthrows IllegalArgumentException;
Same as parse(java.lang.String), but adds any necessary validation when the value is being used as a default value for a column.
    T parseDefault(String inputthrows IllegalArgumentException;
Verifies that a value can be stored in the database. Returns the same value or a canonically equivalent value.
    Object validate(Object valuethrows IllegalArgumentException;
Sets a value in a JDBC statement.
    void putToDatabase(EntityManager managerPreparedStatement stmtint index, T valueint jdbcTypethrows SQLException;
Reads a value from a JDBC result set.
    T pullFromDatabase(EntityManager managerResultSet resClass<T> typeString columnNamethrows SQLException;
Reads a value from a JDBC result set.
    T pullFromDatabase(EntityManager managerResultSet resClass<T> typeint columnIndexthrows SQLException;


since 0.25. Entities and values now no longer cached.
    boolean shouldCache(Class<?> type);

Returns whether the type may be put inside the entities value store.
    boolean shouldStore(Class<?> type);
    boolean valueEquals(Object val1Object val2);
    String valueToString(T value);
New to GrepCode? Check out our FAQ X