Package org.apache.openjpa.jdbc.sql
Class BooleanRepresentationFactory.StringBooleanRepresentation
- java.lang.Object
-
- org.apache.openjpa.jdbc.sql.BooleanRepresentationFactory.StringBooleanRepresentation
-
- All Implemented Interfaces:
BooleanRepresentation<String>
- Enclosing class:
- BooleanRepresentationFactory
public static class BooleanRepresentationFactory.StringBooleanRepresentation extends Object implements BooleanRepresentation<String>
BooleanRepresentation which takes 2 strings for true and false representations as constructor parameter;
-
-
Constructor Summary
Constructors Constructor Description StringBooleanRepresentation(String trueRepresentation, String falseRepresentation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBoolean(ResultSet rs, int columnIndex)Read the boolean from the given ResultSetStringgetRepresentation(boolean bool)voidsetBoolean(PreparedStatement stmnt, int idx, boolean val)Set the boolean value into the statementStringtoString()
-
-
-
Method Detail
-
setBoolean
public void setBoolean(PreparedStatement stmnt, int idx, boolean val) throws SQLException
Description copied from interface:BooleanRepresentationSet the boolean value into the statement- Specified by:
setBooleanin interfaceBooleanRepresentation<String>- Throws:
SQLException
-
getBoolean
public boolean getBoolean(ResultSet rs, int columnIndex) throws SQLException
Description copied from interface:BooleanRepresentationRead the boolean from the given ResultSet- Specified by:
getBooleanin interfaceBooleanRepresentation<String>- Throws:
SQLException
-
getRepresentation
public String getRepresentation(boolean bool)
- Specified by:
getRepresentationin interfaceBooleanRepresentation<String>- Returns:
- return the representation for
trueandfalse
-
-