org.objectweb.jorm.runtime.mapper.rdb.adapter.api
Interface RdbAdpater

All Known Implementing Classes:
BasicRdbAdapter

public interface RdbAdpater


Method Summary
 int fetchResultSetSize(java.sql.ResultSet rs)
          This method calculates the size of a result set.
 java.math.BigDecimal getBigDecimal(java.sql.ResultSet rs, int idx)
           
 boolean getBoolean(java.sql.ResultSet rs, int idx)
           
 byte getByte(java.sql.ResultSet rs, int idx)
           
 byte[] getByteArray(java.sql.ResultSet rs, int idx)
           
 char getChar(java.sql.ResultSet rs, int idx)
           
 char[] getCharArray(java.sql.ResultSet rs, int idx)
           
 java.util.Date getDate(java.sql.ResultSet rs, int idx)
           
 double getDouble(java.sql.ResultSet rs, int idx)
           
 float getFloat(java.sql.ResultSet rs, int idx)
           
 int getInt(java.sql.ResultSet rs, int idx)
           
 long getLong(java.sql.ResultSet rs, int idx)
           
 java.lang.Object getObject(java.sql.ResultSet rs, int idx)
           
 java.lang.Boolean getOboolean(java.sql.ResultSet rs, int idx)
           
 java.lang.Byte getObyte(java.sql.ResultSet rs, int idx)
           
 java.lang.Character getOchar(java.sql.ResultSet rs, int idx)
           
 java.lang.Double getOdouble(java.sql.ResultSet rs, int idx)
           
 java.lang.Float getOfloat(java.sql.ResultSet rs, int idx)
           
 java.lang.Integer getOint(java.sql.ResultSet rs, int idx)
           
 java.lang.Long getOlong(java.sql.ResultSet rs, int idx)
           
 java.lang.Short getOshort(java.sql.ResultSet rs, int idx)
           
 short getShort(java.sql.ResultSet rs, int idx)
           
 java.lang.String getSqlGetterName(PType pt, java.lang.String resultSet, int idx)
          This method returns the sql getter method associated to the PType specified in parameter.
 java.lang.String getSqlSetterName(PType pt, java.lang.String value, int idx)
          This method returns the sql setter method associated to the PType specified in parameter.
 java.lang.String getSqlType(PType pt, boolean usedInPK)
          This method returns the SQL type linked to the PType specified in parameter.
 int getSqlTypeCode(PType pt)
          This method returns the SQL type code linked to the PType specified in parameter.
 java.lang.String getString(java.sql.ResultSet rs, int idx)
           
 java.lang.String getValueAsSQLString(boolean value)
          This method returns a String value that represents a boolean value.
 java.lang.String getValueAsSQLString(byte value)
          This method returns a String value that represents a byte value.
 java.lang.String getValueAsSQLString(char value)
          This method returns a String value that represents a char value.
 java.lang.String getValueAsSQLString(double value)
          This method returns a String value that represents a double value.
 java.lang.String getValueAsSQLString(float value)
          This method returns a String value that represents a float value.
 java.lang.String getValueAsSQLString(int value)
          This method returns a String value that represents a int value.
 java.lang.String getValueAsSQLString(long value)
          This method returns a String value that represents a long value.
 java.lang.String getValueAsSQLString(java.lang.Object value, PType type)
          This method returns a String value that represents a value.
 java.lang.String getValueAsSQLString(short value)
          This method returns a String value that represents a short value.
 

Method Detail

getSqlType

public java.lang.String getSqlType(PType pt,
                                   boolean usedInPK)
                            throws PExceptionProtocol
This method returns the SQL type linked to the PType specified in parameter.

getSqlGetterName

public java.lang.String getSqlGetterName(PType pt,
                                         java.lang.String resultSet,
                                         int idx)
                                  throws PExceptionProtocol
This method returns the sql getter method associated to the PType specified in parameter. The returned string is the fetching of the value on the resultset to the specified index: "@resultSet.getBoolean(@idx)"

getSqlSetterName

public java.lang.String getSqlSetterName(PType pt,
                                         java.lang.String value,
                                         int idx)
                                  throws PExceptionProtocol
This method returns the sql setter method associated to the PType specified in parameter. The returned string is the assignment of the value to the specified index: "setBoolean(@idx, @value)"

getValueAsSQLString

public java.lang.String getValueAsSQLString(java.lang.Object value,
                                            PType type)
This method returns a String value that represents a value. This method can be used for the constant parameters of SQL queries.
Parameters:
value -  
type - is the PType of the @value

getValueAsSQLString

