Package info.archinnov.achilles.internal.metadata.parsing.context

Examples of info.archinnov.achilles.internal.metadata.parsing.context.PropertyParsingContext


            public void setFirstName(String name) {
                this.firstName = name;
            }
        }
        PropertyParsingContext context = newContext(Test.class, Test.class.getDeclaredField("firstName"));

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.getCQL3ColumnName()).isEqualTo("first_name");
    }
View Full Code Here


            public void setName(String name) {
                this.name = name;
            }
        }

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

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.structure().isStaticColumn()).isTrue();
    }
View Full Code Here

            public void setDate(UUID date) {
                this.date = date;
            }
        }

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

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.structure().isTimeUUID()).isTrue();
    }
View Full Code Here

            public void setActive(boolean active) {
                this.active = active;
            }

        }
        PropertyParsingContext context = newContext(Test.class, Test.class.getDeclaredField("active"));
        PropertyMeta meta = parser.parse(context);

        assertThat(meta.<Boolean>getValueClass()).isEqualTo(boolean.class);
    }
View Full Code Here

            public void setCounter(Counter counter) {
                this.counter = counter;
            }

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

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.type()).isEqualTo(PropertyType.COUNTER);
        assertThat(meta.getCounterProperties()).isNotNull();
        assertThat(meta.getCounterProperties().getFqcn()).isEqualTo(Test.class.getCanonicalName());
        assertThat(context.getCounterMetas().get(0)).isSameAs(meta);
    }
View Full Code Here

            public void setCounter(Counter counter) {
                this.counter = counter;
            }

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

        PropertyMeta meta = parser.parse(context);

        assertThat(meta.structure().isStaticColumn()).isTrue();
    }
View Full Code Here

                this.counter = counter;
            }
        }
        entityContext = new EntityParsingContext(configContext, Test.class);
        entityContext.setCurrentConsistencyLevels(Pair.create(TWO, THREE));
        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);
View Full Code Here

        }
        expectedEx.expect(AchillesBeanMappingException.class);
        expectedEx.expectMessage("Counter field 'counter' of entity 'null' cannot have ANY as read/write consistency level. All consistency levels except ANY are allowed");
        entityContext = new EntityParsingContext(configContext, Test.class);
        entityContext.setCurrentConsistencyLevels(Pair.create(TWO, THREE));
        PropertyParsingContext context = entityContext.newPropertyContext(Test.class.getDeclaredField("counter"));
        parser.parse(context);
    }
View Full Code Here

        expectedEx.expect(AchillesBeanMappingException.class);
        expectedEx.expectMessage("Counter field 'counter' of entity 'null' cannot have ANY as read/write consistency level. All consistency levels except ANY are allowed");
        entityContext = new EntityParsingContext(configContext, Test.class);
        entityContext.setCurrentConsistencyLevels(Pair.create(TWO, THREE));
        PropertyParsingContext context = entityContext.newPropertyContext(Test.class.getDeclaredField("counter"));
        parser.parse(context);
    }
View Full Code Here

            public void setType(PropertyType type) {
                this.type = type;
            }
        }
        PropertyParsingContext context = newContext(Test.class, Test.class.getDeclaredField("type"));
        PropertyMeta meta = parser.parse(context);

        assertThat(meta.<PropertyType>getValueClass()).isEqualTo(PropertyType.class);
        assertThat(meta.config().<String>getCQL3ValueType()).isEqualTo(String.class);
    }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.internal.metadata.parsing.context.PropertyParsingContext

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.