Read One Data Record

The DataSource.getRecord() reads a single data record determined by the DataSource restrictions. If the restrictions result in more than one record, only the first record is returned from the method, according to the DataSource sort order.

// get the work order specified by the primary key
ds.addRestriction(Restrictions.eq("wo", "wo_id", workOrderId));
DataRecord record = ds.getRecord();