Package io.github.sebasbaumh.postgis
Class PGgeometrybase
java.lang.Object
org.postgresql.util.PGobject
io.github.sebasbaumh.postgis.PGgeometrybase
- All Implemented Interfaces:
Serializable,Cloneable,org.postgresql.util.PGBinaryObject
- Direct Known Subclasses:
PGgeography,PGgeometry
@NonNullByDefault({PARAMETER,RETURN_TYPE})
public abstract class PGgeometrybase
extends org.postgresql.util.PGobject
implements org.postgresql.util.PGBinaryObject
A PostgreSQL JDBC
PGobject extension data type modeling a "geo" type. This class serves as a common
superclass for classes such as PGgeometry and PGgeography which model more specific type semantics.- Author:
- Phillip Ross
- See Also:
-
Field Summary
FieldsFields inherited from class org.postgresql.util.PGobject
type, value -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPGgeometrybase(String type) Constructs an instance.protectedPGgeometrybase(String type, Geometry geom) Constructs an instance.protectedPGgeometrybase(String type, String value) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanGets the underlyingGeometry.getValue()inthashCode()intvoidsetByteValue(byte[] value, int offset) voidsetGeometry(Geometry newgeom) Sets the underlyingGeometry.voidvoidtoBytes(byte[] bytes, int offset) toString()Methods inherited from class org.postgresql.util.PGobject
equals, getType, isNull, setType
-
Field Details
-
geometry
Underlying geometry.
-
-
Constructor Details
-
PGgeometrybase
Constructs an instance.- Parameters:
type- type of thisPGobject
-
PGgeometrybase
Constructs an instance.- Parameters:
type- type of thisPGobjectgeom-Geometry
-
PGgeometrybase
Constructs an instance.- Parameters:
type- type of thisPGobjectvalue- geometry- Throws:
SQLException
-
-
Method Details
-
clone
- Overrides:
clonein classorg.postgresql.util.PGobject- Throws:
CloneNotSupportedException
-
equals
- Overrides:
equalsin classorg.postgresql.util.PGobject
-
getGeometry
Gets the underlyingGeometry.- Returns:
Geometryon success, else null
-
getValue
- Overrides:
getValuein classorg.postgresql.util.PGobject
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.postgresql.util.PGobject
-
lengthInBytes
public int lengthInBytes()- Specified by:
lengthInBytesin interfaceorg.postgresql.util.PGBinaryObject
-
setByteValue
- Specified by:
setByteValuein interfaceorg.postgresql.util.PGBinaryObject- Throws:
SQLException
-
setGeometry
Sets the underlyingGeometry.- Parameters:
newgeom-Geometry(can be null)
-
setValue
- Overrides:
setValuein classorg.postgresql.util.PGobject- Throws:
SQLException
-
toBytes
public void toBytes(byte[] bytes, int offset) - Specified by:
toBytesin interfaceorg.postgresql.util.PGBinaryObject
-
toString
- Overrides:
toStringin classorg.postgresql.util.PGobject
-