org.mentabean.type
Class BigDecimalType

java.lang.Object
  extended by org.mentabean.type.BigDecimalType
All Implemented Interfaces:
DBType<BigDecimal>

public class BigDecimalType
extends Object
implements DBType<BigDecimal>


Constructor Summary
BigDecimalType()
           
 
Method Summary
 void bindToStmt(PreparedStatement stmt, int index, BigDecimal value)
          Do what you have to do to bind a value to a prepared statement.
 BigDecimal getFromResultSet(ResultSet rset, int index)
          Do what you have to do to get and return this database type from a result set.
 BigDecimal getFromResultSet(ResultSet rset, String field)
          Do what you have to do to get and return this database type from a result set.
 Class<? extends Object> getTypeClass()
          Return the java type representing this database type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigDecimalType

public BigDecimalType()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getFromResultSet

public BigDecimal getFromResultSet(ResultSet rset,
                                   int index)
                            throws SQLException
Description copied from interface: DBType
Do what you have to do to get and return this database type from a result set.

Specified by:
getFromResultSet in interface DBType<BigDecimal>
Parameters:
rset - The result set
index - The index in the result set
Returns:
The value from the result set
Throws:
SQLException

getFromResultSet

public BigDecimal getFromResultSet(ResultSet rset,
                                   String field)
                            throws SQLException
Description copied from interface: DBType
Do what you have to do to get and return this database type from a result set.

Specified by:
getFromResultSet in interface DBType<BigDecimal>
Parameters:
rset - The result set
field - The name of the field in the result set
Returns:
The value from the result set
Throws:
SQLException

getTypeClass

public Class<? extends Object> getTypeClass()
Description copied from interface: DBType
Return the java type representing this database type.

Specified by:
getTypeClass in interface DBType<BigDecimal>
Returns:
The java type of this database type.

bindToStmt

public void bindToStmt(PreparedStatement stmt,
                       int index,
                       BigDecimal value)
                throws SQLException
Description copied from interface: DBType
Do what you have to do to bind a value to a prepared statement.

Specified by:
bindToStmt in interface DBType<BigDecimal>
Parameters:
stmt - The prepared statement
index - The index in the prepared statement
value - The value to be bound to the prepared statement
Throws:
SQLException


Copyright © 2011. All Rights Reserved.