public class RedshiftBox extends RedshiftObject implements RedshiftBinaryObject, Serializable, Cloneable
| Modifier and Type | Field and Description |
|---|---|
RedshiftPoint[] |
point
These are the two points.
|
type, value| Constructor and Description |
|---|
RedshiftBox()
Required constructor.
|
RedshiftBox(double x1,
double y1,
double x2,
double y2) |
RedshiftBox(RedshiftPoint p1,
RedshiftPoint p2) |
RedshiftBox(String s) |
| 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 |
getValue()
This must be overidden, to return the value of the object, in the form required by
com.amazon.redshift.
|
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 com.amazon.redshift.
|
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
com.amazon.redshift.
|
getType, setType, toStringpublic RedshiftPoint[] point
public RedshiftBox(double x1,
double y1,
double x2,
double y2)
x1 - first x coordinatey1 - first y coordinatex2 - second x coordinatey2 - second y coordinatepublic RedshiftBox(RedshiftPoint p1, RedshiftPoint p2)
p1 - first pointp2 - second pointpublic RedshiftBox(String s) throws SQLException
s - Box definition in Redshift syntaxSQLException - if definition is invalidpublic RedshiftBox()
public void setValue(String value) throws SQLException
setValue in class RedshiftObjectvalue - a string representation of the value of the objectSQLException - thrown if value is invalid for this typepublic void setByteValue(byte[] b,
int offset)
RedshiftBinaryObjectsetByteValue in interface RedshiftBinaryObjectb - Definition of this point in Redshift's binary syntaxoffset - the offset in the byte array where object data startspublic boolean equals(Object obj)
RedshiftObjectequals in class RedshiftObjectobj - Object to compare withpublic int hashCode()
RedshiftObjecthashCode in class RedshiftObjectObjects.hashCode(Object)public Object clone() throws CloneNotSupportedException
RedshiftObjectclone in class RedshiftObjectCloneNotSupportedExceptionpublic String getValue()
RedshiftObjectgetValue in class RedshiftObjectpublic int lengthInBytes()
RedshiftBinaryObjectlengthInBytes in interface RedshiftBinaryObjectpublic void toBytes(byte[] bytes,
int offset)
RedshiftBinaryObjecttoBytes in interface RedshiftBinaryObjectbytes - the array to store the value, it is guaranteed to be at lest
RedshiftBinaryObject.lengthInBytes() in size.offset - the offset in the byte array where object must be storedCopyright © 2024 Amazon.com Inc.. All rights reserved.