|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.postgresql.util.PGobject
org.postgresql.geometric.PGbox
public class PGbox
This represents the box datatype within org.postgresql.
| Field Summary | |
|---|---|
PGpoint[] |
point
These are the two points. |
| Fields inherited from class org.postgresql.util.PGobject |
|---|
type, value |
| Constructor Summary | |
|---|---|
PGbox()
Required constructor |
|
PGbox(double x1,
double y1,
double x2,
double y2)
|
|
PGbox(PGpoint p1,
PGpoint p2)
|
|
PGbox(String s)
|
|
| Method Summary | |
|---|---|
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 |
getValue()
This must be overidden, to return the value of the object, in the form required by org.postgresql. |
int |
hashCode()
Compute hash. |
int |
lengthInBytes()
This method is called to return the number of bytes needed to store this object in the binary form required by org.postgresql. |
void |
setByteValue(byte[] b,
int offset)
This method is called to set the value of this object. |
void |
setValue(String value)
This method sets the value of this object. |
void |
toBytes(byte[] bytes,
int offset)
This method is called the to store the value of the object, in the binary form required by org.postgresql. |
| Methods inherited from class org.postgresql.util.PGobject |
|---|
getType, setType, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public PGpoint[] point
| Constructor Detail |
|---|
public PGbox(double x1,
double y1,
double x2,
double y2)
x1 - first x coordinatey1 - first y coordinatex2 - second x coordinatey2 - second y coordinate
public PGbox(PGpoint p1,
PGpoint p2)
p1 - first pointp2 - second point
public PGbox(String s)
throws SQLException
s - Box definition in PostgreSQL syntax
SQLException - if definition is invalidpublic PGbox()
| Method Detail |
|---|
public void setValue(String value)
throws SQLException
setValue in class PGobjectvalue - a string representation of the value of the object
SQLException - thrown if value is invalid for this type
public void setByteValue(byte[] b,
int offset)
PGBinaryObject
setByteValue in interface PGBinaryObjectb - Definition of this point in PostgreSQL's binary syntaxoffset - the offset in the byte array where object data startspublic boolean equals(Object obj)
PGobject
equals in class PGobjectobj - Object to compare with
public int hashCode()
PGobject
hashCode in class PGobjectObjects
public Object clone()
throws CloneNotSupportedException
PGobject
clone in class PGobjectCloneNotSupportedExceptionpublic String getValue()
PGobject
getValue in class PGobjectpublic int lengthInBytes()
PGBinaryObject
lengthInBytes in interface PGBinaryObject
public void toBytes(byte[] bytes,
int offset)
PGBinaryObject
toBytes in interface PGBinaryObjectbytes - the array to store the value, it is guaranteed to be at lest
PGBinaryObject.lengthInBytes() in size.offset - the offset in the byte array where object must be stored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||