trait ItemsList[T <: Mapper[T]] extends AnyRef
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.
- Alphabetic
- By Inheritance
- ItemsList
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
metaMapper: T with MetaMapper[T]
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)
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
add: Unit
Adds a new, unsaved item
-
val
added: List[T]
The list of items pending to be added to the database
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
ascending: Boolean
The sort direction
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
current: List[T]
The list of items that correspond to items in the database
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
items: Seq[T]
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)
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
refresh: Unit
Reloads the contents of 'current' from the database
-
def
reload: Unit
Reset the ItemsList from the database: calls refresh, and 'added' and 'removed' are cleared.
-
def
remove(i: T): Unit
Marks an item pending for removal
-
val
removed: List[T]
The list of items to be deleted from current
-
def
save: Unit
Sends to the database: added is saved removed is deleted (current - removed) is saved
- def sortBy(field: MappedField[_, T]): Unit
-
val
sortField: Option[MappedField[_, T]]
The field to sort by, if any
- def sortFn(field: MappedField[_, T]): () ⇒ Unit
-
val
sortNullFirst: Boolean
Whether the sorting algorithm should put null first or last
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )