Package org.postgresql.jdbc
Class BooleanTypeUtil
- java.lang.Object
-
- org.postgresql.jdbc.BooleanTypeUtil
-
class BooleanTypeUtil extends java.lang.ObjectHelper class to handle boolean type of PostgreSQL.
Based on values accepted by the PostgreSQL server: https://www.postgresql.org/docs/current/static/datatype-boolean.html
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.LoggerLOGGER
-
Constructor Summary
Constructors Modifier Constructor Description privateBooleanTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static PSQLExceptioncannotCoerceException(java.lang.Object value)(package private) static booleancastToBoolean(java.lang.Object in)Cast an Object value to the corresponding boolean value.private static booleanfromCharacter(java.lang.Character charval)private static booleanfromNumber(java.lang.Number numval)(package private) static booleanfromString(java.lang.String strval)
-
-
-
Method Detail
-
castToBoolean
static boolean castToBoolean(java.lang.Object in) throws PSQLExceptionCast an Object value to the corresponding boolean value.- Parameters:
in- Object to cast into boolean- Returns:
- boolean value corresponding to the cast of the object
- Throws:
PSQLException- PSQLState.CANNOT_COERCE
-
fromString
static boolean fromString(java.lang.String strval) throws PSQLException- Throws:
PSQLException
-
fromCharacter
private static boolean fromCharacter(java.lang.Character charval) throws PSQLException- Throws:
PSQLException
-
fromNumber
private static boolean fromNumber(java.lang.Number numval) throws PSQLException- Throws:
PSQLException
-
cannotCoerceException
private static PSQLException cannotCoerceException(java.lang.Object value)
-
-