Package io.github.sebasbaumh.postgis
Class PGgeometrybase
- java.lang.Object
-
- org.postgresql.util.PGobject
-
- io.github.sebasbaumh.postgis.PGgeometrybase
-
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
PGgeography
,PGgeometry
@NonNullByDefault public abstract class PGgeometrybase extends org.postgresql.util.PGobject
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:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PGgeometrybase()
Constructs an instance.protected
PGgeometrybase(Geometry geom)
Constructs an instance.protected
PGgeometrybase(String value)
Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Geometry
getGeometry()
Gets the underlyingGeometry
.int
getGeoType()
Gets the OGIS geometry type.String
getValue()
int
hashCode()
void
setGeometry(Geometry newgeom)
Sets the underlyingGeometry
.void
setValue(String value)
String
toString()
-
-
-
Field Detail
-
geometry
protected Geometry geometry
-
-
Constructor Detail
-
PGgeometrybase
protected PGgeometrybase()
Constructs an instance.
-
PGgeometrybase
protected PGgeometrybase(Geometry geom)
Constructs an instance.- Parameters:
geom
-Geometry
-
PGgeometrybase
protected PGgeometrybase(String value) throws SQLException
Constructs an instance.- Parameters:
value
- geometry- Throws:
SQLException
-
-
Method Detail
-
equals
public boolean equals(@Nullable Object obj)
- Overrides:
equals
in classorg.postgresql.util.PGobject
-
getGeoType
public int getGeoType()
Gets the OGIS geometry type.- Returns:
- geometry type
-
getValue
public String getValue()
- Overrides:
getValue
in classorg.postgresql.util.PGobject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classorg.postgresql.util.PGobject
-
setGeometry
public void setGeometry(Geometry newgeom)
Sets the underlyingGeometry
.- Parameters:
newgeom
-Geometry
-
setValue
public void setValue(@Nonnull String value) throws SQLException
- Overrides:
setValue
in classorg.postgresql.util.PGobject
- Throws:
SQLException
-
toString
public String toString()
- Overrides:
toString
in classorg.postgresql.util.PGobject
-
-