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.
|
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, size
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
protected final UniqueIdObjectSequenceProvider m_sequenceProvider
public ProjectEntityContainer(UniqueIdObjectSequenceProvider sequenceProvider)
sequenceProvider
- sequence providerprotected int firstUniqueID()
public T getByUniqueID(Integer id)
id
- entity Unique IDprotected void added(T element)
ListWithCallbacks
added
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–2024 Packwood Software. All rights reserved.