The following document contains the results of PMD's CPD 5.0.2.
File | Line |
---|---|
liquibase\ext\spatial\sqlgenerator\AbstractSpatialInsertGenerator.java | 37 |
liquibase\ext\spatial\sqlgenerator\AbstractSpatialUpdateGenerator.java | 37 |
for (final Entry<String, Object> entry : statement.getColumnValues().entrySet()) { entry.setValue(handleColumnValue(entry.getValue(), database)); } return super.generateSql(statement, database, sqlGeneratorChain); } /** * @see liquibase.sqlgenerator.core.AbstractSqlGenerator#looksLikeFunctionCall(java.lang.String, * liquibase.database.Database) */ @Override public boolean looksLikeFunctionCall(final String value, final Database database) { final boolean result; if (value.trim().toUpperCase().startsWith(getGeomFromWktFunction().trim().toUpperCase())) { result = true; } else { result = super.looksLikeFunctionCall(value, database); } return result; } /** * Indicates if the SRID parameter is required in the function returned from * {@link #getGeomFromWktFunction()}. * * @param database * the database instance. * * @return <code>true</code> if the SRID parameter is required in order to invoke the function. */ @Override public boolean isSridRequiredInFunction(final Database database) { return false; } /** * If the old value is a geometry or a Well-Known Text, convert it to the appropriate new value. * Otherwise, this method returns the old value. * * @param oldValue * the old value. * @param database * the database instance. * * @return the new value. */ protected Object handleColumnValue(final Object oldValue, final Database database) { final Object newValue = WktConversionUtils.handleColumnValue(oldValue, database, this); return newValue; } /** * @param wkt * the Well-Known Text string. * @param srid * the SRID string which may be an empty string. * @param database * the database instance. * @return the string that converts the WKT to a database-specific geometry. */ @Override public String convertToFunction(final String wkt, final String srid, final Database database) { final String function = WktConversionUtils.convertToFunction(wkt, srid, database, this); return function; } } |