T
- public interface Result<T>
Search query result.
By default the search query result is limited to 10 entries. If you don't specify a limit explicit with Limit.limit(int)
you will only get the first 10 results back.
Example:
import ch.ivyteam.ivy.business.data.store.search.Result;
import workflow.business.data.Dossier;
Result result = ivy.repo.search(Dossier.class)
.limit(10)
.execute();
Number count = result.count(); // 0 .. 10
Number total = result.totalCount(); // count .. ?
Dossier dossier = result.getFirst() as Dossier;
List<Dossier> dossiers = result.getAll();
Modifier and Type | Method and Description |
---|---|
long |
count()
Gets the number of hits available in this result.
|
List<T> |
getAll()
Gets all business data objects available in the result.
|
List<BusinessDataInfo<T>> |
getAllInfos()
Gets information about all business data objects in the result.
|
T |
getFirst()
Gets the first business data object in the result.
|
BusinessDataInfo<T> |
getFirstInfo()
Gets information about the first business data object in the result.
|
long |
totalCount()
Gets the total number of hits that matched the search query.
|
T getFirst()
Gets the first business data object in the result.
Example:
import ch.ivyteam.ivy.business.data.store.search.Result;
import workflow.business.data.Dossier;
Result result = ivy.repo.search(Dossier.class)
.limit(1)
.execute();
Dossier dossier = result.getFirst() as Dossier;
Result.getFirstInfo()
BusinessDataInfo<T> getFirstInfo()
Gets information about the first business data object in the result.
Example:
import ch.ivyteam.ivy.business.data.store.search.Result;
import ch.ivyteam.ivy.business.data.store.BusinessDataInfo;
Result result = ivy.repo.search(Dossier.class)
.limit(1)
.execute();
BusinessDataInfo businessDataInfo = result.getFirstInfo();
Result.getFirst()
List<T> getAll()
Gets all business data objects available in the result.
Example:
import ch.ivyteam.ivy.business.data.store.search.Result;
import workflow.business.data.Dossier;
Result result = ivy.repo.search(Dossier.class)
.limit(10)
.execute();
List<Dossier> dossiers = result.getAll();
By default the maximum number of results that are returned is 10. Use method Limit.limit(int)
to configure another maximum.
Result.getAllInfos()
,
Limit.limit(int)
List<BusinessDataInfo<T>> getAllInfos()
Gets information about all business data objects in the result.
Example:
import ch.ivyteam.ivy.business.data.store.search.Result;
import ch.ivyteam.ivy.business.data.store.BusinessDataInfo;
Result result = ivy.repo.search(Dossier.class)
.limit(10)
.execute();
List<BusinessDataInfo> businessDataInfos = result.getAllInfos();
By default the maximum number of results that are returned is 10. Use method Limit.limit(int)
to configure another maximum.
Result.getAll()
,
Limit.limit(int)
long count()
Gets the number of hits available in this result.
Note, because of performance considerations not all hits will be available in this result.
By default the maximum number of hits that are available in a result is 10. Use method Limit.limit(int)
to configure another maximum.
The method Result.totalCount()
returns the total number of hits.
Example:
import ch.ivyteam.ivy.business.data.store.search.Result;
Result result = ivy.repo.search(Dossier.class)
.limit(10)
.execute();
Number count = result.count(); // 0 .. 10
Number totalHits = result.totalCount(); // totalHits >= count
Result.totalCount()
,
Limit.limit(int)
,
Limit.limit(int, int)
long totalCount()
Gets the total number of hits that matched the search query.
Note, because of performance considerations not all hits will be available in this result by default.
For the number of hits available in this result see Result.count()
.
Example:
import ch.ivyteam.ivy.business.data.store.search.Result;
Result result = ivy.repo.search(Dossier.class)
.limit(10)
.execute();
Number count = result.count(); // 0 .. 10
Number totalHits = result.totalCount(); // totalHits >= count
Result.count()
,
Limit.limit(int)
,
Limit.limit(int, int)
Copyright © 2024
AXON IVY AG
All Rights Reserved Documentation was generated
on April 21, 2024