Skip to content

MLE-18751 Added docs about descriptors and content versioning #1734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import com.marklogic.client.io.Format;

/**
* A Document Descriptor describes a database document.
* A Document Descriptor describes a database document. If content versioning is enabled on the app server used
* to retrieve a document via an instance of this class, note that you may receive a null return value if the
* corresponding document has not been modified.
*/
public interface DocumentDescriptor extends ContentDescriptor {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ <T extends R> T read(String docId, T contentHandle, ServerTransform transform)
* @param desc a descriptor for the URI identifier, format, and mimetype of the document
* @param contentHandle a handle for reading the content of the document
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, T contentHandle)
Expand All @@ -254,7 +255,8 @@ <T extends R> T read(DocumentDescriptor desc, T contentHandle)
* @param contentHandle a handle for reading the content of the document
* @param transform a server transform to modify the document content
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, T contentHandle, ServerTransform transform)
Expand Down Expand Up @@ -298,7 +300,8 @@ <T extends R> T read(String docId, DocumentMetadataReadHandle metadataHandle, T
* @param metadataHandle a handle for reading the metadata of the document
* @param contentHandle a handle for reading the content of the document
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle metadataHandle, T contentHandle)
Expand All @@ -313,7 +316,8 @@ <T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle metadat
* @param contentHandle a handle for reading the content of the document
* @param transform a server transform to modify the document content
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle metadataHandle, T contentHandle, ServerTransform transform)
Expand Down Expand Up @@ -357,7 +361,8 @@ <T extends R> T read(String docId, T contentHandle, ServerTransform transform, T
* @param contentHandle a handle for reading the content of the document
* @param transaction a open transaction under which the document may have been created or deleted
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, T contentHandle, Transaction transaction)
Expand All @@ -372,7 +377,8 @@ <T extends R> T read(DocumentDescriptor desc, T contentHandle, Transaction trans
* @param transform a server transform to modify the document content
* @param transaction a open transaction under which the document may have been created or deleted
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, T contentHandle, ServerTransform transform, Transaction transaction)
Expand Down Expand Up @@ -419,7 +425,8 @@ <T extends R> T read(String docId, DocumentMetadataReadHandle metadataHandle, T
* @param contentHandle a handle for reading the content of the document
* @param transaction a open transaction under which the document may have been created or deleted
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle metadataHandle, T contentHandle, Transaction transaction)
Expand All @@ -435,7 +442,8 @@ <T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle metadat
* @param transform a server transform to modify the document content
* @param transaction a open transaction under which the document may have been created or deleted
* @param <T> the type of content handle to return
* @return the content handle populated with the content of the document in the database
* @return the content handle populated with the content of the document in the database, or null if content
* versioning is enabled and the document has not been modified.
* @throws ResourceNotFoundException if the document is not found
*/
<T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle metadataHandle, T contentHandle, ServerTransform transform, Transaction transaction)
Expand Down