Class RecordProvider

  • All Implemented Interfaces:
    CollectionResourceProvider

    public class RecordProvider
    extends Object
    implements CollectionResourceProvider
    CREST collection service dedicated to persist JSON objects (other types are not supported: arrays, primitives, and null).

    Usage example:

         
         // Persists { "key" : [ 42 ] } and returns the server-created ID to use for future references
         requestHandler.handleCreate(context, newCreateRequest("record", json(object(field("key", array(42))))))
                       .then((response) -> {
                           System.out.println("Created resource with ID: " + response.getId());
                       });