public final class CommandBuilder extends Object
CommandBuilder provides the fluent factory methods for constructing
Commands. Obtain an instance via Command.to(),
Command.is(), or Command.go().
Each method returns a state object whose methods guide the caller through the
valid parameter sequence for that command. Terminal states implement
Command, so the result can be used directly without an explicit
build() call.
public FindCommand.ConditionState find(Criteria criteria)
criteria - the Criteria to findpublic FindCommand.ConditionState find(String ccl)
find Command using a raw CCL condition
string.ccl - the CCL conditionpublic SelectCommand.KeyState select(String key)
key - the key to selectpublic SelectCommand.KeyState select(String key, String... moreKeys)
key - the first key to selectmoreKeys - additional keyspublic SelectCommand.SourceState select(long record)
record - the record to select frompublic SelectCommand.SourceState select(long record, long... moreRecords)
record - the first recordmoreRecords - additional recordspublic SelectCommand.AllKeysState selectAll()
select Command for all keys.public GetCommand.KeyState get(String key)
key - the key to getpublic GetCommand.KeyState get(String key, String... moreKeys)
key - the first key to getmoreKeys - additional keyspublic GetCommand.SourceState get(long record)
record - the record to get frompublic GetCommand.SourceState get(long record, long... moreRecords)
record - the first recordmoreRecords - additional recordspublic GetCommand.AllKeysState getAll()
get Command for all keys.public NavigateCommand.KeyState navigate(String key)
key - the key to navigatepublic NavigateCommand.KeyState navigate(String key, String... moreKeys)
key - the first key to navigatemoreKeys - additional keyspublic AddCommand.KeyState add(String key)
key - the key to addpublic SetCommand.KeyState set(String key)
key - the key to setpublic RemoveCommand.KeyState remove(String key)
key - the key to removepublic ClearCommand.KeyState clear(String key)
key - the key to clearpublic ClearCommand.KeyState clear(String key, String... moreKeys)
key - the first key to clearmoreKeys - additional keyspublic ClearCommand.RecordState clear(long record)
record - the record to clearCommandpublic ClearCommand.RecordState clear(long record, long... moreRecords)
record - the first record to clearmoreRecords - additional recordsCommandpublic InsertCommand.JsonState insert(String json)
insert Command with the provided JSON
data.json - the JSON string to insertpublic LinkCommand.KeyState link(String key)
key - the link keypublic UnlinkCommand.KeyState unlink(String key)
key - the link keypublic VerifyCommand.KeyState verify(String key)
key - the key to verifypublic VerifyAndSwapCommand.KeyState verifyAndSwap(String key)
key - the key to verify and swappublic VerifyOrSetCommand.KeyState verifyOrSet(String key)
key - the key to verify or setpublic FindOrAddCommand.KeyState findOrAdd(String key)
key - the key to find or addpublic FindOrInsertCommand.ConditionState findOrInsert(Criteria criteria)
criteria - the Criteria to searchpublic FindOrInsertCommand.ConditionState findOrInsert(String ccl)
findOrInsert Command using a raw CCL
condition string.ccl - the CCL conditionpublic SearchCommand.KeyState search(String key)
key - the key to searchpublic BrowseCommand.State browse(String key)
key - the key to browsepublic BrowseCommand.State browse(String key, String... moreKeys)
key - the first key to browsemoreKeys - additional keyspublic DescribeCommand.State describe(long record)
record - the record to describepublic DescribeCommand.State describe(long record, long... moreRecords)
record - the first record to describemoreRecords - additional recordspublic DescribeCommand.AllState describeAll()
public TraceCommand.State trace(long record)
record - the record to tracepublic TraceCommand.State trace(long record, long... moreRecords)
record - the first record to tracemoreRecords - additional recordspublic HoldsCommand.State holds(long record)
record - the record to checkpublic HoldsCommand.State holds(long record, long... moreRecords)
record - the first record to checkmoreRecords - additional recordspublic JsonifyCommand.State jsonify(long record)
record - the record to jsonifypublic JsonifyCommand.State jsonify(long record, long... moreRecords)
record - the first record to jsonifymoreRecords - additional recordspublic ChronicleCommand.KeyState chronicle(String key)
key - the key to chroniclepublic DiffCommand.RecordState diff(long record)
record - the record to diffpublic DiffCommand.KeyState diff(String key)
key - the key to diffpublic AuditCommand.RecordState audit(long record)
record - the record to auditpublic AuditCommand.KeyState audit(String key)
key - the key to auditpublic RevertCommand.KeyState revert(String key)
key - the key to revertpublic RevertCommand.KeyState revert(String key, String... moreKeys)
key - the first key to revertmoreKeys - additional keyspublic ReconcileCommand.KeyState reconcile(String key)
key - the key to reconcilepublic ConsolidateCommand.State consolidate(long first, long second, long... remaining)
first - the target recordsecond - the first record to mergeremaining - additional records to mergeCommandpublic CalculateCommand.State calculate(String function, String key)
function - the calculation function (e.g., sum, avg)key - the key to calculate