public abstract class AbstractSpatialInsertGenerator extends InsertGenerator implements WktInsertOrUpdateGenerator
AbstractSpatialInsertGenerator
convert a Well-Known Text string
and EPSG SRID string to the database-specific geometry.Constructor and Description |
---|
AbstractSpatialInsertGenerator() |
Modifier and Type | Method and Description |
---|---|
String |
convertToFunction(String wkt,
String srid,
Database database)
Converts the given Well-Known Text and SRID to the appropriate function call for the database.
|
Sql[] |
generateSql(InsertStatement statement,
Database database,
SqlGeneratorChain sqlGeneratorChain)
Find any fields that look like WKT or EWKT and replace them with the database-specific value.
|
int |
getPriority() |
protected Object |
handleColumnValue(Object oldValue,
Database database)
If the old value is a geometry or a Well-Known Text, convert it to the appropriate new value.
|
boolean |
isSridRequiredInFunction(Database database)
Indicates if the SRID parameter is required in the function returned from
WktInsertOrUpdateGenerator.getGeomFromWktFunction() . |
boolean |
looksLikeFunctionCall(String value,
Database database) |
ValidationErrors |
validate(InsertStatement statement,
Database database,
SqlGeneratorChain sqlGeneratorChain) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGeomFromWktFunction
public int getPriority()
public ValidationErrors validate(InsertStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)
public Sql[] generateSql(InsertStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)
public boolean looksLikeFunctionCall(String value, Database database)
liquibase.sqlgenerator.core.AbstractSqlGenerator#looksLikeFunctionCall(java.lang.String,
liquibase.database.Database)
public boolean isSridRequiredInFunction(Database database)
WktInsertOrUpdateGenerator.getGeomFromWktFunction()
.isSridRequiredInFunction
in interface WktInsertOrUpdateGenerator
database
- the database instance.true
if the SRID parameter is required in order to invoke the function.protected Object handleColumnValue(Object oldValue, Database database)
oldValue
- the old value.database
- the database instance.public String convertToFunction(String wkt, String srid, Database database)
WktInsertOrUpdateGenerator
convertToFunction
in interface WktInsertOrUpdateGenerator
wkt
- the Well-Known Text string.srid
- the SRID string which may be an empty string.database
- the database instance.Copyright © 2014–2015. All rights reserved.