Interface IBigDataRepository

    • Method Detail

      • startBatch

        IBatchIndexer startBatch()
        Returns an indexer to perform bulk actions.
        The caller must assure IBatchIndexer.close() is called after the desired bulk operations were performed.

        Example of usage:

        IBatchIndexer batchIndexer = myBigDataRepository.startBatch(); try { // batch operations here } finally { batchIndexer.close(); }
        Or using try-with-resources:
        try(IBatchIndexer batchIndexer = myBigDataRepository.startBatch()) { // batch operations here }
        Returns:
        an indexer to perform bulk actions.
        Since:
        8.1.0
      • addOrUpdateDocumentType

        void addOrUpdateDocumentType​(DocumentType documentType,
                                     boolean force)
        Adds or updates a document type into managed indices.
        If the managed indices couldn't be updated in underlying big data repository:
        • If force parameter is true, they will be recreated, causing data loss.
        • Else, an IllegalArgumentException will be raised.
        Parameters:
        documentType - the document type to be added.
        force - indicates whether the update should be forced.
        Throws:
        java.lang.IllegalArgumentException - if a change in document type is not allowed or the underlying indices couldn't be recreated and force is false.
        Since:
        11.0.0
        See Also:
        DocumentTypes
      • deleteDocumentType

        void deleteDocumentType​(java.lang.String documentTypeId)
                         throws PortalObjectNotFoundException
        Deletes a given document type from managed indices.
        Parameters:
        documentTypeId - the document type identifier to be deleted.
        Throws:
        PortalObjectNotFoundException - if the document type with the given identifier couldn't be found.
        Since:
        8.1.0
      • getDocumentType

        DocumentType getDocumentType​(java.lang.String documentTypeId)
                              throws PortalObjectNotFoundException
        Returns the document type of the given identifier.
        Parameters:
        documentTypeId - the document type identifier.
        Returns:
        the document type of the given identifier.
        Throws:
        PortalObjectNotFoundException - if the desired type does not exist.
        Since:
        8.1.0
      • getDocumentTypeField

        DocumentTypeField getDocumentTypeField​(java.lang.String documentTypeFieldFullId)
                                        throws PortalObjectNotFoundException
        Return the document type field of the field that has the given identifier.
        Parameters:
        documentTypeFieldFullId - the (full) identifier of the document type field.
        Returns:
        the document type field of the field that has the given identifier.
        Throws:
        PortalObjectNotFoundException - if the desired field does not exist.
        Since:
        9.0.0
      • readDocument

        Document readDocument​(DocumentType documentType,
                              java.util.Locale locale,
                              java.lang.String documentId)
                       throws PortalObjectNotFoundException
        Reads a document from the repository with the given specifications.
        Parameters:
        documentType - the document's type.
        locale - the document's locale as set in its standard locale field. Must be null if the document does not have a locale specified.
        documentId - the document's identifier.
        Returns:
        the document.
        Throws:
        PortalObjectNotFoundException - if no matching document was found.
        Since:
        11.0.0
      • getDelegate

        @Deprecated
        java.lang.Object getDelegate()
        Deprecated.
        Since 16.1.0 replaced by getDelegate(Class) to allow to specify the type of the expected implementation.
        Returns an underlying big data implementation object, if available. The result of this method is implementation specific and implementations may return null.

        This method may be used by a repository as a way to expose some extra API to its clients.

        Returns:
        the underlying big data implementation object, if available.
        Since:
        8.1.0
      • getDelegate

        <T> T getDelegate​(java.lang.Class<T> type)
        Returns an underlying big data implementation object, if available. The result of this method is implementation specific and implementations may return null.

        This method may be used by a repository as a way to expose some extra API to its clients.

        Parameters:
        type - the type of the underlying big data implementation object to be returned.
        Returns:
        the underlying big data implementation object, if available.
        Since:
        16.1.0