@Test(expected = NullPointerException.class) public void writeParamsContext() throws ConnectionException { serializationStrategy.write( null, mock( MvccEntity.class ) ); }
@Override public MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entity, "entity is required" ); final UUID colName = entity.getVersion(); final Id entityId = entity.getId(); return doWrite( applicationScope, entityId, new RowOp() { @Override public void doOp( final ColumnListMutation<UUID> colMutation ) { colMutation.putColumn( colName, getEntitySerializer() .toByteBuffer( new EntityWrapper( entity.getStatus(), entity.getEntity() ) ) ); } } ); }
MvccEntitySerializationStrategyImpl implements MvccEntitySerializationStrategy { @Override public MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entity, "entity is required" ); final UUID colName = entity.getVersion(); final Id entityId = entity.getId(); return doWrite( applicationScope, entityId, new RowOp() { @Override public void doOp( final ColumnListMutation<UUID> colMutation ) { colMutation.putColumn( colName, getEntitySerializer() .toByteBuffer( new EntityWrapper( entity.getStatus(), entity.getEntity() ) ) ); } } ); } }
MvccEntitySerializationStrategyImpl implements MvccEntitySerializationStrategy { @Override public MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entity, "entity is required" ); final UUID colName = entity.getVersion(); final Id entityId = entity.getId(); return doWrite( applicationScope, entityId, new RowOp() { @Override public void doOp( final ColumnListMutation<UUID> colMutation ) { colMutation.putColumn( colName, getEntitySerializer() .toByteBuffer( new EntityWrapper( entity.getStatus(), entity.getEntity() ) ) ); } } ); } @Inject  MvccEntitySerializationStrategyImpl( final Keyspace keyspace, final SerializationFig serializationFig,
                                                final CassandraFig cassandraFig ); }
MvccEntitySerializationStrategyImpl implements MvccEntitySerializationStrategy { @Override public MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entity, "entity is required" ); final UUID colName = entity.getVersion(); final Id entityId = entity.getId(); return doWrite( applicationScope, entityId, new RowOp() { @Override public void doOp( final ColumnListMutation<UUID> colMutation ) { colMutation.putColumn( colName, getEntitySerializer() .toByteBuffer( new EntityWrapper( entity.getStatus(), entity.getEntity() ) ) ); } } ); } @Inject  MvccEntitySerializationStrategyImpl( final Keyspace keyspace, final SerializationFig serializationFig,
                                                final CassandraFig cassandraFig ); @Override MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ); @Override EntitySet load( final ApplicationScope applicationScope, final Collection<Id> entityIds,
                           final UUID maxVersion ); @Override Iterator<MvccEntity> loadDescendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                       final UUID version, final int fetchSize ); @Override Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                      final UUID version, final int fetchSize ); @Override Optional<MvccEntity> load( final ApplicationScope scope, final Id entityId ); @Override MutationBatch mark( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override MutationBatch delete( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override java.util.Collection getColumnFamilies(); @Override Collection<TableDefinition> getTables(); }
MvccEntitySerializationStrategyImpl implements MvccEntitySerializationStrategy { @Override public MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entity, "entity is required" ); final UUID colName = entity.getVersion(); final Id entityId = entity.getId(); return doWrite( applicationScope, entityId, new RowOp() { @Override public void doOp( final ColumnListMutation<UUID> colMutation ) { colMutation.putColumn( colName, getEntitySerializer() .toByteBuffer( new EntityWrapper( entity.getStatus(), entity.getEntity() ) ) ); } } ); } @Inject  MvccEntitySerializationStrategyImpl( final Keyspace keyspace, final SerializationFig serializationFig,
                                                final CassandraFig cassandraFig ); @Override MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ); @Override EntitySet load( final ApplicationScope applicationScope, final Collection<Id> entityIds,
                           final UUID maxVersion ); @Override Iterator<MvccEntity> loadDescendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                       final UUID version, final int fetchSize ); @Override Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                      final UUID version, final int fetchSize ); @Override Optional<MvccEntity> load( final ApplicationScope scope, final Id entityId ); @Override MutationBatch mark( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override MutationBatch delete( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override java.util.Collection getColumnFamilies(); @Override Collection<TableDefinition> getTables();  }