java.lang.Object
org.jooq.util.postgres.PGobject
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
PGInterval
PGobject is a class used to describe unknown types An unknown type is any type that is unknown by
JDBC Standards.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPGobject()
This is called by org.postgresql.Connection.getObject() to create the object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
This must be overidden to allow the object to be cloned.boolean
This must be overidden to allow comparisons of objects.protected static boolean
final String
getType()
As this cannot change during the life of the object, it's final.getValue()
This must be overidden, to return the value of the object, in the form required by org.postgresql.int
hashCode()
Compute hash.boolean
isNull()
Returns true if the current object wraps `null` value.final void
This method sets the type of this object.void
This method sets the value of this object.toString()
This is defined here, so user code need not overide it.
-
Field Details
-
type
-
value
-
-
Constructor Details
-
PGobject
public PGobject()This is called by org.postgresql.Connection.getObject() to create the object.
-
-
Method Details
-
setType
This method sets the type of this object.
It should not be extended by subclasses, hence it is final
- Parameters:
type
- a string describing the type of the object
-
setValue
This method sets the value of this object. It must be overridden.- Parameters:
value
- a string representation of the value of the object- Throws:
SQLException
- thrown if value is invalid for this type
-
getType
As this cannot change during the life of the object, it's final.- Returns:
- the type name of this object
-
getValue
This must be overidden, to return the value of the object, in the form required by org.postgresql.- Returns:
- the value of this object
-
isNull
public boolean isNull()Returns true if the current object wraps `null` value. This might be helpful- Returns:
- true if the current object wraps `null` value.
-
equals
This must be overidden to allow comparisons of objects. -
clone
This must be overidden to allow the object to be cloned.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
toString
This is defined here, so user code need not overide it. -
hashCode
public int hashCode()Compute hash. As equals() use only value. Return the same hash for the same value.- Overrides:
hashCode
in classObject
- Returns:
- Value hashcode, 0 if value is null
Objects.hashCode(Object)
-
equals
-