Package com.contentful.java.cda
Class TransformQuery<Transformed>
- java.lang.Object
-
- com.contentful.java.cda.AbsQuery<Transformed,TransformQuery<Transformed>>
-
- com.contentful.java.cda.TransformQuery<Transformed>
-
- Type Parameters:
Transformed- A type annotated to be used as a target of transformation from CDAEntry.
public class TransformQuery<Transformed> extends AbsQuery<Transformed,TransformQuery<Transformed>>
This query will tranform an incoming contentful entry to a custom type.Please make sure to
TransformQuery.ContentfulEntryModelandTransformQuery.ContentfulFieldannotations, to highlight classes and fields to be transformed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTransformQuery.ContentfulEntryModelAnnotation to mark a model class to be a "ContentfulEntryModel"static interfaceTransformQuery.ContentfulFieldThis annotation marks a field of aTransformQuery.ContentfulEntryModelto be part of the parsing.static interfaceTransformQuery.ContentfulSystemFieldThis annotation marks a system field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Flowable<java.util.Collection<Transformed>>all()Retrieve all transformed entries from Contentful.CDACallback<java.util.Collection<Transformed>>all(CDACallback<java.util.Collection<Transformed>> callback)Retrieve all transformed entries from Contentful by the use of a callback.io.reactivex.rxjava3.core.Flowable<Transformed>one(java.lang.String id)Retrieve the transformed entry from Contentful.CDACallback<Transformed>one(java.lang.String id, CDACallback<Transformed> callback)Retrieve the transformed entry from Contentful by using the given callback.-
Methods inherited from class com.contentful.java.cda.AbsQuery
include, limit, linksToAssetId, linksToEntryId, orderBy, orderBy, reverseOrderBy, select, select, skip, where, where, withContentType, withLocale
-
-
-
-
Method Detail
-
one
public io.reactivex.rxjava3.core.Flowable<Transformed> one(java.lang.String id)
Retrieve the transformed entry from Contentful.- Parameters:
id- the id of the entry of type Transformed.- Returns:
- the Transformed entry.
- Throws:
CDAResourceNotFoundException- if no such resource was found.java.lang.IllegalStateException- if the transformed class could not be created.java.lang.IllegalStateException- if the transformed class could not be accessed.
-
one
public CDACallback<Transformed> one(java.lang.String id, CDACallback<Transformed> callback)
Retrieve the transformed entry from Contentful by using the given callback.- Parameters:
id- the id of the entry of type transformed.- Returns:
- the input callback for chaining.
- Throws:
CDAResourceNotFoundException- if no such resource was found.java.lang.IllegalStateException- if the transformed class could not be created.java.lang.IllegalStateException- if the transformed class could not be accessed.
-
all
public io.reactivex.rxjava3.core.Flowable<java.util.Collection<Transformed>> all()
Retrieve all transformed entries from Contentful.- Returns:
- a collection of transformed entry.
- Throws:
CDAResourceNotFoundException- if no such resource was found.java.lang.IllegalStateException- if the transformed class could not be created.java.lang.IllegalStateException- if the transformed class could not be accessed.
-
all
public CDACallback<java.util.Collection<Transformed>> all(CDACallback<java.util.Collection<Transformed>> callback)
Retrieve all transformed entries from Contentful by the use of a callback.- Returns:
- a callback containing a collection of transformed entries.
- Throws:
CDAResourceNotFoundException- if no such resource was found.java.lang.IllegalStateException- if the transformed class could not be created.java.lang.IllegalStateException- if the transformed class could not be accessed.
-
-