public java.lang.String getValueAsSQLString(boolean value)
This method returns a String value that represents a boolean value. This method can be used for the constant parameters of SQL queries.

getValueAsSQLString

public java.lang.String getValueAsSQLString(byte value)
This method returns a String value that represents a byte value. This method can be used for the constant parameters of SQL queries.

getValueAsSQLString

public java.lang.String getValueAsSQLString(char value)
This method returns a String value that represents a char value. This method can be used for the constant parameters of SQL queries.

getValueAsSQLString

public java.lang.String getValueAsSQLString(short value)
This method returns a String value that represents a short value. This method can be used for the constant parameters of SQL queries.

getValueAsSQLString

public java.lang.String getValueAsSQLString(int value)
This method returns a String value that represents a int value. This method can be used for the constant parameters of SQL queries.

getValueAsSQLString

public java.lang.String getValueAsSQLString(long value)
This method returns a String value that represents a long value. This method can be used for the constant parameters of SQL queries.

getValueAsSQLString

public java.lang.String getValueAsSQLString(float value)
This method returns a String value that represents a float value. This method can be used for the constant parameters of SQL queries.

getValueAsSQLString

public java.lang.String getValueAsSQLString(double value)
This method returns a String value that represents a double value. This method can be used for the constant parameters of SQL queries.

getSqlTypeCode

public int getSqlTypeCode(PType pt)
                   throws PExceptionProtocol
This method returns the SQL type code linked to the PType specified in parameter.
Returns:
An int constant defined in the java.sql.Types class

fetchResultSetSize

public int fetchResultSetSize(java.sql.ResultSet rs)
                       throws java.sql.SQLException
This method calculates the size of a result set. If this feature is not supported by a database or its jdbc driver, this method returns -1.

getBoolean

public boolean getBoolean(java.sql.ResultSet rs,
                          int idx)
                   throws java.sql.SQLException

getOboolean

public java.lang.Boolean getOboolean(java.sql.ResultSet rs,
                                     int idx)
                              throws java.sql.SQLException

getChar

public char getChar(java.sql.ResultSet rs,
                    int idx)
             throws java.sql.SQLException

getOchar

public java.lang.Character getOchar(java.sql.ResultSet rs,
                                    int idx)
                             throws java.sql.SQLException

getByte

public byte getByte(java.sql.ResultSet rs,
                    int idx)
             throws java.sql.SQLException

getObyte

public java.lang.Byte getObyte(java.sql.ResultSet rs,
                               int idx)
                        throws java.sql.SQLException

getShort

public short getShort(java.sql.ResultSet rs,
                      int idx)
               throws java.sql.SQLException

getOshort

public java.lang.Short getOshort(java.sql.ResultSet rs,
                                 int idx)
                          throws java.sql.SQLException

getInt

public int getInt(java.sql.ResultSet rs,
                  int idx)
           throws java.sql.SQLException

getOint

public java.lang.Integer getOint(java.sql.ResultSet rs,
                                 int idx)
                          throws java.sql.SQLException

getLong

public long getLong(java.sql.ResultSet rs,
                    int idx)
             throws java.sql.SQLException

getOlong

public java.lang.Long getOlong(java.sql.ResultSet rs,
                               int idx)
                        throws java.sql.SQLException

getFloat

public float getFloat(java.sql.ResultSet rs,
                      int idx)
               throws java.sql.SQLException

getOfloat

public java.lang.Float getOfloat(java.sql.ResultSet rs,
                                 int idx)
                          throws java.sql.SQLException

getDouble

public double getDouble(java.sql.ResultSet rs,
                        int idx)
                 throws java.sql.SQLException

getOdouble

public java.lang.Double getOdouble(java.sql.ResultSet rs,
                                   int idx)
                            throws java.sql.SQLException

getString

public java.lang.String getString(java.sql.ResultSet rs,
                                  int idx)
                           throws java.sql.SQLException

getDate

public java.util.Date getDate(java.sql.ResultSet rs,
                              int idx)
                       throws java.sql.SQLException

getBigDecimal

public java.math.BigDecimal getBigDecimal(java.sql.ResultSet rs,
                                          int idx)
                                   throws java.sql.SQLException

getCharArray

public char[] getCharArray(java.sql.ResultSet rs,
                           int idx)
                    throws java.sql.SQLException

getByteArray

public byte[] getByteArray(java.sql.ResultSet rs,
                           int idx)
                    throws java.sql.SQLException

getObject

public java.lang.Object getObject(java.sql.ResultSet rs,
                                  int idx)
                           throws java.sql.SQLException