E
- The type of entities stored in this RandomAccessDataset
.@Immutable public interface RandomAccessDataset<E> extends Dataset<E>
A Dataset
that supports random access operations on entities.
Implementations of RandomAccessDataset
are immutable.
Dataset
Modifier and Type | Method and Description |
---|---|
boolean |
delete(E entity)
Deletes the entity passed to this method in the dataset.
|
void |
delete(Key key)
Deletes the entity in the dataset with
Key key . |
E |
get(Key key)
Return the entity stored in the dataset at the row specified with
Key key . |
long |
increment(Key key,
String fieldName,
long amount)
Increment a field named
fieldName on the entity by the
specified amount. |
boolean |
put(E entity)
Put the entity into the dataset.
|
getDescriptor, getName, getNamespace, getUri
E get(Key key)
Key
key
. Return null if no such entity exists.key
- The key of the entity to getboolean put(E entity)
entity
- The entity to storelong increment(Key key, String fieldName, long amount)
fieldName
on the entity by the
specified amount.key
- The key of the entity to incrementfieldName
- The name of the field on the entity to increment. If the fieldName
doesn't exist, an exception is thrown.amount
- The amount to increment the field byvoid delete(Key key)
Key
key
.key
- The key of the entity to delete.boolean delete(E entity)
entity
object.
.entity
- The entity, whose checkConflict field can be validated before the
delete is performedCopyright © 2013–2014. All rights reserved.