T
- the type of resource.public abstract class AbstractBulkResources<T extends DataObjectRestRep> extends AbstractResources<T> implements BulkResources<T>
getByIds(Collection, ResourceFilter)
method
to query through the bulk API for improved performance.Constructor and Description |
---|
AbstractBulkResources(RestClient client,
java.lang.Class<T> resourceClass,
java.lang.String baseUrl) |
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
getByIds(java.util.Collection<java.net.URI> ids,
ResourceFilter<T> filter)
Fetches the resource values for the given IDs, optionally filtering the results as they are returned.
|
java.util.List<T> |
getByRefs(java.util.Collection<? extends RelatedResourceRep> refs,
ResourceFilter<T> filter)
Fetches the resource values for the given references, optionally filtering the results as they are returned.
|
java.util.List<java.net.URI> |
listBulkIds()
Lists all IDs for this resource type through the Bulk API.
|
addTags, get, get, getByIds, getByRefs, getTags, performSearch, performSearchBy, removeTags, search, updateTags, withInactive, withInternal
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getByIds, getByRefs
addTags, get, get, getTags, removeTags, search, updateTags
public AbstractBulkResources(RestClient client, java.lang.Class<T> resourceClass, java.lang.String baseUrl)
public java.util.List<java.net.URI> listBulkIds()
BulkResources
Lists all IDs for this resource type through the Bulk API. May require specific roles.
API Call: GET /RESOURCE_PATH/bulk
listBulkIds
in interface BulkResources<T extends DataObjectRestRep>
public java.util.List<T> getByIds(java.util.Collection<java.net.URI> ids, ResourceFilter<T> filter)
Resources
Fetches the resource values for the given IDs, optionally filtering the results as they are returned.
API Call: GET /RESOURCE_PATH/{id}
getByIds
in interface BulkResources<T extends DataObjectRestRep>
getByIds
in interface Resources<T extends DataObjectRestRep>
getByIds
in class AbstractResources<T extends DataObjectRestRep>
ids
- the resource IDs.filter
- the resource filter to apply to the results as they are returned (optional).public java.util.List<T> getByRefs(java.util.Collection<? extends RelatedResourceRep> refs, ResourceFilter<T> filter)
Resources
Fetches the resource values for the given references, optionally filtering the results as they are returned.
Convenience method for calling getByIds(*resources.id, filter).
getByRefs
in interface BulkResources<T extends DataObjectRestRep>
getByRefs
in interface Resources<T extends DataObjectRestRep>
getByRefs
in class AbstractResources<T extends DataObjectRestRep>
refs
- the resource references.filter
- the resource filter to apply to the results as they are returned (optional).