public class PGobject
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
type |
protected java.lang.String |
value |
Constructor and Description |
---|
PGobject()
This is called by org.postgresql.Connection.getObject() to create the
object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
This must be overidden to allow the object to be cloned
|
boolean |
equals(java.lang.Object obj)
This must be overidden to allow comparisons of objects
|
java.lang.String |
getType()
As this cannot change during the life of the object, it's final.
|
java.lang.String |
getValue()
This must be overidden, to return the value of the object, in the
form required by org.postgresql.
|
int |
hashCode()
Compute hash.
|
void |
setType(java.lang.String type)
This method sets the type of this object.
|
void |
setValue(java.lang.String value)
This method sets the value of this object.
|
java.lang.String |
toString()
This is defined here, so user code need not overide it.
|
public PGobject()
public final void setType(java.lang.String type)
It should not be extended by subclasses, hence its final
type
- a string describing the type of the objectpublic void setValue(java.lang.String value) throws java.sql.SQLException
value
- a string representation of the value of the objectjava.sql.SQLException
- thrown if value is invalid for this typepublic final java.lang.String getType()
public java.lang.String getValue()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to compare withpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Objects.hashCode(Object)