@Immutable public final class Link extends Number implements Comparable<Link>
Link is a pointer to a record.
Links should never be written directly. They can be created using the
link() methods in the
Concourse API.
Links may be returned when reading data using the
select(), get() and
browse() methods. When handling Link
objects, you can retrieve the underlying record id by calling
longValue().
When performing a
bulk insert, you
can use this class to create Link objects that are added to the data/json
blob. Links inserted in this manner will be written in the same way they
would have been if they were written using the
link() API
methods.
To create a static link to a single record, use to(long).
To create static links to each of the records that match a criteria, use one
of the Link.toWhere() methods (see the
documentation for resolvable links for more information).
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Link other) |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
static Link |
to(long record)
Return a Link that points to
record. |
String |
toString() |
static String |
toWhere(Criteria criteria)
Return a string that instructs Concourse to create links that point to
each of the records that match the
ccl string. |
static String |
toWhere(Object criteria)
Return a string that instructs Concourse to create links that point to
each of the records that match the
ccl string. |
static String |
toWhere(String ccl)
Return a string that instructs Concourse to create links that point to
each of the records that match the
ccl string. |
byteValue, shortValuepublic static Link to(long record)
record.record - the record idLink that points to recordpublic static String toWhere(String ccl)
ccl string.
NOTE: This method DOES NOT return a Link object,
so it should only be used when adding a
resolvable
link value to a data/json blob that will be passed to the
insert() methods.
ccl - a CCL string that describes the records to which a Link should
pointresolvable link instructionpublic static String toWhere(Criteria criteria)
ccl string.
NOTE: This method DOES NOT return a Link object,
so it should only be used when adding a
resolvable
link value to a data/json blob that will be passed to the
insert() methods.
criteria - a Criteria that describes the records to which a
Link should pointresolvable link instructionpublic static String toWhere(Object criteria)
ccl string.
NOTE: This method DOES NOT return a Link object,
so it should only be used when adding a
resolvable
link value to a data/json blob that will be passed to the
insert() methods.
criteria - a criteria builder in a BuildableState that
describes the records to which a Link should pointresolvable link instructionpublic int compareTo(Link other)
compareTo in interface Comparable<Link>public double doubleValue()
doubleValue in class Numberpublic float floatValue()
floatValue in class Number