Search in sources :

Example 6 with EnvelopeIntersects

use of com.revolsys.record.query.functions.EnvelopeIntersects in project com.revolsys.open by revolsys.

the class PostgreSQLRecordStore method appendQueryValue.

@Override
public void appendQueryValue(final Query query, final StringBuilder sql, final QueryValue queryValue) {
    if (queryValue instanceof EnvelopeIntersects) {
        final EnvelopeIntersects envelopeIntersects = (EnvelopeIntersects) queryValue;
        final QueryValue boundingBox1Value = envelopeIntersects.getBoundingBox1Value();
        if (boundingBox1Value == null) {
            sql.append("NULL");
        } else {
            boundingBox1Value.appendSql(query, this, sql);
        }
        sql.append(" && ");
        final QueryValue boundingBox2Value = envelopeIntersects.getBoundingBox2Value();
        if (boundingBox2Value == null) {
            sql.append("NULL");
        } else {
            boundingBox2Value.appendSql(query, this, sql);
        }
    } else {
        super.appendQueryValue(query, sql, queryValue);
    }
}
Also used : EnvelopeIntersects(com.revolsys.record.query.functions.EnvelopeIntersects) QueryValue(com.revolsys.record.query.QueryValue)

Aggregations

EnvelopeIntersects (com.revolsys.record.query.functions.EnvelopeIntersects)6 QueryValue (com.revolsys.record.query.QueryValue)3 WithinDistance (com.revolsys.record.query.functions.WithinDistance)3 AbstractMultiCondition (com.revolsys.record.query.AbstractMultiCondition)2 BinaryCondition (com.revolsys.record.query.BinaryCondition)2 CollectionValue (com.revolsys.record.query.CollectionValue)2 Column (com.revolsys.record.query.Column)2 ILike (com.revolsys.record.query.ILike)2 LeftUnaryCondition (com.revolsys.record.query.LeftUnaryCondition)2 Like (com.revolsys.record.query.Like)2 RightUnaryCondition (com.revolsys.record.query.RightUnaryCondition)2 SqlCondition (com.revolsys.record.query.SqlCondition)2 Value (com.revolsys.record.query.Value)2 FieldDefinition (com.revolsys.record.schema.FieldDefinition)2 Matcher (java.util.regex.Matcher)2 BoundingBox (com.revolsys.geometry.model.BoundingBox)1 Geometry (com.revolsys.geometry.model.Geometry)1 VectorOfWString (com.revolsys.gis.esri.gdb.file.capi.swig.VectorOfWString)1 Identifier (com.revolsys.identifier.Identifier)1 SingleIdentifier (com.revolsys.identifier.SingleIdentifier)1