Search in sources :

Example 6 with SingleIdentifier

use of com.revolsys.identifier.SingleIdentifier in project com.revolsys.open by revolsys.

the class FileGdbRecordStore method appendValue.

public void appendValue(final StringBuilder buffer, Object value) {
    if (value instanceof SingleIdentifier) {
        final SingleIdentifier identifier = (SingleIdentifier) value;
        value = identifier.getValue(0);
    }
    if (value == null) {
        buffer.append("''");
    } else if (value instanceof Number) {
        buffer.append(value);
    } else if (value instanceof java.util.Date) {
        final String stringValue = Dates.format("yyyy-MM-dd", (java.util.Date) value);
        buffer.append("DATE '" + stringValue + "'");
    } else {
        final Object value1 = value;
        final String stringValue = DataTypes.toString(value1);
        buffer.append("'");
        buffer.append(stringValue.replaceAll("'", "''"));
        buffer.append("'");
    }
}
Also used : SingleIdentifier(com.revolsys.identifier.SingleIdentifier) VectorOfWString(com.revolsys.gis.esri.gdb.file.capi.swig.VectorOfWString)

Aggregations

SingleIdentifier (com.revolsys.identifier.SingleIdentifier)6 VectorOfWString (com.revolsys.gis.esri.gdb.file.capi.swig.VectorOfWString)1 Identifier (com.revolsys.identifier.Identifier)1 ListIdentifier (com.revolsys.identifier.ListIdentifier)1 TypedIdentifier (com.revolsys.identifier.TypedIdentifier)1 LayerRecordForm (com.revolsys.swing.map.form.LayerRecordForm)1 BigDecimal (java.math.BigDecimal)1 DecimalFormat (java.text.DecimalFormat)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1