Class Comet3CollectionImpl<T extends Comet3Entity>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
com.priint.pubserver.comet.bridge.Comet3CollectionImpl<T>
- Type Parameters:
T- the type parameter
- All Implemented Interfaces:
Comet3Collection<T>,Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess
- Direct Known Subclasses:
Actions,Colors,ConditionMenues,Conditions,DataFiles,Domains,FindStatement.Sourcefiles,FindStatements,FrameRules,Grid.Placeholders,Grids,GridTypes,Manifest,Messages,PageItems,PageItemStates,PageItemTypes,PageTemplate.Templates,PageTemplates,PanelStatements,PlaceholderGroup.Placeholders,PlaceholderGroups,Placeholders,PlaceholderVariants,PreviewStatements,RelatedTos,XEntities,XIndexes
public class Comet3CollectionImpl<T extends Comet3Entity>
extends ArrayList<T>
implements Comet3Collection<T>
The type Comet 3 collection. For internal use only.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindById(int id) Lookup the Entity refered by id in this collection.Get the time (unix timestamp) the collection was modified lastgetList()Gets list.Get the name of the XML file associated with this particular collection.Get the name of the XML root element.merge(Comet3Collection<T> other) Merge collection other into the actual collection.merge(Comet3Collection<T> other, boolean deleteObj) Merge collection other into the actual collection.voidMerge an item into the actual list.voidsetLastModificationTimestamp(Long lastModificationTimestamp) Set the time the collection was modified lastvoidSets list.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
Comet3CollectionImpl
public Comet3CollectionImpl()
-
-
Method Details
-
merge
Description copied from interface:Comet3CollectionMerge collection other into the actual collection. Entries will be compared by ID, i.e.: equal IDs will be considered as equal objects. Newer objects take precedence over older, if both have the same modification date objects in collection other take precedence over objects in the actual collection.- Specified by:
mergein interfaceComet3Collection<T extends Comet3Entity>- Parameters:
other- the other- Returns:
- a newly created collection containing the most recent entities of both lists
-
merge
Description copied from interface:Comet3CollectionMerge collection other into the actual collection. Entries will be compared by ID, i.e.: equal IDs will be considered as equal objects. Newer objects take precedence over older, if both have the same modification date objects in collection other take precedence over objects in the actual collection. If deleteObj is set to true, objects not contained in collection other will be deleted from the actual collection.- Specified by:
mergein interfaceComet3Collection<T extends Comet3Entity>- Parameters:
other- the otherdeleteObj- the delete obj- Returns:
- a newly created collection containing the most recent entities of both lists
-
merge
Description copied from interface:Comet3CollectionMerge an item into the actual list. If this item does not yet exist (i.e.: there is no such object with the same Id), the item will be added, otherwise items will be merged according to the merge rules for this particular entity type.- Specified by:
mergein interfaceComet3Collection<T extends Comet3Entity>- Parameters:
item- the item
-
setLastModificationTimestamp
Description copied from interface:Comet3CollectionSet the time the collection was modified last- Specified by:
setLastModificationTimestampin interfaceComet3Collection<T extends Comet3Entity>- Parameters:
lastModificationTimestamp- the timestamp
-
getLastModificationTimestamp
Description copied from interface:Comet3CollectionGet the time (unix timestamp) the collection was modified last- Specified by:
getLastModificationTimestampin interfaceComet3Collection<T extends Comet3Entity>- Returns:
- unix timestamp of last modification date
-
getList
Gets list.- Returns:
- the list
-
findById
Description copied from interface:Comet3CollectionLookup the Entity refered by id in this collection.- Specified by:
findByIdin interfaceComet3Collection<T extends Comet3Entity>- Parameters:
id- the id- Returns:
- Entity object or null, if no such object exists
-
getXmlRootElementName
Description copied from interface:Comet3CollectionGet the name of the XML root element. Typically this is getClass().getSimpleName().toLowerCase() and is implemented in the CometCollectionImpl adapter class.- Specified by:
getXmlRootElementNamein interfaceComet3Collection<T extends Comet3Entity>- Returns:
- name of the XML root element
-
getXmlFileName
Description copied from interface:Comet3CollectionGet the name of the XML file associated with this particular collection. Typically this is getClass().getSimpleName().toLowerCase() + ".xml" and is implemented in the CometCollectionImpl adapter class- Specified by:
getXmlFileNamein interfaceComet3Collection<T extends Comet3Entity>- Returns:
- name of a XML file holding this particular list
-
setList
Sets list.- Parameters:
list- the list
-