Examples of BoundStatementWrapper


Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().forceEncodeToJSONForCounter(primaryKey)).thenReturn(primaryKey.toString());
        when(counterMeta.getCQL3ColumnName()).thenReturn("count");

        when(ps.bind("CompleteBean", primaryKey.toString(), "count")).thenReturn(bs);

        BoundStatementWrapper actual = binder.bindForSimpleCounterDelete(context, ps, counterMeta);

        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly("CompleteBean", primaryKey.toString(), "count");
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);


        when(ps.bind(increment, primaryKey)).thenReturn(bs);

        BoundStatementWrapper actual = binder.bindForClusteredCounterIncrementDecrement(context, ps, counterMeta, increment);

        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly(increment, primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.structure().isEmbeddedId()).thenReturn(false);
        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(primaryKey)).thenReturn(bs);

        BoundStatementWrapper actual = binder.bindForClusteredCounterSelect(context, ps, true,ALL);

        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly(primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.structure().isEmbeddedId()).thenReturn(false);
        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(primaryKey)).thenReturn(bs);

        BoundStatementWrapper actual = binder.bindForClusteredCounterDelete(context, ps);

        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);

        assertThat(asList(actual.getValues())).containsExactly(primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(0, null, primaryKey)).thenReturn(bs);

        //When
        final BoundStatementWrapper actual = binder.bindForCollectionAndMapUpdate(context, ps, changeSet);

        //Then
        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly(0, null, primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(0, values, primaryKey)).thenReturn(bs);

        //When
        final BoundStatementWrapper actual = binder.bindForCollectionAndMapUpdate(context, ps, changeSet);

        //Then
        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly(0, values, primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(0, values, primaryKey)).thenReturn(bs);

        //When
        final BoundStatementWrapper actual = binder.bindForCollectionAndMapUpdate(context, ps, changeSet);

        //Then
        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly(0, values, primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(0, values, primaryKey)).thenReturn(bs);

        //When
        final BoundStatementWrapper actual = binder.bindForCollectionAndMapUpdate(context, ps, changeSet);

        //Then
        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly(0, values, primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(0, values, primaryKey)).thenReturn(bs);

        //When
        final BoundStatementWrapper actual = binder.bindForCollectionAndMapUpdate(context, ps, changeSet);

        //Then
        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        verify(bs).setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL);
        assertThat(asList(actual.getValues())).containsExactly(0, values, primaryKey);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.statement.wrapper.BoundStatementWrapper

        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(0, values, primaryKey)).thenReturn(bs);

        //When
        final BoundStatementWrapper actual = binder.bindForCollectionAndMapUpdate(context, ps, changeSet);

        //Then
        verify(bs).setConsistencyLevel(ConsistencyLevel.ALL);
        assertThat(asList(actual.getValues())).containsExactly(0, values, primaryKey);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.