T - java type for this mappingpublic interface ResultSetMapping<T>
ResultSet or
PreparedStatement is supposed to be mapped.| Modifier and Type | Method and Description |
|---|---|
Class<T> |
getJavaClass()
Returns the Java Class to use for this type mapping.
|
String |
getResultSetMethodName(com.speedment.runtime.config.Dbms dbms)
Returns the name of the ResultSet method to be used when getting data
from a database.
|
T |
parse(long input)
Parses the given input
long and returns an object of type T that
corresponds to the given long. |
T |
parse(String input)
Parses the given input
String and returns an object of type T
that corresponds to the given String. |
Class<T> getJavaClass()
String getResultSetMethodName(com.speedment.runtime.config.Dbms dbms)
Integer is used,
then this method will return "Int" because an Integer can be read
from a ResultSet with the method
ResultSet.getInt(int). In some (rare) cases, the
response might be different for different Dbms:es, so this is why the
dmbs parameter needs to be provided.dbms - to useT parse(String input)
String and returns an object of type T
that corresponds to the given String. This function is needed to
be able to reconstruct Entity fields from JSON strings or change data
logs for example.input - the input StringObject of type T that corresponds to the given
StringT parse(long input)
long and returns an object of type T that
corresponds to the given long. This function is needed to be able to
reconstruct Entity fields that are auto increments in SQL tables.
Typically, this method is only implemented for classes implementing the
Number interface.input - the input longObject of type T that corresponds to the given
StringCopyright © 2019 Speedment, Inc.. All rights reserved.