Class FormRepository

java.lang.Object
org.immutables.mongo.repository.Repositories.Repository<Form>
io.dialob.api.form.FormRepository

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @ThreadSafe public class FormRepository extends org.immutables.mongo.repository.Repositories.Repository<Form>
A FormRepository provides type-safe access for storing and retrieving documents from the MongoDB collection "forms".
  • Constructor Details

    • FormRepository

      public FormRepository(org.immutables.mongo.repository.RepositorySetup configuration)
      Constructs a Form repository using configuration.
      Parameters:
      configuration - The repository configuration
  • Method Details

    • insert

      public org.immutables.mongo.concurrent.FluentFuture<Integer> insert(Form document)
      Inserts a single document into the collection.
      Parameters:
      document - The form to insert
      Returns:
      A future representing the number of inserted documents (1) if WriteConcern allows the insertion.
    • insert

      public org.immutables.mongo.concurrent.FluentFuture<Integer> insert(Iterable<? extends Form> documents)
      Insert documents into the collection.
      Parameters:
      documents - The documents to insert
      Returns:
      A future representing the number of inserted documents if WriteConcern allows the insertion.
    • findAll

      @CheckReturnValue public FormRepository.Finder findAll()
      Finds all documents. Use the returned FormRepository.Finder object to complete fetch all or other operations.
      Returns:
      A finder object used to complete operations
    • find

      @CheckReturnValue public FormRepository.Finder find(String jsonCriteria)
      Find documents by the criteria expressed as a JSON string. Use the returned FormRepository.Finder object to complete fetch or fetch operations.
      Parameters:
      jsonCriteria - A JSON string for native criteria
      Returns:
      A finder object used to complete operations
    • findById

      @CheckReturnValue public FormRepository.Finder findById(String id)
      Find documents by the id identity attribute. Use the returned FormRepository.Finder object to complete fetch or fetchAll read operations. You can also use modify, replace or delete operations to update / delete the document.
      Parameters:
      id - The exact id value
      Returns:
      A finder object used to complete operations
    • upsert

      public org.immutables.mongo.concurrent.FluentFuture<Integer> upsert(Form document)
      Update or insert a document, matched by the identifier value of the 'id' attribute.
      Parameters:
      document - The form to upsert
      Returns:
      A future representing the of number of inserted documents (1) if WriteConcern allows the insertion.
    • find

      @CheckReturnValue public FormRepository.Finder find(FormRepository.Criteria criteria)
      Find a document by the given criteria. Use the returned FormRepository.Finder object to complete fetch operations. You can also use modify or delete operations to update / delete the document(s).
      Parameters:
      criteria - The search criteria
      Returns:
      A finder object used to complete operations
    • update

      @CheckReturnValue public FormRepository.Updater update(FormRepository.Criteria criteria)
      Update the set of "forms" documents.
      Parameters:
      criteria - The search criteria for update
      Returns:
      An updater object that will be used to complete the update.
    • index

      @CheckReturnValue public FormRepository.Indexer index()
      Ensure an index on collection forms by one or more attributes using the family of with*() attribute-specific methods. While indexes will usually be maintained by special administration scripts, for simple cases it is convenient to ensure an index on application startup.
      Returns:
      An indexer object to be completed with the Repositories.Indexer.ensure() operation.
      See Also:
      • Repositories.Indexer.named(String)
      • Repositories.Indexer.unique()
    • criteria

      public FormRepository.Criteria criteria()
      Search criteria. Returns an initial object to create criteria by invoking methods that describe attribute specific constraints.
      Returns:
      An empty immutable criteria