Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.cinchapi.concourse.Concourse Maven / Gradle / Ivy
Go to download
Concourse is a self-tuning database that is designed for both ad hoc analytics and high volume transactions at scale. Developers use Concourse to quickly build mission critical software while also benefiting from real time insight into their most important data. With Concourse, end-to-end data management requires no extra infrastructure, no prior configuration and no additional coding–all of which greatly reduce costs and allow developers to focus on core business problems.
/*
* Copyright (c) 2013-2019 Cinchapi Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cinchapi.concourse;
import java.nio.file.Paths;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import javax.annotation.concurrent.NotThreadSafe;
import com.cinchapi.common.reflect.Reflection;
import com.cinchapi.concourse.annotate.Incubating;
import com.cinchapi.concourse.config.ConcourseClientPreferences;
import com.cinchapi.concourse.lang.BuildableState;
import com.cinchapi.concourse.lang.Criteria;
import com.cinchapi.concourse.lang.paginate.Page;
import com.cinchapi.concourse.lang.sort.Order;
import com.cinchapi.concourse.thrift.Diff;
import com.cinchapi.concourse.thrift.Operator;
import com.cinchapi.concourse.util.Convert;
import com.cinchapi.concourse.util.FileOps;
import com.google.common.collect.Multimap;
import com.google.common.collect.Sets;
/**
* A client connection to a Concourse node or cluster. Use one of the
* {@link Concourse#connect()} methods to instantiate.
*
* Overview
*
* Concourse is a self-tuning database that enables live analytics for large
* streams of operational data. Developers use Concourse to quickly build
* software that requires both ACID transactions and the ability to get data
* insights on demand. With Concourse, end-to-end data management requires no
* extra infrastructure, no prior configuration and no additional coding–all of
* which greatly reduce costs and allow developers to focus on core business
* problems.
*
*
* Using Transactions
*
* By default, Concourse conducts every operation in {@code autocommit} mode
* where every change is immediately written. Concourse also supports the
* ability to stage a group of operations within transactions that are atomic,
* consistent, isolated, and durable using the {@link #stage()},
* {@link #commit()} and {@link #abort()} methods.
*
*
* Thread Safety
*
* You should not use the same client connection in multiple
* threads. If you need to interact with Concourse using multiple threads, you
* should create a separate connection for each thread or use a
* {@link ConnectionPool}.
*
*
* @author Jeff Nelson
*/
@NotThreadSafe
public abstract class Concourse implements AutoCloseable {
/**
* Return a {@link ConnectionBuilder} to iteratively describe a Concourse
* connection. When finished, the connection can be established using the
* {@link ConnectionBuilder#connect()} method.
*
* @return a {@link ConnectionBuilder}
*/
public static ConnectionBuilder at() {
return new ConnectionBuilder();
}
/**
* Create a new connection to the Concourse deployment described in
* {@code ./concourse_client.prefs} (or, if the file does not exist, the
* default environment of the server at localhost:1717) and return a handle
* to facilitate interaction.
*
* @return the handle
*/
public static Concourse connect() {
return new ConcourseThriftDriver();
}
/**
* Create a new connection to the specified {@code environment} of the
* Concourse deployment described in {@code ~/concourse_client.prefs} (or,
* if the file does not exist, the server at localhost:1717) and return a
* handle to facilitate interaction.
*
* @param environment the environment to use
* @return the handle
*/
public static Concourse connect(String environment) {
return new ConcourseThriftDriver(environment);
}
/**
* Create a new connection to the default environment of the specified
* Concourse Server and return a handle to facilitate interaction.
*
* @param host the server host
* @param port the listener port for client connections
* @param username the name of the user on behalf of whom to connect
* @param password the password for the {@code username}
* @return the handle
*/
public static Concourse connect(String host, int port, String username,
String password) {
return new ConcourseThriftDriver(host, port, username, password);
}
/**
* Create a new connection to the specified {@code environment} of the
* specified Concourse Server and return a handle to facilitate interaction.
*
* @param host the server host
* @param port the listener port for client connections
* @param username the name of the user on behalf of whom to connect
* @param password the password for the {@code username}
* @param environment the name of the environment to use for the
* connection
* @return the handle
*/
public static Concourse connect(String host, int port, String username,
String password, String environment) {
return new ConcourseThriftDriver(host, port, username, password,
environment);
}
/**
* Create a new connection using the information specified in the
* {@code prefs}.
*
* @param prefs a {@link ConcourseClientPreferences prefs} handler
* @return the connection
*/
public static Concourse connectWithPrefs(ConcourseClientPreferences prefs) {
return connect(prefs.getHost(), prefs.getPort(), prefs.getUsername(),
String.valueOf(prefs.getPassword()), prefs.getEnvironment());
}
/**
* Create a new connection using the information specified in the prefs
* {@code file}.
*
* @param file the absolute path to the prefs file that contains the
* information for the Concourse deployment (relative paths will
* resolve to the user's home directory)
* @return the handle
*/
public static Concourse connectWithPrefs(String file) {
ConcourseClientPreferences prefs = ConcourseClientPreferences
.from(Paths.get(file));
return connectWithPrefs(prefs);
}
/**
* Create a new connecting by copying the connection information from the
* provided {@code concourse} handle.
*
* @param concourse an existing {@link Concourse} connection handle
* @return the handle
*/
public static Concourse copyExistingConnection(Concourse concourse) {
return concourse.copyConnection();
}
/**
* The interface to use for all {@link #calculate() calculation} methods.
*/
private Calculator calculator = null;
/**
* The interface to all of Concourse's client-side {@link #manage()
* management} methods.
*/
private Manager manager = null;
/**
* Abort the current transaction and discard any changes that are currently
* staged.
*
* After returning, the driver will return to {@code autocommit} mode and
* all subsequent changes will be committed immediately.
*
*
* Calling this method when the driver is not in {@code staging} mode is a
* no-op.
*
*/
public abstract void abort();
/**
* Append {@code key} as {@code value} in a new record.
*
* @param key the field name
* @param value the value to add
* @return the new record id
*/
public abstract long add(String key, T value);
/**
* Atomically append {@code key} as {@code value} in each of the
* {@code records} where it doesn't exist.
*
* @param key the field name
* @param value the value to add
* @param records a collection of record ids where an attempt is made to
* add the data
* @return a {@link Map} associating each record id to a boolean that
* indicates if the data was added
*/
public abstract Map add(String key, T value,
Collection records);
/**
* Append {@code key} as {@code value} in {@code record} if and only if it
* doesn't exist.
*
* @param key the field name
* @param value the value to add
* @param record the record id where an attempt is made to add the data
* @return a boolean that indicates if the data was added
*/
public abstract boolean add(String key, T value, long record);
/**
* Return a list all the changes ever made to {@code record}.
*
* @param record the record id
* @return a {@link Map} associating the {@link Timestamp} of each change
* to the respective description of the change
*/
public abstract Map audit(long record);
/**
* Return a list all the changes made to {@code record} since {@code start}
* (inclusive).
*
* @param record the record id
* @param start an inclusive {@link Timestamp} of the oldest change that
* should possibly be included in the audit – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating the {@link Timestamp} of each change
* to the respective description of the change
*/
public abstract Map audit(long record, Timestamp start);
/**
* Return a list all the changes made to {@code record} between
* {@code start} (inclusive) and {@code end} (non-inclusive).
*
* @param record the record id
* @param start an inclusive {@link Timestamp} for the oldest change that
* should possibly be included in the audit – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param end a non-inclusive {@link Timestamp} for the most recent change
* that should possibly be included in the audit – created from
* either a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating the {@link Timestamp} of each change
* to the respective description of the change
*/
public abstract Map audit(long record, Timestamp start,
Timestamp end);
/**
* Return a list all the changes ever made to the {@code key} field in
* {@code record}
*
* @param key the field name
* @param record the record id
* @return a {@link Map} associating the {@link Timestamp} of each change
* to the respective description of the change
*/
public abstract Map audit(String key, long record);
/**
* Return a list of all the changes made to the {@code key} field in
* {@code record} since {@code start} (inclusive).
*
* @param key the field name
* @param record the record id
* @param start an inclusive {@link Timestamp} for the oldest change that
* should possibly be included in the audit – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating the {@link Timestamp} of each change
* to the respective description of the change
*/
public abstract Map audit(String key, long record,
Timestamp start);
/**
* Return a list of all the changes made to the {@code key} field in
* {@code record} between {@code start} (inclusive) and {@code end}
* (non-inclusive).
*
* @param key the field name
* @param record the record id
* @param start an inclusive {@link Timestamp} for the oldest change that
* should possibly be included in the audit – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param end a non-inclusive {@link Timestamp} for the most recent change
* that should possibly be included in the audit – created from
* either a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating the {@link Timestamp} of each change
* to the respective description of the change
*/
public abstract Map audit(String key, long record,
Timestamp start, Timestamp end);
/**
* Return a view of the values from all records that are currently stored
* for each of the {@code keys}.
*
* @param keys a collection of field names
* @return a {@link Map} associating each of the {@code keys} to a
* another {@link Map} associating each indexed value to the
* {@link Set} of records that contain that value in the {@code key}
* field
*/
public abstract Map>> browse(
Collection keys);
/**
* Return a view of the values from all records that were stored for each of
* the {@code keys} at {@code timestamp}.
*
* @param keys a collection of field names
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each of the {@code keys} to a
* another {@link Map} associating each indexed value to the
* {@link Set} of records that contained that value in the
* {@code key} field at {@code timestamp}
*/
public abstract Map>> browse(
Collection keys, Timestamp timestamp);
/**
* Return a view of the values from all records that are currently stored
* for {@code key}.
*
* @param key the field name
* @return a {@link Map} associating each indexed value to the {@link Set}
* of records that contain that value in the {@code key} field
*/
public abstract Map> browse(String key);
/**
* Return a view of the values from all records that were stored for
* {@code key} at {@code timestamp}.
*
* @param key the field name
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each indexed value to the {@link Set}
* of records that contained that value in the {@code key} field at
* {@code timestamp}
*/
public abstract Map> browse(String key,
Timestamp timestamp);
/**
* Return a {@link Calculator} to use for calculations across data.
*
* @return a {@link Calculator}
*/
public Calculator calculate() {
if(calculator == null) {
calculator = new Calculator(this);
}
return calculator;
}
/**
* Perform the specified calculation {@code method} using the provided
* {@code args}.
*
* @param method the name of the calculation method in the
* {@link Calculator} interface
* @param args the args to pass to the method
* @return the result of the calculation
*/
public Object calculate(String method, Object... args) {
if(calculator == null) {
calculator = new Calculator(this);
}
return Reflection.call(calculator, method, args);
}
/**
* Return a time series that contains a snapshot of the values stored for
* {@code key} in {@code record} after every change made to the field.
*
* @param key the field name
* @param record the record id
* @return a {@link Map} associating the {@link Timestamp} of each change to
* the {@link Set} of values that were stored in the field after
* that change
*/
public abstract Map> chronologize(String key,
long record);
/**
* Return a time series between {@code start} (inclusive) and the present
* that contains a snapshot of the values stored for {@code key} in
* {@code record} after every change made to the field during the time span.
*
* @param key the field name
* @param record the record id
* @param start the first possible {@link Timestamp} to include in the
* time series – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating the {@link Timestamp} of each change to
* the {@link Set} of values that were stored in the field after
* that change
*/
public abstract Map> chronologize(String key,
long record, Timestamp start);
/**
* Return a time series between {@code start} (inclusive) and {@code end}
* (non-inclusive) that contains a snapshot of the values stored for
* {@code key} in {@code record} after every change made to the field during
* the time span.
*
* @param key the field name
* @param record the record id
* @param start the first possible {@link Timestamp} to include in the
* time series – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param end the {@link Timestamp} that should be greater than every
* timestamp in the time series – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating the {@link Timestamp} of each change to
* the {@link Set} of values that were stored in the field after
* that change
*/
public abstract Map> chronologize(String key,
long record, Timestamp start, Timestamp end);
/**
* Atomically remove all the values stored for every key in each of the
* {@code records}.
*
* @param records a collection of record ids
*/
public abstract void clear(Collection records);
/**
* Atomically remove all the values stored for each of the {@code keys} in
* each of the {@code records}.
*
* @param keys a collection of field names
* @param records a collection of record ids.
*/
public abstract void clear(Collection keys,
Collection records);
/**
* Atomically remove all the values stored for each of the {@code keys} in
* {@code record}.
*
* @param keys a collection of field names
* @param record the record id
*/
public abstract void clear(Collection keys, long record);
/**
* Atomically remove all the values stored for every key in {@code record}.
*
* @param record the record id
*/
public abstract void clear(long record);
/**
* Atomically remove all the values stored for {@code key} in each of the
* {@code records}.
*
* @param key the field name
* @param records a collection of record ids
*/
public abstract void clear(String key, Collection records);
/**
* Atomically remove all the values stored for {@code key} in {@code record}
*
* @param key the field name
* @param record the record id
*/
public abstract void clear(String key, long record);
/**
*
* An alias for the {@link #exit()} method.
*
* {@inheritDoc}
*/
@Override
public final void close() {
exit();
}
/**
* Attempt to permanently commit any changes that are staged in a
* transaction and return {@code true} if and only if all the changes can be
* applied. Otherwise, returns {@code false} and all the changes are
* discarded.
*
* After returning, the driver will return to {@code autocommit} mode and
* all subsequent changes will be committed immediately.
*
*
* This method will return {@code false} if it is called when the driver is
* not in {@code staging} mode.
*
*
* @return {@code true} if all staged changes are committed, otherwise
* {@code false}
*/
public abstract boolean commit();
/**
* Return all of the keys in the database.
*
* @return a {@link Set} of keys in the database
*/
public abstract Set describe();
/**
* For each of the {@code records}, return all of the keys that have at
* least one value.
*
* @param records a collection of record ids
* @return a {@link Map} associating each of the {@code records} to the
* {@link Set} of keys in that record
*/
public abstract Map> describe(Collection records);
/**
* For each of the {@code records}, return all the keys that had at least
* one value at {@code timestamp}.
*
* @param records a collection of record ids
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each of the {@code records} to the
* {@link Set} of keys that were in that record at {@code timestamp}
*/
public abstract Map> describe(Collection records,
Timestamp timestamp);
/**
* Return all the keys in {@code record} that have at least one value.
*
* @param record the record id
* @return the {@link Set} of keys in {@code record}
*/
public abstract Set describe(long record);
/**
* Return all the keys in {@code record} that had at least one value at
* {@code timestamp}.
*
* @param record the record id
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return the {@link Set} of keys that were in {@code record} at
* {@code timestamp}
*/
public abstract Set describe(long record, Timestamp timestamp);
/**
* Return all of the keys in the database at {@code timestamp}.
*
* @return a {@link Set} of keys in the database at {@code timestamp}
*/
public abstract Set describe(Timestamp timestamp);
/**
* Return the net changes made to {@code record} since
* {@code start}.
*
* If you begin with the state of the {@code record} at {@code start} and
* re-apply all the changes in the diff, you'll re-create the state of the
* {@code record} at the present.
*
*
* Unlike the {@link #audit(long, Timestamp) audit} method,
* {@link #diff(long, Timestamp) diff} does not necessarily reflect ALL the
* changes made to {@code record} during the time span.
*
*
* @param record the record id
* @param start the base timestamp from which the diff is calculated
* @return a {@link Map} associating each key in the {@code record} to
* another {@link Map} associating a {@link Diff change
* description} to the {@link Set} of values that fit the
* description (i.e.
* {"key": {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}}
*
)
*/
public abstract Map>> diff(long record,
Timestamp start);
/**
* Return the net changes made to {@code record} from {@code start}
* to {@code end}.
*
* If you begin with the state of the {@code record} at {@code start} and
* re-apply all the changes in the diff, you'll re-create the state of the
* same {@code record} at {@code end}.
*
*
* Unlike the {@link #audit(long, Timestamp, Timestamp) audit} method,
* {@link #diff(long, Timestamp) diff} does not necessarily reflect ALL the
* changes made to {@code record} during the time span.
*
*
* @param record the record id
* @param start the base timestamp from which the diff is calculated
* @param end the comparison timestamp to which the diff is calculated
* @return a {@link Map} associating each key in the {@code record} to
* another {@link Map} associating a {@link Diff change
* description} to the {@link Set} of values that fit the
* description (i.e.
* {"key": {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}}
*
)
*/
public abstract Map>> diff(long record,
Timestamp start, Timestamp end);
/**
* List the net changes made to {@code key} in {@code record} since
* {@code start}.
*
* If you begin with the state of the field at {@code start} and re-apply
* all the changes in the diff, you'll re-create the state of the same field
* at the present.
*
*
* @param key the field name
* @param record the record id
* @param start the base timestamp from which the diff is calculated
* @return a {@link Map} associating a {@link Diff change
* description} to the {@link Set} of values that fit the
* description (i.e.
* {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}
*
)
*/
public abstract Map> diff(String key, long record,
Timestamp start);
/**
* Return the net changes made to {@code key} in {@code record}
* from {@code start} to {@code end}.
*
* If you begin with the state of the field at {@code start} and re-apply
* all the changes in the diff, you'll re-create the state of the same field
* at {@code end}.
*
*
* @param key the field name
* @param record the record id
* @param start the base timestamp from which the diff is calculated
* @param end the comparison timestamp to which the diff is calculated
* @return a {@link Map} associating a {@link Diff change
* description} to the {@link Set} of values that fit the
* description (i.e.
* {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}
*
)
*/
public abstract Map> diff(String key, long record,
Timestamp start, Timestamp end);
/**
* Return the net changes made to the {@code key} field across all
* records since {@code start}.
*
* If you begin with the state of the inverted index for {@code key} at
* {@code start} and re-apply all the changes in the diff, you'll re-create
* the state of the same index at the present.
*
*
* Unlike the {@link #audit(String, long, Timestamp) audit} method,
* {@link #diff(long, Timestamp) diff} does not necessarily reflect ALL the
* changes made to {@code key} in {@code record} during the time span.
*
*
* @param key the field name
* @param start the base timestamp from which the diff is calculated
* @return a {@link Map} associating each value stored for {@code key}
* across all records to another {@link Map} that associates a
* {@link Diff change description} to the {@link Set} of records
* where the description applies to that value in the {@code key}
* field (i.e.
* {"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
*
)
*/
public abstract Map>> diff(String key,
Timestamp start);
/**
* Return the net changes made to the {@code key} field across all
* records from {@code start} to {@code end}.
*
* If you begin with the state of the inverted index for {@code key} at
* {@code start} and re-apply all the changes in the diff, you'll re-create
* the state of the same index at {@code end}.
*
*
* Unlike the {@link #audit(String, long, Timestamp, Timestamp) audit}
* method, {@link #diff(long, Timestamp) diff} does not necessarily return
* ALL the changes made to {@code key} in {@code record} during the time
* span.
*
*
* @param key the field name
* @param start the base timestamp from which the diff is calculated
* @param end the comparison timestamp to which the diff is calculated
* @return a {@link Map} associating each value stored for {@code key}
* across all records to another {@link Map} that associates a
* {@link Diff change description} to the {@link Set} of records
* where the description applies to that value in the {@code key}
* field (i.e.
* {"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
*
)
*/
public abstract Map>> diff(String key,
Timestamp start, Timestamp end);
/**
* Terminate the client's session and close this connection.
*/
public abstract void exit();
/**
* Return the set of records that satisfy the {@link Criteria criteria}.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @return the records that match the {@code criteria}
*/
public abstract Set find(Criteria criteria);
/**
* Return the set of records that satisfy the {@link Criteria criteria}.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the {@code criteria}
*/
public abstract Set find(Criteria criteria, Order order);
/**
* Return the set of records that satisfy the {@link Criteria criteria}.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the {@code criteria}
*/
public abstract Set find(Criteria criteria, Page page);
/**
* Return the set of records that satisfy the {@link Criteria criteria}.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the {@code criteria}
*/
public abstract Set find(Criteria criteria, Order order, Page page);
/**
* Return the set of records that satisfy the {@link Criteria criteria}.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the {@code criteria}
*/
public final Set find(Criteria criteria, Page page, Order order) {
return find(criteria, order, page);
}
/**
* Return the set of records that satisfy the {@code ccl} filter.
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @return the records that match the criteria
*/
public abstract Set find(String ccl);
/**
* Return the set of records where {@code key} {@link Operator#EQUALS
* equals} {@code value}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object)} with {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @return the records where {@code key} = {@code value}
*/
public abstract Set find(String key, Object value);
/**
* Return the set of records where {@code key} {@link Operator#EQUALS
* equals} {@code value}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object)} with {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records where {@code key} = {@code value}
*/
public abstract Set find(String key, Object value, Order order);
/**
* Return the set of records where {@code key} {@link Operator#EQUALS
* equals} {@code value}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object)} with {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records where {@code key} = {@code value}
*/
public abstract Set find(String key, Object value, Page page);
/**
* Return the set of records where {@code key} {@link Operator#EQUALS
* equals} {@code value}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object)} with {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records where {@code key} = {@code value}
*/
public abstract Set find(String key, Object value, Order order,
Page page);
/**
* Return the set of records where {@code key} {@link Operator#EQUALS
* equals} {@code value}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object)} with {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records where {@code key} = {@code value}
*/
public final Set find(String key, Object value, Page page,
Order order) {
return find(key, value, order, page);
}
/**
* Return the set of records where {@code key} was {@link Operator#EQUALS
* equal} to {@code value} at {@code timestamp}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object, Timestamp)} with
* {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return the records where {@code key} was equal to {@code value} at
* {@code timestamp}
*/
public abstract Set find(String key, Object value,
Timestamp timestamp);
/**
* Return the set of records where {@code key} was {@link Operator#EQUALS
* equal} to {@code value} at {@code timestamp}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object, Timestamp)} with
* {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records where {@code key} was equal to {@code value} at
* {@code timestamp}
*/
public abstract Set find(String key, Object value,
Timestamp timestamp, Order order);
/**
* Return the set of records where {@code key} was {@link Operator#EQUALS
* equal} to {@code value} at {@code timestamp}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object, Timestamp)} with
* {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records where {@code key} was equal to {@code value} at
* {@code timestamp}
*/
public abstract Set find(String key, Object value,
Timestamp timestamp, Page page);
/**
* Return the set of records where {@code key} was {@link Operator#EQUALS
* equal} to {@code value} at {@code timestamp}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object, Timestamp)} with
* {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records where {@code key} was equal to {@code value} at
* {@code timestamp}
*/
public abstract Set find(String key, Object value,
Timestamp timestamp, Order order, Page page);
/**
* Return the set of records where {@code key} was {@link Operator#EQUALS
* equal} to {@code value} at {@code timestamp}.
*
* This method is a shortcut for calling
* {@link #find(String, Operator, Object, Timestamp)} with
* {@link Operator#EQUALS}.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field for the
* record to match
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records where {@code key} was equal to {@code value} at
* {@code timestamp}
*/
public final Set find(String key, Object value, Timestamp timestamp,
Page page, Order order) {
return find(key, value, timestamp, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2, Order order);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2, Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2, Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, Operator operator, Object value,
Object value2, Page page, Order order) {
return find(key, operator, value, value2, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2, Timestamp timestamp);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2, Timestamp timestamp, Order order);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2, Timestamp timestamp, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Object value2, Timestamp timestamp, Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* values to those stored across the {@code key} field while
* determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, Operator operator, Object value,
Object value2, Timestamp timestamp, Page page, Order order) {
return find(key, operator, value, value2, timestamp, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Order order);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, Operator operator, Object value,
Page page, Order order) {
return find(key, operator, value, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@timestamp} that satisfies the {@code operator} in
* relation to the {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Timestamp timestamp);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@timestamp} that satisfies the {@code operator} in
* relation to the {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Timestamp timestamp, Order order);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@timestamp} that satisfies the {@code operator} in
* relation to the {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Timestamp timestamp, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@timestamp} that satisfies the {@code operator} in
* relation to the {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, Operator operator, Object value,
Timestamp timestamp, Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@timestamp} that satisfies the {@code operator} in
* relation to the {@code value}.
*
* @param key the field name
* @param operator the {@link Operator} to use when comparing the specified
* {@code value} to those stored across the {@code key} field
* while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, Operator operator, Object value,
Timestamp timestamp, Page page, Order order) {
return find(key, operator, value, timestamp, order, page);
}
/**
* Return the set of records that satisfy the {@code ccl} filter.
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String ccl, Order order);
/**
* Return the set of records that satisfy the {@code ccl} filter.
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String ccl, Page page);
/**
* Return the set of records that satisfy the {@code ccl} filter.
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String ccl, Order order, Page page);
/**
* Return the set of records that satisfy the {@code ccl} filter.
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String ccl, Page page, Order order) {
return find(ccl, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2, Order order);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2, Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2, Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to
* {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, String operator, Object value,
Object value2, Page page, Order order) {
return find(key, operator, value, value2, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2, Timestamp timestamp);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2, Timestamp timestamp, Order order);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2, Timestamp timestamp, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Object value2, Timestamp timestamp, Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to {@code value} and {@code value2}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the first comparison value for the {@code operator}
* @param value2 the second comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, String operator, Object value,
Object value2, Timestamp timestamp, Page page, Order order) {
return find(key, operator, value, value2, timestamp, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Order order);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contains at
* least one value that satisfies the {@code operator} in relation to the
* {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, String operator, Object value,
Page page, Order order) {
return find(key, operator, value, order, page);
}
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to the {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Timestamp timestamp);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to the {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Timestamp timestamp, Order order);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to the {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Timestamp timestamp, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to the {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return the records that match the criteria
*/
public abstract Set find(String key, String operator, Object value,
Timestamp timestamp, Order order, Page page);
/**
* Return the set of {@code records} where the {@code key} field contained
* at least one value at {@code timestamp} that satisfies the
* {@code operator} in relation to the {@code value}.
*
* @param key the field name
* @param operator a valid {@link Convert#stringToOperator(String)
* description} of an {@link Operator} to use when comparing the
* specified {@code value} to those stored across the {@code key}
* field while determining which records are matches
* @param value the comparison value for the {@code operator}
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use when checking for matches – created from either
* a {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return the records that match the criteria
*/
public final Set find(String key, String operator, Object value,
Timestamp timestamp, Page page, Order order) {
return find(key, operator, value, timestamp, order, page);
}
/**
* Return the unique record where {@code key} {@link Operator#EQUALS equals}
* {@code value}, or throw a {@link DuplicateEntryException} if multiple
* records match the condition. If no record matches,
* {@link #add(String, Object) add} {@code key} as {@code value} into an new
* record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only adds data if that condition isn't
* currently satisfied.
*
*
* @param key the field name
* @param value the value that must exist in the {@code key} field of a
* single record for that record to match or the value that is
* added to the {@code key} field in a new record if no existing
* record matches the condition
* @return the unique record where {@code key} = {@code value}, if one exist
* or the record where the {@code key} as {@code value} is added
* @throws DuplicateEntryException
*/
public abstract long findOrAdd(String key, T value)
throws DuplicateEntryException;
/**
* Return the unique record that matches the {@code criteria}, if
* one exist or throw a {@link DuplicateEntryException} if multiple records
* match. If no record matches, {@link #insert(Map)} the {@code data} into a
* new record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* Each of the values in {@code data} must be a primitive or one dimensional
* object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).
*
*
* This method is syntactic sugar for {@link #findOrInsert(Criteria, Map)}.
* The only difference is that this method takes a in-process
* {@link Criteria} building sequence for convenience.
*
*
* @param criteria an in-process {@link Criteria} building sequence that
* contains an {@link BuildableState#build() unfinalized},
* but well-formed filter for the desired record
* @param data a {@link Map} with key/value associations to insert into the
* new record
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public final long findOrInsert(BuildableState criteria,
Map data) throws DuplicateEntryException {
String json = Convert.mapToJson(data);
return findOrInsert(criteria, json);
}
/**
* Return the unique record that matches the {@code criteria}, if one exist
* or throw a {@link DuplicateEntryException} if multiple records match. If
* no record matches, {@link #insert(Multimap)} the {@code data} into a new
* record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* Each of the values in {@code data} must be a primitive or one dimensional
* object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).
*
*
* This method is syntactic sugar for
* {@link #findOrInsert(Criteria, Multimap)}. The only difference is that
* this method takes a in-process {@link Criteria} building sequence for
* convenience.
*
*
* @param criteria an in-process {@link Criteria} building sequence that
* contains an {@link BuildableState#build() unfinalized},
* but well-formed filter for the desired
* record
* @param data a {@link Multimap} with key/value associations to insert into
* the new record
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public final long findOrInsert(BuildableState criteria,
Multimap data) throws DuplicateEntryException {
String json = Convert.mapToJson(data);
return findOrInsert(criteria, json);
}
/**
* Return the unique record that matches the {@code criteria}, if one exist
* or throw a {@link DuplicateEntryException} if multiple records match. If
* no record matches, {@link #insert(String)} the {@code json} into a new
* record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* This method is syntactic sugar for
* {@link #findOrInsert(Criteria, String)}. The only difference is that this
* method takes a in-process {@link Criteria} building sequence for
* convenience.
*
*
* @param criteria an in-process {@link Criteria} building sequence that
* contains an {@link BuildableState#build() unfinalized},
* but well-formed filter for the desired
* record
* @param json a JSON blob describing a single object
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public long findOrInsert(BuildableState criteria, String json)
throws DuplicateEntryException {
return findOrInsert(criteria.build(), json);
}
/**
* Return the unique record that matches the {@code criteria}, if one exist
* or throw a {@link DuplicateEntryException} if multiple records match. If
* no record matches, {@link #insert(Map)} the {@code data} into a
* new record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* Each of the values in {@code data} must be a primitive or one dimensional
* object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).
*
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired record
* @param data a {@link Map} with key/value associations to insert into the
* new record
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public final long findOrInsert(Criteria criteria, Map data)
throws DuplicateEntryException {
String json = Convert.mapToJson(data);
return findOrInsert(criteria, json);
}
/**
* Return the unique record that matches the {@code criteria}, if one exist
* or throw a {@link DuplicateEntryException} if multiple records match. If
* no record matches, {@link #insert(Multimap)} the {@code data} into a new
* record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* Each of the values in {@code data} must be a primitive or one dimensional
* object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).
*
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired record
* @param data a {@link Multimap} with key/value associations to insert into
* the new record
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public final long findOrInsert(Criteria criteria,
Multimap data) throws DuplicateEntryException {
String json = Convert.mapToJson(data);
return findOrInsert(criteria, json);
}
/**
* Return the unique record that matches the {@code criteria}, if one exist
* or throw a {@link DuplicateEntryException} if multiple records match. If
* no record matches, {@link #insert(String)} the {@code json} into a new
* record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired record
* @param data a JSON blob describing a single object
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public abstract long findOrInsert(Criteria criteria, String json)
throws DuplicateEntryException;
/**
* Return the unique record that matches the {@code ccl} filter, if one
* exist or throw a {@link DuplicateEntryException} if multiple records
* match. If no record matches, {@link #insert(Map)} the {@code data} into a
* new record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* Each of the values in {@code data} must be a primitive or one dimensional
* object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).
*
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param data a {@link Map} with key/value associations to insert into the
* new record
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public final long findOrInsert(String ccl, Map data)
throws DuplicateEntryException {
String json = Convert.mapToJson(data);
return findOrInsert(ccl, json);
}
/**
* Return the unique record that matches the {@code ccl} filter, if one
* exist or throw a {@link DuplicateEntryException} if multiple records
* match. If no record matches, {@link #insert(Multimap)} the {@code data}
* into a new record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* Each of the values in {@code data} must be a primitive or one dimensional
* object (e.g. no nested {@link Map maps} or {@link Multimap multimaps}).
*
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param data a {@link Multimap} with key/value associations to insert into
* the new record
* @return the unique record that matches {@code criteria}, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public final long findOrInsert(String ccl, Multimap data)
throws DuplicateEntryException {
String json = Convert.mapToJson(data);
return findOrInsert(ccl, json);
}
/**
* Return the unique record that matches the {@code ccl} filter, if one
* exist or throw a {@link DuplicateEntryException} if multiple records
* match. If no record matches, {@link #insert(String)} the {@code json}
* into a new record and return the id.
*
* This method can be used to simulate a unique index because it atomically
* checks for a condition and only inserts data if that condition isn't
* currently satisfied.
*
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param json a JSON blob describing a single object
* @return the unique record that matches {@code ccl} string, if one exist
* or the record where the {@code json} data is inserted
* @throws DuplicateEntryException
*/
public abstract long findOrInsert(String ccl, String json)
throws DuplicateEntryException;
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Collection records);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Collection records, Order order);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Collection records, Page page);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Collection records, Order order, Page page);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public final Map> get(Collection keys,
Collection records, Page page, Order order) {
return get(keys, records, order, page);
}
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added at {@code timestamp}.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Collection records, Timestamp timestamp);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added at {@code timestamp}.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Collection records, Timestamp timestamp, Order order);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added at {@code timestamp}.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Collection records, Timestamp timestamp, Page page);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added at {@code timestamp}.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Collection records, Timestamp timestamp, Order order,
Page page);
/**
* For each of the {@code keys} in each of the {@code records}, return the
* stored value that was most recently added at {@code timestamp}.
*
* @param keys a collection of field names
* @param records a collection of record ids
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the {@code records} to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public final Map> get(Collection keys,
Collection records, Timestamp timestamp, Page page,
Order order) {
return get(keys, records, timestamp, order, page);
}
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Criteria criteria);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Criteria criteria, Order order);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Criteria criteria, Page page);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
Criteria criteria, Order order, Page page);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public final Map> get(Collection keys,
Criteria criteria, Page page, Order order) {
return get(keys, criteria, order, page);
}
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added at {@code timestamp}.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Criteria criteria, Timestamp timestamp);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added at {@code timestamp}.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Criteria criteria, Timestamp timestamp, Order order);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added at {@code timestamp}.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Criteria criteria, Timestamp timestamp, Page page);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added at {@code timestamp}.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
Criteria criteria, Timestamp timestamp, Order order, Page page);
/**
* For each of the {@code keys} in every record that matches the
* {@code criteria}, return the stored value that was most recently
* added at {@code timestamp}.
*
* @param keys a collection of field names
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public final Map> get(Collection keys,
Criteria criteria, Timestamp timestamp, Page page, Order order) {
return get(keys, criteria, timestamp, order, page);
}
/**
* For each of the {@code keys} in {@code record}, return the stored value
* that was most recently added.
*
* @param keys a collection of field names
* @param record the record id
* @return a {@link Map} associating each of the {@code keys} to the
* freshest value in the field
*/
public abstract Map get(Collection keys,
long record);
/**
* For each of the {@code keys} in {@code record}, return the stored value
* that was most recently added at {@code timestamp}.
*
* @param keys a collection of field names
* @param record the record id
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each of the {@code keys} to the
* freshest
* value in the field at {@code timestamp}
*/
public abstract Map get(Collection keys, long record,
Timestamp timestamp);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
String ccl);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
String ccl, Order order);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
String ccl, Page page);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public abstract Map> get(Collection keys,
String ccl, Order order, Page page);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field
*/
public final Map> get(Collection keys,
String ccl, Page page, Order order) {
return get(keys, ccl, order, page);
}
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added at
* {@code timestamp}.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
String ccl, Timestamp timestamp);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added at
* {@code timestamp}.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
String ccl, Timestamp timestamp, Order order);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added at
* {@code timestamp}.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
String ccl, Timestamp timestamp, Page page);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added at
* {@code timestamp}.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Collection keys,
String ccl, Timestamp timestamp, Order order, Page page);
/**
* For each of the {@code keys} in every record that matches the {@code ccl}
* filter, return the stored value that was most recently added at
* {@code timestamp}.
*
* @param keys a collection of field names
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the {@code keys} to the freshest
* value in the field at {@code timestamp}
*/
public final Map> get(Collection keys,
String ccl, Timestamp timestamp, Page page, Order order) {
return get(keys, ccl, timestamp, order, page);
}
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field
*/
public abstract Map> get(Criteria criteria);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field
*/
public abstract Map> get(Criteria criteria,
Order order);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field
*/
public abstract Map> get(Criteria criteria,
Page page);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field
*/
public abstract Map> get(Criteria criteria,
Order order, Page page);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added.
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field
*/
public final Map> get(Criteria criteria, Page page,
Order order) {
return get(criteria, order, page);
}
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added at {@code timestamp} .
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Criteria criteria,
Timestamp timestamp);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added at {@code timestamp} .
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Criteria criteria,
Timestamp timestamp, Order order);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added at {@code timestamp} .
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Criteria criteria,
Timestamp timestamp, Page page);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added at {@code timestamp} .
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field at {@code timestamp}
*/
public abstract Map> get(Criteria criteria,
Timestamp timestamp, Order order, Page page);
/**
* For every key in every record that matches the {@code criteria}, return
* the stored value that was most recently added at {@code timestamp} .
*
* @param criteria a {@link Criteria} that contains a well-formed filter for
* the desired records
* @param timestamp a {@link Timestamp} that represents the historical
* instant to use in the lookup – created from either a
* {@link Timestamp#fromString(String) natural language
* description} of a point in time (i.e. two weeks ago), OR
* the {@link Timestamp#fromMicros(long) number
* of microseconds} since the Unix epoch, OR
* a {@link Timestamp#fromJoda(org.joda.time.DateTime) Joda
* DateTime} object
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field at {@code timestamp}
*/
public final Map> get(Criteria criteria,
Timestamp timestamp, Page page, Order order) {
return get(criteria, timestamp, order, page);
}
/**
* For every key in every record that matches the {@code ccl} filter, return
* the stored value that was most recently added.
*
* @param ccl a well-formed criteria expressed using the Concourse Criteria
* Language
* @return a {@link Map} associating each of the matching records to another
* {@link Map} associating each of the record's keys to the freshest
* value in the field
*/
public abstract Map> get(String ccl);
/**
* For each of the {@code records}, return the stored value in the
* {@code key} field that was most recently added.
*
* @param key the field name
* @param records a collection of record ids
* @return a {@link Map} associating each of the {@code records} to the
* freshest value in the {@code key} field
*/
public abstract Map get(String key, Collection records);
/**
* For each of the {@code records}, return the stored value in the
* {@code key} field that was most recently added.
*
* @param key the field name
* @param records a collection of record ids
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @return a {@link Map} associating each of the {@code records} to the
* freshest value in the {@code key} field
*/
public abstract Map get(String key, Collection records,
Order order);
/**
* For each of the {@code records}, return the stored value in the
* {@code key} field that was most recently added.
*
* @param key the field name
* @param records a collection of record ids
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the {@code records} to the
* freshest value in the {@code key} field
*/
public abstract Map get(String key, Collection records,
Page page);
/**
* For each of the {@code records}, return the stored value in the
* {@code key} field that was most recently added.
*
* @param key the field name
* @param records a collection of record ids
* @param order an {@link Order} specification that describes how the result
* set should be sorted
* @param page a {@link Page) specification that describes the page of the
* result set to return
* @return a {@link Map} associating each of the {@code records} to the
* freshest value in the {@code key} field
*/
public abstract Map