public CDACallback < Collection < Transformed > > all ( CDACallback < Collection < Transformed > > callback ) { return Callbacks . subscribeAsync ( baseQuery ( ) . all ( ) . map ( new Function < CDAArray , List < Transformed > > ( ) { @ Override public List < Transformed > apply ( CDAArray array ) { final ArrayList < Transformed > result = new ArrayList <> ( array . total ( ) ) ; for ( final CDAResource resource : array . items ) { if ( resource instanceof CDAEntry && ( ( CDAEntry ) resource ) . contentType ( ) . id ( ) . equals ( contentTypeId ) ) { result . add ( TransformQuery . this . transform ( ( CDAEntry ) resource ) ) ; } } return result ; } } ) , callback , client ) ; }
Retrieve all transformed entries from Contentful by the use of a callback .