The MetaMapper that provides create and findAll functionality etc.
The MetaMapper that provides create and findAll functionality etc. Must itself be a T (the mapper type it represents)
Adds a new, unsaved item
The list of items pending to be added to the database
The sort direction
The list of items that correspond to items in the database
Returns the items (current + added - removed), sorted.
Returns the items (current + added - removed), sorted. Sorting sorts strings case-insensitive, as well as Ordered and java.lang.Comparable. Anything else where both values are nonnull are sorted via their toString method (case sensitive)
Reloads the contents of 'current' from the database
Reset the ItemsList from the database: calls refresh, and 'added' and 'removed' are cleared.
Marks an item pending for removal
The list of items to be deleted from current
Sends to the database: added is saved removed is deleted (current - removed) is saved
The field to sort by, if any
Whether the sorting algorithm should put null first or last
Keeps track of pending adds to and removes from a list of mappers. Supports in-memory sorting by a field. Usage: override metaMapper with a MetaMapper instance, call sortBy to specify the field to sort by. If it is already sorted by that field it will sort descending, otherwise ascending. Call save to actualize changes.