Class ValueSortedEntityList
java.lang.Object
ch.tocco.nice2.persist.core.api.entity.AbstractEntityList
ch.tocco.nice2.persist.core.api.entity.AbstractEntityListWrapper
ch.tocco.nice2.persist.core.api.util.AbstractSortedEntityList
ch.tocco.nice2.persist.core.api.util.ValueSortedEntityList
- All Implemented Interfaces:
EntityList
,Iterable<Entity>
Deprecated.
A wrapper over an
EntityList
to sort the entries by Entity.
Returns a new EntityList that is ordered by a custom Comparator that works on the Entity.
NOTE: Entities HAVE to be loaded prior to sorting. Thus this wrapper is only applicable if the list is relatively small. Try to let the DB do the sorting using the query.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.persist.core.api.entity.AbstractEntityList
AbstractEntityList.SimpleIterator
Nested classes/interfaces inherited from interface ch.tocco.nice2.persist.core.api.entity.EntityList
EntityList.Filter
-
Field Summary
Fields inherited from class ch.tocco.nice2.persist.core.api.util.AbstractSortedEntityList
keys
Fields inherited from class ch.tocco.nice2.persist.core.api.entity.AbstractEntityListWrapper
entityList
-
Constructor Summary
ConstructorsConstructorDescriptionValueSortedEntityList
(EntityList entityList, Comparator<Entity> comparator) Deprecated. -
Method Summary
Methods inherited from class ch.tocco.nice2.persist.core.api.util.AbstractSortedEntityList
get, getKey, getKeys, indexOf, size
Methods inherited from class ch.tocco.nice2.persist.core.api.entity.AbstractEntityListWrapper
getManager, getModel, getPageCount, getPageSize, setPageSize, unwrap
Methods inherited from class ch.tocco.nice2.persist.core.api.entity.AbstractEntityList
contains, expect, expectAtLeast, expectAtMost, get, get, get, isEmpty, iterator, toList, toList
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.entity.EntityList
doWithSingleResult, doWithSingleResultOr, expectAtMostOrThrow, expectOr, expectOrThrow, getFirstEntity, getOnlyResult, getOptionalOnlyResult, getOptionalOnlyResult, requireFirstEntity, spliterator, stream
-
Constructor Details
-
ValueSortedEntityList
public ValueSortedEntityList(EntityList entityList, Comparator<Entity> comparator) throws PersistException Deprecated.- Throws:
PersistException
-