T - concrete entity typepublic abstract class ProjectEntityContainer<T extends ProjectEntityWithUniqueID> extends ListWithCallbacks<T>
| Modifier and Type | Field and Description |
|---|---|
protected UniqueIdObjectSequenceProvider |
m_sequenceProvider |
modCount| Constructor and Description |
|---|
ProjectEntityContainer(UniqueIdObjectSequenceProvider sequenceProvider)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
added(T element)
Called to notify subclasses of item addition.
|
protected int |
firstUniqueID()
Returns the value of the first Unique ID to use when renumbering Unique IDs.
|
void |
fixUniqueIdClashes()
Provide new Unique ID values for entity instances
which were found to be duplicated.
|
T |
getByUniqueID(Integer id)
Retrieve an entity by its Unique ID.
|
UniqueIdObjectSequenceProvider |
getSequenceProvider()
Retrieve the sequence provider for this container.
|
protected void |
removed(T element)
Called to notify subclasses of item removal.
|
void |
updateUniqueID(T element,
Integer oldUniqueID,
Integer newUniqueID)
Updates an entry in the unique ID map when a unique ID is changed.
|
add, add, clear, get, remove, replaced, set, sizeaddAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streamprotected final UniqueIdObjectSequenceProvider m_sequenceProvider
public ProjectEntityContainer(UniqueIdObjectSequenceProvider sequenceProvider)
sequenceProvider - sequence providerpublic UniqueIdObjectSequenceProvider getSequenceProvider()
protected int firstUniqueID()
public T getByUniqueID(Integer id)
id - entity Unique IDprotected void added(T element)
ListWithCallbacksadded in class ListWithCallbacks<T extends ProjectEntityWithUniqueID>element - added itemprotected void removed(T element)
removed in class ListWithCallbacks<T extends ProjectEntityWithUniqueID>element - removed itempublic void updateUniqueID(T element, Integer oldUniqueID, Integer newUniqueID)
element - entity whose unique ID is changingoldUniqueID - old unique ID valuenewUniqueID - new unique ID valuepublic void fixUniqueIdClashes()
Copyright © 2000–2025 MPXJ. All rights reserved.