Modifier and Type | Field and Description |
---|---|
static int |
NO_TTL |
Constructor and Description |
---|
DefaultPojoDao(com.datastax.driver.core.Session session,
PojoBinding<P> binding,
String tableName,
PojoStatementFactory statementFactory,
PojoQueryContextFactory contextFactory,
Executor executor) |
Modifier and Type | Method and Description |
---|---|
void |
delete(P pojo)
Deletes a POJO.
|
void |
delete(StatementOptions options,
P pojo)
Deletes a POJO using the supplied
StatementOptions . |
void |
delete(UpdateGroup group,
P pojo)
Deletes a POJO using the supplied
UpdateGroup . |
void |
delete(UpdateGroup group,
StatementOptions options,
P pojo)
Deletes a POJO using the supplied
StatementOptions within the supplied UpdateGroup . |
com.google.common.util.concurrent.ListenableFuture<Void> |
deleteAsync(P pojo)
Asynchronously deletes a POJO.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
deleteAsync(StatementOptions options,
P pojo)
Asynchronously deletes a POJO using the supplied
StatementOptions . |
void |
deleteByKey(Object... values)
Deletes a POJO by its primary key.
|
void |
deleteByKey(StatementOptions options,
Object... values)
Deletes a POJO by its primary key using the supplied
StatementOptions . |
void |
deleteByKey(UpdateGroup group,
StatementOptions options,
Object... values)
Deletes a POJO by its primary key using the supplied (@link StatmentOptions} and within the supplied
UpdateGroup . |
com.google.common.util.concurrent.ListenableFuture<Void> |
deleteByKeyAsync(Object... values)
Asynchronously deletes a POJO by its primary key.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
deleteByKeyAsync(StatementOptions options,
Object... values)
Asynchronously deletes a POJO by its primary key using the supplied
StatementOptions . |
PojoQueryBuilder<P> |
find()
Returns a
PojoQueryBuilder which can be used to build a query to find P objects. |
PojoQuery<P> |
find(java.util.function.Consumer<com.datastax.driver.core.querybuilder.Select.Where> builder)
Returns a
PojoQuery which uses a custom where clause to find P objects. |
P |
findByKey(Object... values)
Finds an POJO by its primary key.
|
P |
findByKey(StatementOptions options,
Object... values)
Finds an POJO by its primary key, using the provided
StatementOptions . |
PojoMultiQuery<P> |
findByKeys()
Returns a
PojoMultiQuery which can be used to search for multiple entities by their primary keys. |
PojoMultiQuery<P> |
findByKeys(StatementOptions options)
Returns a
PojoMultiQuery which can be used to search for multiple entities by their primary keys, using
the provided StatementOptions for each query. |
void |
save(P pojo)
Saves a POJO.
|
void |
save(P pojo,
int ttl)
Saves a POJO using the supplied TTL value.
|
void |
save(StatementOptions options,
P pojo)
Saves a POJO using the supplied
StatementOptions . |
void |
save(StatementOptions options,
P pojo,
int ttl)
Saves a POJO using the supplied
StatementOptions and TTL value. |
void |
save(UpdateGroup group,
P pojo)
Saves a POJO within the supplied
UpdateGroup . |
void |
save(UpdateGroup group,
P pojo,
int ttl)
Saves a POJO within the supplied
UpdateGroup with the supplied TTL value. |
void |
save(UpdateGroup group,
StatementOptions options,
P pojo)
Saves a POJO using the supplied
StatementOptions and within the supplied UpdateGroup . |
void |
save(UpdateGroup group,
StatementOptions options,
P pojo,
int ttl)
Saves a POJO using the supplied
StatementOptions , within the supplied UpdateGroup , and using
the supplied TTL value. |
com.google.common.util.concurrent.ListenableFuture<Void> |
saveAsync(P pojo)
Asynchronously saves a POJO.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
saveAsync(P pojo,
int ttl)
Asynchronously saves a POJO using the supplied TTL value.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
saveAsync(StatementOptions options,
P pojo)
Asynchronously saves a POJO using the supplied
StatementOptions . |
com.google.common.util.concurrent.ListenableFuture<Void> |
saveAsync(StatementOptions options,
P pojo,
int ttl)
Asynchronously saves a POJO using the supplied
StatementOptions and TTL value. |
public static final int NO_TTL
public DefaultPojoDao(com.datastax.driver.core.Session session, PojoBinding<P> binding, String tableName, PojoStatementFactory statementFactory, PojoQueryContextFactory contextFactory, Executor executor)
public void delete(StatementOptions options, P pojo)
PojoDao
StatementOptions
.public void delete(UpdateGroup group, P pojo)
PojoDao
UpdateGroup
.public void delete(UpdateGroup group, StatementOptions options, P pojo)
PojoDao
StatementOptions
within the supplied UpdateGroup
.public com.google.common.util.concurrent.ListenableFuture<Void> deleteAsync(P pojo)
PojoDao
deleteAsync
in interface PojoDao<P>
pojo
- the POJOpublic com.google.common.util.concurrent.ListenableFuture<Void> deleteAsync(StatementOptions options, P pojo)
PojoDao
StatementOptions
.deleteAsync
in interface PojoDao<P>
options
- the statement optionspojo
- the POJOpublic void deleteByKey(Object... values)
PojoDao
deleteByKey
in interface PojoDao<P>
values
- the components of the primary keypublic void deleteByKey(StatementOptions options, Object... values)
PojoDao
StatementOptions
.deleteByKey
in interface PojoDao<P>
options
- the statement optionsvalues
- the components of the primary keypublic void deleteByKey(UpdateGroup group, StatementOptions options, Object... values)
PojoDao
UpdateGroup
.deleteByKey
in interface PojoDao<P>
group
- the update groupoptions
- the statement optionsvalues
- the components of the primary keypublic com.google.common.util.concurrent.ListenableFuture<Void> deleteByKeyAsync(Object... values)
PojoDao
deleteByKeyAsync
in interface PojoDao<P>
values
- the components of the primary keypublic com.google.common.util.concurrent.ListenableFuture<Void> deleteByKeyAsync(StatementOptions options, Object... values)
PojoDao
StatementOptions
.deleteByKeyAsync
in interface PojoDao<P>
options
- the statement optionsvalues
- the components of the primary keypublic PojoQueryBuilder<P> find()
PojoDao
PojoQueryBuilder
which can be used to build a query to find P
objects.public PojoQuery<P> find(java.util.function.Consumer<com.datastax.driver.core.querybuilder.Select.Where> builder)
PojoDao
PojoQuery
which uses a custom where clause to find P
objects.public P findByKey(Object... values)
PojoDao
public P findByKey(StatementOptions options, Object... values)
PojoDao
StatementOptions
.public PojoMultiQuery<P> findByKeys()
PojoDao
PojoMultiQuery
which can be used to search for multiple entities by their primary keys.findByKeys
in interface PojoDao<P>
public PojoMultiQuery<P> findByKeys(StatementOptions options)
PojoDao
PojoMultiQuery
which can be used to search for multiple entities by their primary keys, using
the provided StatementOptions
for each query.findByKeys
in interface PojoDao<P>
options
- the statement optionspublic void save(P pojo, int ttl)
PojoDao
public void save(StatementOptions options, P pojo)
PojoDao
StatementOptions
.public void save(UpdateGroup group, P pojo)
PojoDao
UpdateGroup
.public void save(StatementOptions options, P pojo, int ttl)
PojoDao
StatementOptions
and TTL value.public void save(UpdateGroup group, P pojo, int ttl)
PojoDao
UpdateGroup
with the supplied TTL value.public void save(UpdateGroup group, StatementOptions options, P pojo)
PojoDao
StatementOptions
and within the supplied UpdateGroup
.public void save(UpdateGroup group, StatementOptions options, P pojo, int ttl)
PojoDao
StatementOptions
, within the supplied UpdateGroup
, and using
the supplied TTL value.public com.google.common.util.concurrent.ListenableFuture<Void> saveAsync(P pojo)
PojoDao
public com.google.common.util.concurrent.ListenableFuture<Void> saveAsync(P pojo, int ttl)
PojoDao
public com.google.common.util.concurrent.ListenableFuture<Void> saveAsync(StatementOptions options, P pojo)
PojoDao
StatementOptions
.public com.google.common.util.concurrent.ListenableFuture<Void> saveAsync(StatementOptions options, P pojo, int ttl)
PojoDao
StatementOptions
and TTL value.Copyright © 2012-2016 Savoir Technologies, Inc.. All Rights Reserved.