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
ConstructorDescriptionStringBooleanRepresentation
(String trueRepresentation, String falseRepresentation) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoolean
(ResultSet rs, int columnIndex) Read the boolean from the given ResultSetgetRepresentation
(boolean bool) void
setBoolean
(PreparedStatement stmnt, int idx, boolean val) Set the boolean value into the statementtoString()
-
Constructor Details
-
StringBooleanRepresentation
-
-
Method Details
-
setBoolean
Description copied from interface:BooleanRepresentation
Set the boolean value into the statement- Specified by:
setBoolean
in interfaceBooleanRepresentation<String>
- Throws:
SQLException
-
getBoolean
Description copied from interface:BooleanRepresentation
Read the boolean from the given ResultSet- Specified by:
getBoolean
in interfaceBooleanRepresentation<String>
- Throws:
SQLException
-
getRepresentation
- Specified by:
getRepresentation
in interfaceBooleanRepresentation<String>
- Returns:
- return the representation for
true
andfalse
-
toString
-