Package info.archinnov.achilles.schemabuilder.Create.Options

Examples of info.archinnov.achilles.schemabuilder.Create.Options.ClusteringOrder


    }

    @Test
    public void should_add_clustering_order() throws Exception {
        //Given
        ClusteringOrder clusteringOrder = new ClusteringOrder("date", Sorting.DESC);
        Create.Options tableOptions = mock(Create.Options.class);
        when(meta.structure().isClustered()).thenReturn(true);
        ArgumentCaptor<ClusteringOrder> clusteringOrdersCaptor = ArgumentCaptor.forClass(ClusteringOrder.class);

        when(embeddedIdProperties.getClusteringComponents().getClusteringOrders()).thenReturn(asList(clusteringOrder));
View Full Code Here


    public void setUp() {
        when(configContext.getDefaultReadConsistencyLevel()).thenReturn(defaultReadLevel);
        when(configContext.getDefaultWriteConsistencyLevel()).thenReturn(defaultWriteLevel);
        when(context.getEntityFacade()).thenReturn(entityFacade);
        when(meta.getIdMeta()).thenReturn(idMeta);
        when(meta.forSliceQuery().getClusteringOrderForSliceQuery()).thenReturn(new ClusteringOrder("col", Sorting.ASC));

        sliceQueryProperties = SliceQueryProperties.builder(meta,ClusteredEntity.class, SliceQueryProperties.SliceType.SELECT);

        Whitebox.setInternalState(sliceQueryProperties,"asyncListeners",asyncListeners);
View Full Code Here

        PropertyMeta name = valueClass(String.class).propertyName("name").cqlColumnName("name").type(SIMPLE).build();

        PropertyMeta idMeta = valueClass(EmbeddedKey.class).type(EMBEDDED_ID)
                .propertyName("compound")
                .partitionKeyMetas(userId).clusteringKeyMetas(name)
                .clusteringOrders(new ClusteringOrder("name", Sorting.ASC))
                .build();

        PropertyMeta stringMeta = valueClass(String.class).propertyName("string").cqlColumnName("string").type(SIMPLE).build();

        when(meta.getIdMeta()).thenReturn(idMeta);
View Full Code Here

        PropertyMeta name = valueClass(String.class).cqlColumnName("name").type(SIMPLE).build();

        PropertyMeta idMeta = valueClass(EmbeddedKey.class).type(EMBEDDED_ID)
                .propertyName("compound")
                .partitionKeyMetas(userId).clusteringKeyMetas(name)
                .clusteringOrders(new ClusteringOrder("name", Sorting.ASC))
                .build();

        PropertyMeta counter = completeBean(Void.class, Counter.class).cqlColumnName("count")
                .type(COUNTER).build();
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.schemabuilder.Create.Options.ClusteringOrder

Copyright © 2018 www.massapicom. 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.