org.ujorm.orm
Interface ITypeService<J,D>

Type Parameters:
J - Common types of the Java objects
D - Converted Java types to a JDBC type ready
All Known Implementing Classes:
TypeService

public interface ITypeService<J,D>

A type service for popular Java types and more. Implementation must have got an no-parameter constructor.


Method Summary
 Class<D> getDbTypeClass(MetaColumn column)
          Returns converted Java type to use in database DDL statements.
 J getValue(MetaColumn mColumn, CallableStatement rs, int c)
          GetValue from the stored precedure by position.
 J getValue(MetaColumn mColumn, ResultSet rs, int c)
          GetValue from the result set by position It must be the same implementation as getValue(org.ujorm.orm.metaModel.MetaColumn, java.sql.CallableStatement, int).
 void setValue(MetaColumn mColumn, PreparedStatement rs, J value, int c)
          GetValue from the result set by position.
 

Method Detail

getValue

J getValue(MetaColumn mColumn,
           ResultSet rs,
           int c)
           throws SQLException
GetValue from the result set by position It must be the same implementation as getValue(org.ujorm.orm.metaModel.MetaColumn, java.sql.CallableStatement, int).

Parameters:
mColumn - Meta-model column, where the typeCode must be assigned before.
rs - The ResultSet instance
c - Database column index starting at #1
Returns:
Value form the result set.
Throws:
SQLException

getValue

J getValue(MetaColumn mColumn,
           CallableStatement rs,
           int c)
           throws SQLException
GetValue from the stored precedure by position. It must be the same implementation as getValue(org.ujorm.orm.metaModel.MetaColumn, java.sql.ResultSet, int).

Parameters:
mColumn - Meta-model column, where the typeCode must be assigned before.
rs - The CallableStatement instance
c - Catabase column index starting at #1
Returns:
Value form the result set.
Throws:
SQLException

setValue

void setValue(MetaColumn mColumn,
              PreparedStatement rs,
              J value,
              int c)
              throws SQLException
GetValue from the result set by position.

Parameters:
mColumn - Meta-model column, where the typeCode must be assigned before.
rs - PreparedStatement
value - Value to assign
c - The database column index starts at #1
Throws:
SQLException

getDbTypeClass

Class<D> getDbTypeClass(MetaColumn column)
Returns converted Java type to use in database DDL statements.



Copyright 2013, Pavel Ponec