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 StringbodyAsJSON(boolean canonical)voidclose()booleandeleted()static booleandictContainsBlobs(FLSliceResult dict, FLSharedKeys sk)booleanexists()StringgetDocID()intgetFlags()StringgetRevID()FLDictgetSelectedBody2()intgetSelectedFlags()StringgetSelectedRevID()longgetSelectedSequence()longgetSequence()booleanisSelectedRevFlags(int flag)voidresolveConflict(String winningRevID, String losingRevID, byte[] mergeBody, int mergedFlags)voidsave(int maxRevTreeDepth)voidselectNextLeafRevision(boolean includeDeleted, boolean withBody)booleanselectNextRevision()C4Documentupdate(byte[] body, int flags)C4Documentupdate(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()
-
-