Package info.archinnov.achilles.internal.metadata.holder

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyType


        final Class<?> embeddedIdClass = field.getType();

        Validator.validateInstantiable(embeddedIdClass);

        Method[] accessors = entityIntrospector.findAccessors(entityClass, field);
        PropertyType type = EMBEDDED_ID;

        EmbeddedIdProperties embeddedIdProperties = extractEmbeddedIdProperties(embeddedIdClass, context);
        PropertyMeta propertyMeta = factory().objectMapper(context.getCurrentObjectMapper()).type(type)
                .propertyName(context.getCurrentPropertyName()).embeddedIdProperties(embeddedIdProperties)
                .entityClassName(context.getCurrentEntityClass().getCanonicalName()).accessors(accessors).field(field)
View Full Code Here


        boolean timeUUID = isTimeUUID(context, field);

        Method[] accessors = entityIntrospector.findAccessors(entityClass, field);
        final Codec simpleCodec = codecFactory.parseSimpleField(context);
        final Class<?> cql3ValueType = codecFactory.determineCQL3ValueType(simpleCodec, timeUUID);
        PropertyType type = SIMPLE;

        PropertyMeta propertyMeta = factory().objectMapper(context.getCurrentObjectMapper()).type(type)
                .propertyName(context.getCurrentPropertyName()).cqlColumnName(context.getCurrentCQL3ColumnName())
                .entityClassName(context.getCurrentEntityClass().getCanonicalName()).accessors(accessors)
                .consistencyLevels(context.getCurrentConsistencyLevels()).field(field).timeuuid(timeUUID)
View Full Code Here

        Class<?> entityClass = context.getCurrentEntityClass();
        Field field = context.getCurrentField();

        Method[] accessors = entityIntrospector.findAccessors(entityClass, field);
        final boolean staticColumn = isStaticColumn(field);
        PropertyType type = PropertyType.COUNTER;

        CounterProperties counterProperties = new CounterProperties(context.getCurrentEntityClass().getCanonicalName());

        PropertyMeta propertyMeta = factory().objectMapper(context.getCurrentObjectMapper()).type(type)
                .propertyName(context.getCurrentPropertyName()).cqlColumnName(context.getCurrentCQL3ColumnName())
View Full Code Here

        Method[] accessors = entityIntrospector.findAccessors(entityClass, field);
        final ListCodec listCodec = codecFactory.parseListField(context);
        final Class<?> cql3ValueType = codecFactory.determineCQL3ValueType(listCodec, timeUUID);

        PropertyType type = LIST;

        PropertyMeta listMeta = factory().objectMapper(context.getCurrentObjectMapper()).type(type)
                .propertyName(context.getCurrentPropertyName()).cqlColumnName(context.getCurrentCQL3ColumnName())
                .entityClassName(context.getCurrentEntityClass().getCanonicalName())
                .consistencyLevels(context.getCurrentConsistencyLevels()).accessors(accessors).field(field)
View Full Code Here

        valueClass = TypeParser.inferValueClassForListOrSet(genericType, entityClass);
        Method[] accessors = entityIntrospector.findAccessors(entityClass, field);
        final SetCodec setCodec = codecFactory.parseSetField(context);
        final Class<?> cql3ValueType = codecFactory.determineCQL3ValueType(setCodec, timeUUID);

        PropertyType type = SET;

        PropertyMeta setMeta = factory().objectMapper(context.getCurrentObjectMapper()).type(type)
                .propertyName(context.getCurrentPropertyName()).cqlColumnName(context.getCurrentCQL3ColumnName())
                .entityClassName(context.getCurrentEntityClass().getCanonicalName())
                .consistencyLevels(context.getCurrentConsistencyLevels()).accessors(accessors).field(field)
View Full Code Here

        Method[] accessors = entityIntrospector.findAccessors(entityClass, field);
        final MapCodec mapCodec = codecFactory.parseMapField(context);
        final Class<?> cql3KeyType = codecFactory.determineCQL3KeyType(mapCodec, timeUUID);
        final Class<?> cql3ValueType = codecFactory.determineCQL3ValueType(mapCodec, timeUUID);

        PropertyType type = MAP;

        PropertyMeta mapMeta = factory().objectMapper(context.getCurrentObjectMapper()).type(type)
                .propertyName(context.getCurrentPropertyName()).cqlColumnName(context.getCurrentCQL3ColumnName())
                .entityClassName(context.getCurrentEntityClass().getCanonicalName())
                .consistencyLevels(context.getCurrentConsistencyLevels()).accessors(accessors).field(field)
View Full Code Here

        List<PropertyType> enumValues = Arrays.asList(PropertyType.values());
        EnumNameCodec<PropertyType> codec = EnumNameCodec.create(enumValues, PropertyType.class);

        //When
        String encoded = codec.encode(PropertyType.COUNTER);
        PropertyType decoded = codec.decode("ID");

        //Then
        assertThat(encoded).isEqualTo("COUNTER");
        assertThat(decoded).isSameAs(PropertyType.ID);
    }
View Full Code Here

        List<PropertyType> enumValues = Arrays.asList(PropertyType.values());
        EnumOrdinalCodec<PropertyType> codec = EnumOrdinalCodec.create(enumValues, PropertyType.class);

        //When
        Integer encoded = codec.encode(PropertyType.COUNTER);
        PropertyType decoded = codec.decode(PropertyType.ID.ordinal());

        //Then
        assertThat(encoded).isEqualTo(PropertyType.COUNTER.ordinal());
        assertThat(decoded).isSameAs(PropertyType.ID);
    }
View Full Code Here

    @Test
    public void should_slice_using_partition_keys_and_clustering_keys_IN() {
        //Given
        final long partition = RandomUtils.nextLong(0,Long.MAX_VALUE);
        final PropertyType type1 = PropertyType.LIST, type2 = PropertyType.SET;
        final int year = 2014;


        manager.insert(new ClusteredEntityForTranscoding(partition, type1, year, bytes1));
        manager.insert(new ClusteredEntityForTranscoding(partition, type1, year, bytes2));
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.internal.metadata.holder.PropertyType

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.