Top Description Fields Constructors Methods
org.jooq.util.postgres

public Class PGobject

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Known Direct Subclasses
org.jooq.util.postgres.PGInterval
Annotations
@Internal
Imports
java.io.Serializable, java.sql.SQLException, org.jetbrains.annotations.ApiStatus.Internal

PGobject is a class used to describe unknown types An unknown type is any type that is unknown by JDBC Standards.

Field Summary

Modifier and TypeField and Description
protected String
protected String

Constructor Summary

AccessConstructor and Description
public
PGobject()

This is called by org.postgresql.Connection.getObject() to create the object.

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

This must be overidden to allow the object to be cloned.
public boolean

Returns:

true if the two boxes are identical
equals
(Object
Object to compare with
obj
)

Overrides java.lang.Object.equals.

This must be overidden to allow comparisons of objects.
protected static boolean
public final String

Returns:

the type name of this object
getType
()

As this cannot change during the life of the object, it's final.

public String

Returns:

the value of this object
getValue
()

This must be overidden, to return the value of the object, in the form required by org.postgresql.

public int

Returns:

Value hashcode, 0 if value is null java.util.Objects#hashCode(Object)
hashCode
()

Overrides java.lang.Object.hashCode.

Compute hash.
public boolean

Returns:

true if the current object wraps `null` value.
isNull
()

Returns true if the current object wraps `null` value.

public final void
setType(String
a string describing the type of the object
type
)

This method sets the type of this object.

public void
setValue(String
a string representation of the value of the object
value
)

This method sets the value of this object.

public String

Returns:

the value of this object, in the syntax expected by org.postgresql
toString
()

Overrides java.lang.Object.toString.

This is defined here, so user code need not overide it.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

typeback to summary
protected String type
valueback to summary
protected String value

Constructor Detail

PGobjectback to summary
public PGobject()

This is called by org.postgresql.Connection.getObject() to create the object.

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

This must be overidden to allow the object to be cloned.

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
Exceptions
CloneNotSupportedException:

Doc from java.lang.Object.clone.

if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

This must be overidden to allow comparisons of objects.

Parameters
obj:Object

Object to compare with

Returns:boolean

true if the two boxes are identical

Annotations
@Override
equalsback to summary
protected static boolean equals(Object a, Object b)
getTypeback to summary
public final String getType()

As this cannot change during the life of the object, it's final.

Returns:String

the type name of this object

getValueback to summary
public String getValue()

This must be overidden, to return the value of the object, in the form required by org.postgresql.

Returns:String

the value of this object

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Compute hash. As equals() use only value. Return the same hash for the same value.

Returns:int

Value hashcode, 0 if value is null java.util.Objects#hashCode(Object)

Annotations
@Override
isNullback to summary
public boolean isNull()

Returns true if the current object wraps `null` value. This might be helpful

Returns:boolean

true if the current object wraps `null` value.

setTypeback to summary
public final void setType(String type)

This method sets the type of this object.

It should not be extended by subclasses, hence it is final

Parameters
type:String

a string describing the type of the object

setValueback to summary
public void setValue(String value) throws SQLException

This method sets the value of this object. It must be overridden.

Parameters
value:String

a string representation of the value of the object

Exceptions
SQLException:
thrown if value is invalid for this type
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

This is defined here, so user code need not overide it.

Returns:String

the value of this object, in the syntax expected by org.postgresql

Annotations
@Override