@@ -436,7 +436,8 @@ public <T> ListenableFuture<List<T>> select(Query query, Class<T> entityClass) t
436436 Assert .notNull (query , "Query must not be null" );
437437 Assert .notNull (entityClass , "Entity type must not be null" );
438438
439- return select (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass )).build (), entityClass );
439+ return select (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass ))
440+ .build (), entityClass );
440441 }
441442
442443 /* (non-Javadoc)
@@ -450,7 +451,8 @@ public <T> ListenableFuture<Void> select(Query query, Consumer<T> entityConsumer
450451 Assert .notNull (entityConsumer , "Entity Consumer must not be empty" );
451452 Assert .notNull (entityClass , "Entity type must not be null" );
452453
453- return select (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass )).build (), entityConsumer ,
454+ return select (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass ))
455+ .build (), entityConsumer ,
454456 entityClass );
455457 }
456458
@@ -463,7 +465,8 @@ public <T> ListenableFuture<T> selectOne(Query query, Class<T> entityClass) thro
463465 Assert .notNull (query , "Query must not be null" );
464466 Assert .notNull (entityClass , "Entity type must not be null" );
465467
466- return selectOne (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass )).build (),
468+ return selectOne (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass ))
469+ .build (),
467470 entityClass );
468471 }
469472
@@ -476,7 +479,8 @@ public <T> ListenableFuture<Slice<T>> slice(Query query, Class<T> entityClass) t
476479 Assert .notNull (query , "Query must not be null" );
477480 Assert .notNull (entityClass , "Entity type must not be null" );
478481
479- return slice (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass )).build (), entityClass );
482+ return slice (getStatementFactory ().select (query , getRequiredPersistentEntity (entityClass ))
483+ .build (), entityClass );
480484 }
481485
482486 /* (non-Javadoc)
@@ -490,7 +494,8 @@ public ListenableFuture<Boolean> update(Query query, org.springframework.data.ca
490494 Assert .notNull (update , "Update must not be null" );
491495 Assert .notNull (entityClass , "Entity type must not be null" );
492496
493- return doExecute (getStatementFactory ().update (query , update , getRequiredPersistentEntity (entityClass )).build (),
497+ return doExecute (getStatementFactory ().update (query , update , getRequiredPersistentEntity (entityClass ))
498+ .build (),
494499 AsyncResultSet ::wasApplied );
495500 }
496501
@@ -516,7 +521,8 @@ private ListenableFuture<Boolean> doDelete(Query query, Class<?> entityClass, Cq
516521
517522 ListenableFuture <Boolean > future = doExecute (delete , AsyncResultSet ::wasApplied );
518523
519- future .addCallback (success -> maybeEmitEvent (new AfterDeleteEvent <>(delete , entityClass , tableName )), e -> {});
524+ future .addCallback (success -> maybeEmitEvent (new AfterDeleteEvent <>(delete , entityClass , tableName )), e -> {
525+ });
520526
521527 return future ;
522528 }
@@ -559,7 +565,8 @@ ListenableFuture<Long> doCount(Query query, Class<?> entityClass, CqlIdentifier
559565
560566 SingleColumnRowMapper <Long > mapper = SingleColumnRowMapper .newInstance (Long .class );
561567
562- Row row = DataAccessUtils .requiredSingleResult (Streamable .of (it .currentPage ()).toList ());
568+ Row row = DataAccessUtils .requiredSingleResult (Streamable .of (it .currentPage ())
569+ .toList ());
563570 return mapper .mapRow (row , 0 );
564571 });
565572
@@ -642,7 +649,7 @@ private <T> ListenableFuture<EntityWriteResult<T>> doInsert(T entity, WriteOptio
642649 getConverter ().getConversionService ());
643650 CassandraPersistentEntity <?> persistentEntity = getRequiredPersistentEntity (entity .getClass ());
644651
645- T entityToUse = source .isVersionedEntity () ? source .initializeVersionProperty () : entity ;
652+ T entityToUse = source .isVersionedEntity () ? source .initializeVersionProperty () : source . getBean () ;
646653
647654 StatementBuilder <RegularInsert > builder = getStatementFactory ().insert (entityToUse , options , persistentEntity ,
648655 tableName );
@@ -762,7 +769,8 @@ private ListenableFuture<WriteResult> doDeleteVersioned(Object entity, QueryOpti
762769 StatementBuilder <Delete > delete = getStatementFactory ().delete (entity , options , getConverter (), tableName );
763770 ;
764771
765- return executeDelete (entity , tableName , source .appendVersionCondition (delete ).build (), result -> {
772+ return executeDelete (entity , tableName , source .appendVersionCondition (delete )
773+ .build (), result -> {
766774
767775 if (!result .wasApplied ()) {
768776 throw new OptimisticLockingFailureException (
@@ -776,7 +784,8 @@ private ListenableFuture<WriteResult> doDelete(Object entity, QueryOptions optio
776784
777785 StatementBuilder <Delete > delete = getStatementFactory ().delete (entity , options , getConverter (), tableName );
778786
779- return executeDelete (entity , tableName , delete .build (), result -> {});
787+ return executeDelete (entity , tableName , delete .build (), result -> {
788+ });
780789 }
781790
782791 /* (non-Javadoc)
@@ -797,7 +806,8 @@ public ListenableFuture<Boolean> deleteById(Object id, Class<?> entityClass) {
797806 maybeEmitEvent (new BeforeDeleteEvent <>(delete , entityClass , tableName ));
798807
799808 ListenableFuture <Boolean > future = doExecute (delete , AsyncResultSet ::wasApplied );
800- future .addCallback (success -> maybeEmitEvent (new AfterDeleteEvent <>(delete , entityClass , tableName )), e -> {});
809+ future .addCallback (success -> maybeEmitEvent (new AfterDeleteEvent <>(delete , entityClass , tableName )), e -> {
810+ });
801811
802812 return future ;
803813 }
@@ -817,7 +827,8 @@ public ListenableFuture<Void> truncate(Class<?> entityClass) {
817827 maybeEmitEvent (new BeforeDeleteEvent <>(statement , entityClass , tableName ));
818828
819829 ListenableFuture <Boolean > future = doExecute (statement , AsyncResultSet ::wasApplied );
820- future .addCallback (success -> maybeEmitEvent (new AfterDeleteEvent <>(statement , entityClass , tableName )), e -> {});
830+ future .addCallback (success -> maybeEmitEvent (new AfterDeleteEvent <>(statement , entityClass , tableName )), e -> {
831+ });
821832
822833 return new MappingListenableFutureAdapter <>(future , aBoolean -> null );
823834 }
@@ -842,7 +853,8 @@ protected AsyncPreparedStatementHandler createPreparedStatementHandler(Statement
842853 private <T > ListenableFuture <EntityWriteResult <T >> executeSave (T entity , CqlIdentifier tableName ,
843854 SimpleStatement statement ) {
844855
845- return executeSave (entity , tableName , statement , ignore -> {});
856+ return executeSave (entity , tableName , statement , ignore -> {
857+ });
846858 }
847859
848860 private <T > ListenableFuture <EntityWriteResult <T >> executeSave (T entity , CqlIdentifier tableName ,
@@ -926,11 +938,13 @@ private <T> ListenableFuture<T> doExecute(Statement<?> statement, Function<Async
926938 }
927939
928940 private static List <Row > getFirstPage (AsyncResultSet resultSet ) {
929- return StreamSupport .stream (resultSet .currentPage ().spliterator (), false ).collect (Collectors .toList ());
941+ return StreamSupport .stream (resultSet .currentPage ().spliterator (), false )
942+ .collect (Collectors .toList ());
930943 }
931944
932945 private static int getConfiguredPageSize (CqlSession session ) {
933- return session .getContext ().getConfig ().getDefaultProfile ().getInt (DefaultDriverOption .REQUEST_PAGE_SIZE , 5000 );
946+ return session .getContext ().getConfig ().getDefaultProfile ()
947+ .getInt (DefaultDriverOption .REQUEST_PAGE_SIZE , 5000 );
934948 }
935949
936950 private int getEffectivePageSize (Statement <?> statement ) {
0 commit comments