public class MongoCommit extends com.mongodb.BasicDBObject implements Commit
MongoDB representation of a commit.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_AFFECTED_PATH |
static String |
KEY_BASE_REVISION_ID |
static String |
KEY_BRANCH_ID |
static String |
KEY_DIFF |
static String |
KEY_FAILED |
static String |
KEY_MESSAGE |
static String |
KEY_PATH |
static String |
KEY_REVISION_ID |
static String |
KEY_TIMESTAMP |
| Constructor and Description |
|---|
MongoCommit()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInstruction(Instruction instruction)
Adds the given
Instruction. |
SortedSet<String> |
getAffectedPaths()
Returns the paths affected by the commit.
|
Long |
getBaseRevisionId()
Returns the base revision id the commit is based on.
|
String |
getBranchId()
Returns the private branch id the commit is under or
null if the
commit is in the public branch. |
String |
getDiff()
Returns the JSOP
diff of this commit.
|
List<Instruction> |
getInstructions()
Returns the
List of Instructions which were created from
the diff. |
String |
getMessage()
Returns the message of the commit.
|
String |
getPath()
Returns the path of the root node of this commit.
|
Long |
getRevisionId()
Returns the revision id of this commit if known already, else this will
return
null. |
Long |
getTimestamp()
Returns the timestamp of this commit.
|
boolean |
isFailed()
Determines whether the commit failed or not.
|
void |
setAffectedPaths(Set<String> affectedPaths) |
void |
setBaseRevisionId(Long baseRevisionId) |
void |
setBranchId(String branchId) |
void |
setDiff(String diff) |
void |
setFailed() |
void |
setMessage(String message) |
void |
setPath(String path) |
void |
setRevisionId(Long revisionId)
Sets the revision id of this commit.
|
void |
setTimestamp(Long timestamp) |
append, copy, isPartialObject, markAsPartialObject, toStringcontainsField, containsKey, equals, get, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getInt, getInt, getLong, getLong, getObjectId, getObjectId, getString, getString, put, putAll, putAll, removeField, toMapclear, containsValue, get, removeEldestEntryclone, containsKey, entrySet, isEmpty, keySet, remove, size, valueshashCodefinalize, getClass, notify, notifyAll, wait, wait, waitpublic static final String KEY_AFFECTED_PATH
public static final String KEY_BASE_REVISION_ID
public static final String KEY_BRANCH_ID
public static final String KEY_DIFF
public static final String KEY_FAILED
public static final String KEY_MESSAGE
public static final String KEY_PATH
public static final String KEY_REVISION_ID
public static final String KEY_TIMESTAMP
public MongoCommit()
public SortedSet<String> getAffectedPaths()
CommitgetAffectedPaths in interface Commitpublic Long getBaseRevisionId()
CommitgetBaseRevisionId in interface Commitpublic void setBaseRevisionId(Long baseRevisionId)
public String getBranchId()
Commitnull if the
commit is in the public branch.getBranchId in interface Commitnullpublic void setBranchId(String branchId)
public String getDiff()
Commitpublic void setDiff(String diff)
public boolean isFailed()
Commitpublic void setFailed()
public String getMessage()
CommitgetMessage in interface Commitpublic void setMessage(String message)
public String getPath()
Commitpublic void setPath(String path)
public Long getRevisionId()
Commitnull. The revision id will be determined only after the
commit has been successfully performed.getRevisionId in interface Commitnull.public void setRevisionId(Long revisionId)
CommitsetRevisionId in interface CommitrevisionId - The revision id to set.public Long getTimestamp()
CommitgetTimestamp in interface Commitpublic void setTimestamp(Long timestamp)
public void addInstruction(Instruction instruction)
Instruction.instruction - The Instruction.public List<Instruction> getInstructions()
CommitList of Instructions which were created from
the diff.getInstructions in interface CommitList of Instructions.Commit.getDiff()Copyright © 2012-2013 The Apache Software Foundation. All Rights Reserved.