org.objectweb.jorm.runtime.mapper.rdb.adapter.lib
Class PostgresAdapter

java.lang.Object
  |
  +--org.objectweb.jorm.runtime.mapper.rdb.adapter.lib.BasicRdbAdapter
        |
        +--org.objectweb.jorm.runtime.mapper.rdb.adapter.lib.PostgresAdapter
All Implemented Interfaces:
RdbAdpater

public class PostgresAdapter
extends BasicRdbAdapter


Constructor Summary
PostgresAdapter()
           
 
Method Summary
 int fetchResultSetSize(java.sql.ResultSet rs)
          This calculates the size of a result set.
 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 getSqlType(PType pt, boolean usedInPK)
          This method returns the SQL type linked to the PType specified in parameter.
 
Methods inherited from class org.objectweb.jorm.runtime.mapper.rdb.adapter.lib.BasicRdbAdapter
getBigDecimal, getBoolean, getByte, getByteArray, getChar, getCharArray, getDate, getDouble, getFloat, getInt, getLong, getObject, getOboolean, getObyte, getOchar, getOdouble, getOfloat, getOint, getOlong, getOshort, getShort, getSqlSetterName, getSqlTypeCode, getString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresAdapter

public PostgresAdapter()
Method Detail

getSqlType

public java.lang.String getSqlType(PType pt,
                                   boolean usedInPK)
                            throws PExceptionProtocol
Description copied from interface: RdbAdpater
This method returns the SQL type linked to the PType specified in parameter.
Overrides:
getSqlType in class BasicRdbAdapter

fetchResultSetSize

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

getSqlGetterName

public java.lang.String getSqlGetterName(PType pt,
                                         java.lang.String resultSet,
                                         int idx)
                                  throws PExceptionProtocol
Description copied from interface: RdbAdpater
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)"
Overrides:
getSqlGetterName in class BasicRdbAdapter