A mutable second-class List object.
This class extends AbstractList, using that class to contain the current objects, and the backing ListStore
to be the interface to the datastore. A "backing store" is not present for datastores that dont use
DatastoreClass, or if the container is serialised or non-persistent.

Modes of Operation

The user can operate the list in 2 modes.
The cached mode will use an internal cache of the elements (in the "delegate") reading them at
the first opportunity and then using the cache thereafter.
The non-cached mode will just go direct to the "backing store" each call.

Mutators

When the "backing store" is present any updates are passed direct to the datastore as well as to the "delegate".
If the "backing store" isn't present the changes are made to the "delegate" only.

Accessors

When any accessor method is invoked, it typically checks whether the container has been loaded from its
"backing store" (where present) and does this as necessary. Some methods (size()) just check if
everything is loaded and use the delegate if possible, otherwise going direct to the datastore.

Method Detail

initialise

Method to initialise the SCO for use, where replacing an old value with a new value such as when calling a setter field
passing in a new value. Note that oldValue is marked as Object since for cases where the member type is Collection the
newValue could be, for example, ArrayList, and the oldValue of type Collection (representing null).

clone

Mutable second-class Objects are required to provide a public clone method in order to allow for copying persistable objects.
In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.

set

Wrapper addition that allows turning off of the dependent-field checks
when doing the position setting. This means that we can prevent the deletion of
the object that was previously in that position. This particular feature is used
when attaching a list field and where some elements have changed positions.

writeReplace

The writeReplace method is called when ObjectOutputStream is preparing
to write the object to the stream. The ObjectOutputStream checks whether
the class defines the writeReplace method. If the method is defined, the
writeReplace method is called to allow the object to designate its
replacement in the stream. The object returned should be either of the
same type as the object passed in or an object that when read and
resolved will result in an object of a type that is compatible with all
references to the object.