@Test public void testSaveWithTtlAnnotation() { TtlEntity entity = new TtlEntity(); createPojoDao(TtlEntity.class).save(entity); assertTrue(ttlOf(entity) > 0); }
@Override public void save(P pojo) { completeSync(group -> save(group, StatementOptionsBuilder.empty(), pojo, defaultTtl)); }
DefaultPojoDao implements PojoDao<P> { @Override public void save(P pojo) { completeSync(group -> save(group, StatementOptionsBuilder.empty(), pojo, defaultTtl)); } }
DefaultPojoDao implements PojoDao<P> { @Override public void save(P pojo) { completeSync(group -> save(group, StatementOptionsBuilder.empty(), pojo, defaultTtl)); } DefaultPojoDao(Session session, PojoBinding<P> binding, String tableName, PojoStatementFactory statementFactory, PojoQueryContextFactory contextFactory, Executor executor); }
DefaultPojoDao implements PojoDao<P> { @Override public void save(P pojo) { completeSync(group -> save(group, StatementOptionsBuilder.empty(), pojo, defaultTtl)); } DefaultPojoDao(Session session, PojoBinding<P> binding, String tableName, PojoStatementFactory statementFactory, PojoQueryContextFactory contextFactory, Executor executor); @Override void delete(P pojo); @Override void delete(StatementOptions options, P pojo); @Override void delete(UpdateGroup group, P pojo); @Override void delete(UpdateGroup group, StatementOptions options, P pojo); @Override ListenableFuture<Void> deleteAsync(P pojo); @Override ListenableFuture<Void> deleteAsync(StatementOptions options, P pojo); @Override void deleteByKey(Object... values); @Override void deleteByKey(StatementOptions options, Object... values); @Override void deleteByKey(UpdateGroup group, StatementOptions options, Object... values); @Override ListenableFuture<Void> deleteByKeyAsync(Object... values); @Override ListenableFuture<Void> deleteByKeyAsync(StatementOptions options, Object... values); @Override PojoQueryBuilder<P> find(); @Override PojoQuery<P> find(Consumer<Select.Where> builder); @Override P findByKey(Object... values); @Override P findByKey(StatementOptions options, Object... values); @Override PojoMultiQuery<P> findByKeys(); @Override PojoMultiQuery<P> findByKeys(StatementOptions options); @Override void save(P pojo); @Override void save(P pojo, int ttl); @Override void save(StatementOptions options, P pojo); @Override void save(UpdateGroup group, P pojo); @Override void save(StatementOptions options, P pojo, int ttl); @Override void save(UpdateGroup group, P pojo, int ttl); @Override void save(UpdateGroup group, StatementOptions options, P pojo); @Override void save(UpdateGroup group, StatementOptions options, P pojo, int ttl); @Override ListenableFuture<Void> saveAsync(P pojo); @Override ListenableFuture<Void> saveAsync(P pojo, int ttl); @Override ListenableFuture<Void> saveAsync(StatementOptions options, P pojo); @Override ListenableFuture<Void> saveAsync(StatementOptions options, P pojo, int ttl); }
DefaultPojoDao implements PojoDao<P> { @Override public void save(P pojo) { completeSync(group -> save(group, StatementOptionsBuilder.empty(), pojo, defaultTtl)); } DefaultPojoDao(Session session, PojoBinding<P> binding, String tableName, PojoStatementFactory statementFactory, PojoQueryContextFactory contextFactory, Executor executor); @Override void delete(P pojo); @Override void delete(StatementOptions options, P pojo); @Override void delete(UpdateGroup group, P pojo); @Override void delete(UpdateGroup group, StatementOptions options, P pojo); @Override ListenableFuture<Void> deleteAsync(P pojo); @Override ListenableFuture<Void> deleteAsync(StatementOptions options, P pojo); @Override void deleteByKey(Object... values); @Override void deleteByKey(StatementOptions options, Object... values); @Override void deleteByKey(UpdateGroup group, StatementOptions options, Object... values); @Override ListenableFuture<Void> deleteByKeyAsync(Object... values); @Override ListenableFuture<Void> deleteByKeyAsync(StatementOptions options, Object... values); @Override PojoQueryBuilder<P> find(); @Override PojoQuery<P> find(Consumer<Select.Where> builder); @Override P findByKey(Object... values); @Override P findByKey(StatementOptions options, Object... values); @Override PojoMultiQuery<P> findByKeys(); @Override PojoMultiQuery<P> findByKeys(StatementOptions options); @Override void save(P pojo); @Override void save(P pojo, int ttl); @Override void save(StatementOptions options, P pojo); @Override void save(UpdateGroup group, P pojo); @Override void save(StatementOptions options, P pojo, int ttl); @Override void save(UpdateGroup group, P pojo, int ttl); @Override void save(UpdateGroup group, StatementOptions options, P pojo); @Override void save(UpdateGroup group, StatementOptions options, P pojo, int ttl); @Override ListenableFuture<Void> saveAsync(P pojo); @Override ListenableFuture<Void> saveAsync(P pojo, int ttl); @Override ListenableFuture<Void> saveAsync(StatementOptions options, P pojo); @Override ListenableFuture<Void> saveAsync(StatementOptions options, P pojo, int ttl); static final int NO_TTL; }