/** * Creates a {@link RawJsonDocument} which the document id. * * @param id the per-bucket unique document id. * @return a {@link RawJsonDocument}. */ public static RawJsonDocument create(String id) { return new RawJsonDocument(id, 0, null, 0, null); }
/** * Creates a {@link RawJsonDocument} which the document id and JSON content. * * @param id the per-bucket unique document id. * @param content the content of the document. * @return a {@link RawJsonDocument}. */ public static RawJsonDocument create(String id, String content) { return new RawJsonDocument(id, 0, content, 0, null); }
/** * Creates a {@link RawJsonDocument} which the document id, JSON content and the CAS value. * * @param id the per-bucket unique document id. * @param content the content of the document. * @param cas the CAS (compare and swap) value for optimistic concurrency. * @return a {@link RawJsonDocument}. */ public static RawJsonDocument create(String id, String content, long cas) { return new RawJsonDocument(id, 0, content, cas, null); }
/** * Creates a {@link RawJsonDocument} which the document id, JSON content and the expiration time. * * @param id the per-bucket unique document id. * @param content the content of the document. * @param expiry the expiration time of the document. * @return a {@link RawJsonDocument}. */ public static RawJsonDocument create(String id, int expiry, String content) { return new RawJsonDocument(id, expiry, content, 0, null); }
/** * Creates a {@link RawJsonDocument} which the document id, JSON content, CAS value, expiration time and status code. * * This factory method is normally only called within the client library when a response is analyzed and a document * is returned which is enriched with the status code. It does not make sense to pre populate the status field from * the user level code. * * @param id the per-bucket unique document id. * @param content the content of the document. * @param cas the CAS (compare and swap) value for optimistic concurrency. * @param expiry the expiration time of the document. * @return a {@link RawJsonDocument}. */ public static RawJsonDocument create(String id, int expiry, String content, long cas) { return new RawJsonDocument(id, expiry, content, cas, null); }
/** * Creates a {@link RawJsonDocument} which the document id, JSON content, CAS value, expiration time and status code. * * This factory method is normally only called within the client library when a response is analyzed and a document * is returned which is enriched with the status code. It does not make sense to pre populate the status field from * the user level code. * * @param id the per-bucket unique document id. * @param content the content of the document. * @param cas the CAS (compare and swap) value for optimistic concurrency. * @param expiry the expiration time of the document. * @return a {@link RawJsonDocument}. */ public static RawJsonDocument create(String id, int expiry, String content, long cas, MutationToken mutationToken) { return new RawJsonDocument(id, expiry, content, cas, mutationToken); }