Package com.oracle.content.sdk.model
Class PaginatedListResult<T>
java.lang.Object
com.oracle.content.sdk.model.AssetObject
com.oracle.content.sdk.model.AssetLinksObject
com.oracle.content.sdk.model.PaginatedListResult<T>
- Type Parameters:
T
- the type of item returned in the result
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AssetSearchResult
,PublishChannelList
,TaxonomyCategoryList
,TaxonomyList
Common abstract base class for all sdk results that return a paginated response.
- See Also:
-
Field Summary
FieldsFields inherited from class com.oracle.content.sdk.model.AssetLinksObject
links
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Go through and deserialize each json item into the deserializedItems.protected abstract T
deserializeObject
(com.google.gson.JsonElement jsonElement) Override to deserialize the list objectsfirst()
getCount()
Get count of current results.getItems()
Get the list of deserialized list of items from the response as a list ofAsset
objects that could be either content items or digital assets.getLimit()
Get current maximum limit of paginated resultGet current offset of paginated resultsGet total results (not just the paginated count).hasMore()
Are there more pages of results?boolean
isEmpty()
Methods inherited from class com.oracle.content.sdk.model.AssetLinksObject
getLinks
-
Field Details
-
items
-
deserializedItems
-
-
Constructor Details
-
PaginatedListResult
public PaginatedListResult()
-
-
Method Details
-
hasMore
Are there more pages of results?- Returns:
- true if more results available
-
getOffset
Get current offset of paginated results- Returns:
- offset of results
-
getCount
Get count of current results.- Returns:
- count of item results
-
getLimit
Get current maximum limit of paginated result- Returns:
- maximum limit for result
-
getTotalResults
Get total results (not just the paginated count).- Returns:
- Total results available from search.
-
getItems
Get the list of deserialized list of items from the response as a list ofAsset
objects that could be either content items or digital assets.- Returns:
- List of content base item objects
-
first
- Returns:
- the first item in the list of items or null if there is no item
-
isEmpty
public boolean isEmpty()- Returns:
- true if item list is empty
-
deserializeObject
Override to deserialize the list objects- Parameters:
jsonElement
- element- Returns:
- object deserialized
-
deserializeItemFields
public void deserializeItemFields()Go through and deserialize each json item into the deserializedItems. This can be overriden to provide custom deserialization.
-