Package com.couchbase.lite.internal.core
Class C4Document
- java.lang.Object
-
- com.couchbase.lite.internal.core.C4NativePeer
-
- com.couchbase.lite.internal.core.C4Document
-
- All Implemented Interfaces:
AutoCloseable
public class C4Document extends C4NativePeer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
bodyAsJSON(boolean canonical)
void
close()
boolean
deleted()
static boolean
dictContainsBlobs(FLSliceResult dict, FLSharedKeys sk)
boolean
exists()
String
getDocID()
int
getFlags()
String
getRevID()
FLDict
getSelectedBody2()
int
getSelectedFlags()
String
getSelectedRevID()
long
getSelectedSequence()
long
getSequence()
boolean
isSelectedRevFlags(int flag)
void
resolveConflict(String winningRevID, String losingRevID, byte[] mergeBody, int mergedFlags)
void
save(int maxRevTreeDepth)
void
selectNextLeafRevision(boolean includeDeleted, boolean withBody)
boolean
selectNextRevision()
C4Document
update(byte[] body, int flags)
C4Document
update(FLSliceResult body, int flags)
-
Methods inherited from class com.couchbase.lite.internal.core.C4NativePeer
toString
-
-
-
-
Method Detail
-
dictContainsBlobs
public static boolean dictContainsBlobs(@NonNull FLSliceResult dict, @NonNull FLSharedKeys sk)
-
getFlags
public int getFlags()
-
getDocID
@Nullable public String getDocID()
-
getRevID
@Nullable public String getRevID()
-
getSequence
public long getSequence()
-
getSelectedRevID
@Nullable public String getSelectedRevID()
-
getSelectedSequence
public long getSelectedSequence()
-
getSelectedBody2
@Nullable public FLDict getSelectedBody2()
-
getSelectedFlags
public int getSelectedFlags()
-
save
public void save(int maxRevTreeDepth) throws LiteCoreException
- Throws:
LiteCoreException
-
selectNextRevision
public boolean selectNextRevision()
-
selectNextLeafRevision
public void selectNextLeafRevision(boolean includeDeleted, boolean withBody) throws LiteCoreException
- Throws:
LiteCoreException
-
resolveConflict
public void resolveConflict(String winningRevID, String losingRevID, byte[] mergeBody, int mergedFlags) throws LiteCoreException
- Throws:
LiteCoreException
-
update
@Nullable public C4Document update(@Nullable FLSliceResult body, int flags) throws LiteCoreException
- Throws:
LiteCoreException
-
update
@Nullable public C4Document update(@NonNull byte[] body, int flags) throws LiteCoreException
- Throws:
LiteCoreException
-
deleted
public boolean deleted()
-
exists
public boolean exists()
-
isSelectedRevFlags
public boolean isSelectedRevFlags(int flag)
-
bodyAsJSON
@Nullable public String bodyAsJSON(boolean canonical) throws LiteCoreException
- Throws:
LiteCoreException
-
close
@CallSuper public void close()
-
-