public class PGobject extends Object implements Serializable, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
struct
when the object is a custom type is used to save its structure
|
protected String |
type |
protected String |
value |
| Constructor and Description |
|---|
PGobject()
This is called by org.postgresql.Connection.getObject() to create the object.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
This must be overidden to allow the object to be cloned.
|
boolean |
equals(Object obj)
This must be overidden to allow comparisons of objects.
|
String[] |
getArrayValue()
parse string to array
|
Object[] |
getStruct()
As this cannot change during the life of the object, it's final.
|
String |
getType()
As this cannot change during the life of the object, it's final.
|
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 |
setStruct(Object[] struct)
This method sets the struct of this object.
|
void |
setType(String type)
This method sets the type of this object.
|
void |
setValue(String value)
This method sets the value of this object.
|
String |
toString()
This is defined here, so user code need not overide it.
|
protected String type
protected String value
protected Object[] struct
public PGobject()
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
type - a string describing the type of the objectpublic void setValue(String value) throws SQLException
value - a string representation of the value of the objectSQLException - thrown if value is invalid for this typepublic final String getType()
public String getValue()
public final void setStruct(Object[] struct)
This method sets the struct of this object.
It should not be extended by subclasses, hence it is final
struct - struct a Object[] describing the struct of the objectpublic final Object[] getStruct()
public String[] getArrayValue()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String toString()
public int hashCode()
hashCode in class ObjectObjects.hashCode(Object)Copyright © 2023 openGauss. All rights reserved.