Class OffsetEntityList
java.lang.Object
ch.tocco.nice2.persist.core.api.entity.AbstractEntityList
ch.tocco.nice2.persist.core.api.exec.tasks2.OffsetEntityList
- All Implemented Interfaces:
EntityList
,Iterable<Entity>
Deprecated.
-
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget
(int index, boolean eager) Deprecated.Get the entity at the specified index.getKey
(int index) Deprecated.Returns the PrimaryKey at the specified position.getKeys()
Deprecated.Read in subclasses if this array can contain null values or not.Deprecated.Get the entity manager.getModel()
Deprecated.Get the model of the entity type contained in this list.int
Deprecated.Get the number of pages in this list.int
Deprecated.Get the current page size.int
indexOf
(PrimaryKey key) Deprecated.Get the index within the list of the entity with the specified key.void
setPageSize
(int pageSize) Deprecated.Set the page size.int
size()
Deprecated.Get the number of entities this list contains.unwrap()
Deprecated.Unwrap to the underlying entity list.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
-
OffsetEntityList
Deprecated.
-
-
Method Details
-
size
public int size()Deprecated.Description copied from interface:EntityList
Get the number of entities this list contains.- Returns:
- The number of entities.
-
getKeys
Deprecated.Description copied from interface:EntityList
Read in subclasses if this array can contain null values or not.- Returns:
- A defensive copy of the array. The size matches the
EntityList.size()
method.
-
get
Deprecated.Description copied from interface:EntityList
Get the entity at the specified index.- Parameters:
index
- The index.eager
-true
, if a page should be eagerly loaded, if the entity's state ishollow
, false otherwise.- Returns:
- The entity at the specified index potentially in
unusable state
, ornull
. - Throws:
PersistException
-
getKey
Deprecated.Description copied from interface:EntityList
Returns the PrimaryKey at the specified position. -
indexOf
Deprecated.Description copied from interface:EntityList
Get the index within the list of the entity with the specified key.- Parameters:
key
- The primary key.- Returns:
- The index or -1, if there's no such entity in the list.
-
getModel
Deprecated.Description copied from interface:EntityList
Get the model of the entity type contained in this list.- Returns:
- The model of the entity type contained in this list.
-
getManager
Deprecated.Description copied from interface:EntityList
Get the entity manager.- Returns:
- The entity manager.
-
unwrap
Deprecated.Description copied from interface:EntityList
Unwrap to the underlying entity list. Wrappers of entity lists should delegate this to the list they're wrapping, implementations returnthis
. It may be that they cannot, and then return themselves (MultiEntityList).- Returns:
- The underlying entity list implementation.
-
setPageSize
public void setPageSize(int pageSize) Deprecated.Description copied from interface:EntityList
Set the page size. The page size determines how many objects will be loaded, once ahollow
entity has been accessed.- Parameters:
pageSize
- The new page size.
-
getPageSize
public int getPageSize()Deprecated.Description copied from interface:EntityList
Get the current page size.- Returns:
- The current page size.
-
getPageCount
public int getPageCount()Deprecated.Description copied from interface:EntityList
Get the number of pages in this list.- Returns:
- The number of pages in this list
(
size/pageSize + (size%pageSize>0 ? 1 : 0)
).
-