org.compass.gps.device.jdbc.dialect
Class DefaultJdbcDialect

java.lang.Object
  extended by org.compass.gps.device.jdbc.dialect.DefaultJdbcDialect
All Implemented Interfaces:
JdbcDialect
Direct Known Subclasses:
OracleJdbcDialect

public class DefaultJdbcDialect
extends Object
implements JdbcDialect

Author:
kimchy

Constructor Summary
DefaultJdbcDialect()
           
 
Method Summary
protected  Long getBigIntAsLong(ResultSet rs, ColumnMapping columnMapping)
           
protected  Long getDateAsLong(ResultSet rs, ColumnMapping columnMapping)
           
protected  Long getIntegerAsLong(ResultSet rs, ColumnMapping columnMapping)
           
protected  Long getLong(ResultSet rs, ColumnMapping columnMapping)
           
protected  Long getNumericAsLong(ResultSet rs, ColumnMapping columnMapping)
           
 String getStringValue(ResultSet rs, ColumnMapping mapping)
          Returns the String value for the given column mapping.
 String getStringValue(ResultSet rs, int columnIndex)
          Returns the String value for the given column index.
protected  Long getTimeAsLong(ResultSet rs, ColumnMapping columnMapping)
           
protected  Long getTimestampAsLong(ResultSet rs, ColumnMapping columnMapping)
           
 Long getVersion(ResultSet rs, VersionColumnMapping versionMapping)
          Returns the version value of the given version mapping.
 void setParameter(PreparedStatement ps, int paramIndex, String value)
          Sets the paremeter value for the given parameter index and the PreparedStatement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJdbcDialect

public DefaultJdbcDialect()
Method Detail

getIntegerAsLong

protected Long getIntegerAsLong(ResultSet rs,
                                ColumnMapping columnMapping)
                         throws SQLException
Throws:
SQLException

getNumericAsLong

protected Long getNumericAsLong(ResultSet rs,
                                ColumnMapping columnMapping)
                         throws SQLException
Throws:
SQLException

getLong

protected Long getLong(ResultSet rs,
                       ColumnMapping columnMapping)
                throws SQLException
Throws:
SQLException

getDateAsLong

protected Long getDateAsLong(ResultSet rs,
                             ColumnMapping columnMapping)
                      throws SQLException
Throws:
SQLException

getTimeAsLong

protected Long getTimeAsLong(ResultSet rs,
                             ColumnMapping columnMapping)
                      throws SQLException
Throws:
SQLException

getTimestampAsLong

protected Long getTimestampAsLong(ResultSet rs,
                                  ColumnMapping columnMapping)
                           throws SQLException
Throws:
SQLException

getBigIntAsLong

protected Long getBigIntAsLong(ResultSet rs,
                               ColumnMapping columnMapping)
                        throws SQLException
Throws:
SQLException

getVersion

public Long getVersion(ResultSet rs,
                       VersionColumnMapping versionMapping)
                throws SQLException
Description copied from interface: JdbcDialect
Returns the version value of the given version mapping. It is always a long value.

Specified by:
getVersion in interface JdbcDialect
Throws:
SQLException

setParameter

public void setParameter(PreparedStatement ps,
                         int paramIndex,
                         String value)
                  throws SQLException
Description copied from interface: JdbcDialect
Sets the paremeter value for the given parameter index and the PreparedStatement.

Specified by:
setParameter in interface JdbcDialect
Throws:
SQLException

getStringValue

public String getStringValue(ResultSet rs,
                             ColumnMapping mapping)
                      throws SQLException
Description copied from interface: JdbcDialect
Returns the String value for the given column mapping. Will return null if the column value is null.

Specified by:
getStringValue in interface JdbcDialect
Throws:
SQLException

getStringValue

public String getStringValue(ResultSet rs,
                             int columnIndex)
                      throws SQLException
Description copied from interface: JdbcDialect
Returns the String value for the given column index. Will return null if the column value is null.

Specified by:
getStringValue in interface JdbcDialect
Throws:
SQLException


Copyright (c) 2004-2009 The Compass Project.