diff options
author | James Moger <james.moger@gitblit.com> | 2015-04-16 19:47:27 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2015-04-16 20:06:15 -0400 |
commit | e670abca93ddc6455ab75a01cfdd07abc3b3e9ad (patch) | |
tree | c92616711ce399142c69286c685fd834eca2359f /src/main/java/com/iciql/SQLDialect.java | |
parent | 5f71b4c044a382b89bd05577ef6fed86ed593c31 (diff) | |
download | iciql-e670abca93ddc6455ab75a01cfdd07abc3b3e9ad.tar.gz iciql-e670abca93ddc6455ab75a01cfdd07abc3b3e9ad.zip |
Use JavaType as the key for DataTypeAdapter registration
Diffstat (limited to 'src/main/java/com/iciql/SQLDialect.java')
-rw-r--r-- | src/main/java/com/iciql/SQLDialect.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/com/iciql/SQLDialect.java b/src/main/java/com/iciql/SQLDialect.java index ccc0452..11b1af8 100644 --- a/src/main/java/com/iciql/SQLDialect.java +++ b/src/main/java/com/iciql/SQLDialect.java @@ -37,21 +37,20 @@ public interface SQLDialect { void registerAdapter(DataTypeAdapter<?> typeAdapter); /** - * Returns the registered instance of the type adapter. + * Returns the registered instance of the type adapter for the specified object class. * - * @param typeAdapter + * @param objectClass * @return the type adapter instance */ - DataTypeAdapter<?> getAdapter(Class<? extends DataTypeAdapter<?>> typeAdapter); + DataTypeAdapter<?> getAdapter(Class<?> objectClass); /** * Serialize the Java object into a type or format that the database will accept. * * @param value - * @param typeAdapter * @return the serialized object */ - <T> Object serialize(T value, Class<? extends DataTypeAdapter<?>> typeAdapter); + <T> Object serialize(T value); /** * Deserialize the object received from the database into a Java type. @@ -59,10 +58,9 @@ public interface SQLDialect { * @param rs * @param columnIndex * @param targetType - * @param typeAdapter * @return the deserialized object */ - Object deserialize(ResultSet rs, int columnIndex, Class<?> targetType, Class<? extends DataTypeAdapter<?>> typeAdapter); + Object deserialize(ResultSet rs, int columnIndex, Class<?> targetType); /** * Configure the dialect. |