Search in sources :

Example 1 with Q

use of com.revolsys.record.query.Q in project com.revolsys.open by revolsys.

the class AbstractRecordLayer method setSelectedRecordsById.

public void setSelectedRecordsById(final Identifier id) {
    final RecordDefinition recordDefinition = getRecordDefinition();
    if (recordDefinition != null) {
        final FieldDefinition idField = recordDefinition.getIdField();
        if (idField == null) {
            clearSelectedRecords();
        } else {
            final Query query = Query.where(Q::equal, idField, id);
            setSelectedRecords(query);
        }
    }
}
Also used : Q(com.revolsys.record.query.Q) Query(com.revolsys.record.query.Query) FieldDefinition(com.revolsys.record.schema.FieldDefinition) RecordDefinition(com.revolsys.record.schema.RecordDefinition)

Aggregations

Q (com.revolsys.record.query.Q)1 Query (com.revolsys.record.query.Query)1 FieldDefinition (com.revolsys.record.schema.FieldDefinition)1 RecordDefinition (com.revolsys.record.schema.RecordDefinition)1