Examples of structure()


Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        PropertyMeta counterMeta = mock(PropertyMeta.class, RETURNS_DEEP_STUBS);

        when(context.getPrimaryKey()).thenReturn(primaryKey);
        when(overrider.getWriteLevel(context)).thenReturn(ALL);

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


        when(ps.bind(increment, primaryKey)).thenReturn(bs);
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        PropertyMeta counterMeta = mock(PropertyMeta.class, RETURNS_DEEP_STUBS);

        when(context.getPrimaryKey()).thenReturn(primaryKey);
        when(overrider.getWriteLevel(context)).thenReturn(ALL);

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

        when(ps.bind(primaryKey)).thenReturn(bs);
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        Long primaryKey = RandomUtils.nextLong(0,Long.MAX_VALUE);
        PropertyMeta counterMeta = mock(PropertyMeta.class, RETURNS_DEEP_STUBS);

        when(context.getPrimaryKey()).thenReturn(primaryKey);
        when(overrider.getWriteLevel(context)).thenReturn(ALL);
        when(counterMeta.structure().isStaticColumn()).thenReturn(false);
        when(idMeta.structure().isEmbeddedId()).thenReturn(false);
        when(idMeta.forTranscoding().encodeToCassandra(primaryKey)).thenReturn(primaryKey);

        when(ps.bind(primaryKey)).thenReturn(bs);
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        PropertyParsingContext context = newContext(Test.class, Test.class.getDeclaredField("name"));

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.structure().isStaticColumn()).isTrue();
    }

    @Test
    public void should_parse_simple_property_of_time_uuid_type() throws Exception {
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        PropertyParsingContext context = newContext(Test.class, Test.class.getDeclaredField("date"));

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.structure().isTimeUUID()).isTrue();
    }

    @Test
    public void should_parse_primitive_property() throws Exception {
        @SuppressWarnings("unused")
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        }
        PropertyParsingContext context = newContext(Test.class, Test.class.getDeclaredField("counter"));

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.structure().isStaticColumn()).isTrue();
    }

    @Test
    public void should_parse_counter_property_with_consistency_level() throws Exception {
        @SuppressWarnings("unused")
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        PropertyParsingContext context = entityContext.newPropertyContext(Test.class.getDeclaredField("counter"));

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.type()).isEqualTo(PropertyType.COUNTER);
        assertThat(meta.structure().getReadConsistencyLevel()).isEqualTo(ONE);
        assertThat(meta.structure().getWriteConsistencyLevel()).isEqualTo(ALL);
    }

    @Test
    public void should_exception_when_counter_consistency_is_any_for_read() throws Exception {
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.type()).isEqualTo(PropertyType.COUNTER);
        assertThat(meta.structure().getReadConsistencyLevel()).isEqualTo(ONE);
        assertThat(meta.structure().getWriteConsistencyLevel()).isEqualTo(ALL);
    }

    @Test
    public void should_exception_when_counter_consistency_is_any_for_read() throws Exception {
        @SuppressWarnings("unused")
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

            }

        }
        PropertyParsingContext context = newContext(Test.class, Test.class.getDeclaredField("firstname"));
        PropertyMeta meta = parser.parse(context);
        assertThat(meta.structure().isIndexed()).isTrue();
    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    @Test
    public void should_parse_list() throws Exception {
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.structure()

        assertThat(meta.getSetter().getName()).isEqualTo("setFriends");
        assertThat((Class<List>) meta.getSetter().getParameterTypes()[0]).isEqualTo(List.class);

        assertThat(meta.type()).isEqualTo(PropertyType.LIST);
        assertThat(meta.forValues().nullValueForCollectionAndMap()).isNotNull().isInstanceOf(List.class);
        assertThat(meta.structure().isStaticColumn()).isTrue();

        PropertyParsingContext context2 = newContext(Test.class, Test.class.getDeclaredField("mates"));
        PropertyMeta meta2 = parser.parse(context2);
        assertThat(meta2.type()).isEqualTo(PropertyType.LIST);
        assertThat(meta2.forValues().nullValueForCollectionAndMap()).isNotNull().isInstanceOf(List.class);
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.