| java.lang.Object simpleorm.data.DQuery
DQuery | public class DQuery implements Comparator<DRecordInstance>(Code) | | A simple query interface.
executeQuery() returns a collection of the values, not an itterator, result set etc.
This is partially just to keep it simple, and partially because the itterator's
idiot hasNext()/next() semantics is both wront and incompatible with a
ResultSet's next()/get* logic.
The collection could, of course, be implemented lazily.
|
Inner Class :public static class Criteria | |
criteriaFields | List<Criteria> criteriaFields(Code) | | |
lockRecords | boolean lockRecords(Code) | | |
offsetlimit | int offsetlimit(Code) | | |
compare | public int compare(DRecordInstance first, DRecordInstance second)(Code) | | Implements Comparator, for sorting based based on the orderbyFields.
Beware that equals is not really correct, the sort fields will not in general
form a complete key.
|
execute | public Iterator<DRecordInstance> execute(DConnection connection)(Code) | | Just calls connection.executeQuery.
(Is in query so that a thread local connection can be implemented later.
Also enables wrappers such as *OneRecord to be implemented.)
|
executeOnlyRecord | public DRecordInstance executeOnlyRecord(DConnection database)(Code) | | Convenience method to just return the one record in a result.
Returns null if none, exception if multiple.
|
getCriteriaFields | public List<Criteria> getCriteriaFields()(Code) | | |
getLimit | public int getLimit()(Code) | | |
getOffset | public int getOffset()(Code) | | |
isLockRecords | public boolean isLockRecords()(Code) | | |
match | public boolean match(DRecordInstance rec)(Code) | | true if rec maches the criteria. Rarely called outside the package.
|
setLimit | public void setLimit(int limit)(Code) | | |
setLockRecords | public DQuery setLockRecords(boolean lockRecords)(Code) | | |
|
|