KeyGeneratorTypeHandler<java.lang.Short>
public final class KeyGeneratorTypeHandlerShort extends java.lang.Object implements KeyGeneratorTypeHandler<java.lang.Short>
KeyGeneratorTypeHandler
for Short
type.Constructor | Description |
---|---|
KeyGeneratorTypeHandlerShort(boolean fail) |
Construct an type handler for Short values.
|
KeyGeneratorTypeHandlerShort(boolean fail,
int allocationSize) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Short |
add(java.lang.Short value,
int offset) |
Adds the new Type Handler of type T to the provided handler instance at
the provided offset.
|
void |
bindValue(java.sql.PreparedStatement stmt,
int index,
java.lang.Short value) |
Binds the value in the sql preparedstatement at the provided index
location.
|
java.lang.Short |
getNextValue(java.sql.ResultSet rs) |
Gets the value from resultset by calling getValue method and then
calls the increment method to increment the extracted value.
|
java.lang.Short |
getValue(java.sql.ResultSet rs) |
Reads the resultset and return the extracted typehandler value from the
resultset.
|
java.lang.Short |
increment(java.lang.Short value) |
Increments the provided value by ONE.
|
public KeyGeneratorTypeHandlerShort(boolean fail)
fail
- true
if the type handler should fail when current
row of the record set is not valid, false
otherwise.public KeyGeneratorTypeHandlerShort(boolean fail, int allocationSize)
public java.lang.Short getNextValue(java.sql.ResultSet rs) throws PersistenceException, java.sql.SQLException
getNextValue
in interface KeyGeneratorTypeHandler<java.lang.Short>
rs
- A ResultSet object.PersistenceException
- If ResultSet is empty or if the type handler
should fail when current row of the record set is not valid,java.sql.SQLException
- If database error occurs.public java.lang.Short getValue(java.sql.ResultSet rs) throws PersistenceException, java.sql.SQLException
getValue
in interface KeyGeneratorTypeHandler<java.lang.Short>
rs
- ResultSet objectPersistenceException
- If ResultSet is empty or if the type handler
should fail when current row of the record set is not valid,java.sql.SQLException
- If database error occurs.public java.lang.Short increment(java.lang.Short value)
increment
in interface KeyGeneratorTypeHandler<java.lang.Short>
value
- value to be incremented.public java.lang.Short add(java.lang.Short value, int offset)
add
in interface KeyGeneratorTypeHandler<java.lang.Short>
value
- Handler instance in which new value will be addedoffset
- Offset location. *public void bindValue(java.sql.PreparedStatement stmt, int index, java.lang.Short value) throws java.sql.SQLException
bindValue
in interface KeyGeneratorTypeHandler<java.lang.Short>
stmt
- A SQL PreparedStatement.index
- Index location for binding parameter to statement.value
- Value to be bindedjava.sql.SQLException
- If SQL error occurs in binding param to sql statement.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com