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:
java.lang.AutoCloseable
public class C4Document extends C4NativePeer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbodyAsJSON(boolean canonical)voidclose()booleandeleted()static booleandictContainsBlobs(FLSliceResult dict, FLSharedKeys sk)booleanexists()java.lang.StringgetDocID()intgetFlags()java.lang.StringgetRevID()FLDictgetSelectedBody2()intgetSelectedFlags()java.lang.StringgetSelectedRevID()longgetSelectedSequence()longgetSequence()booleanisSelectedRevFlags(int flag)voidresolveConflict(java.lang.String winningRevID, java.lang.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 java.lang.String getDocID()
-
getRevID
@Nullable public java.lang.String getRevID()
-
getSequence
public long getSequence()
-
getSelectedRevID
@Nullable public java.lang.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(java.lang.String winningRevID, java.lang.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 java.lang.String bodyAsJSON(boolean canonical) throws LiteCoreException- Throws:
LiteCoreException
-
close
@CallSuper public void close()
-
-