Package info.archinnov.achilles.annotations

Examples of info.archinnov.achilles.annotations.Id


    public String inferCQLColumnName(Field field, NamingStrategy namingStrategy) {
        final String columnName = field.getName();
        log.trace("Inferring property columnName for property {}", columnName);
        final Column column = field.getAnnotation(Column.class);
        final Id id = field.getAnnotation(Id.class);

        if (column != null) {
            return determineColumnNameUsingStrategy(column.name(), columnName, namingStrategy);
        } else if (id != null) {
            return determineColumnNameUsingStrategy(id.name(), columnName, namingStrategy);
        } else {
            return applyNamingStrategy(columnName, namingStrategy);
        }
    }
View Full Code Here


        log.debug("Parsing property {} as id of entity class {}", context.getCurrentPropertyName(), context
                .getCurrentEntityClass().getCanonicalName());

        PropertyMeta idMeta = parseSimpleProperty(context);
        idMeta.setType(ID);
        Id id = context.getCurrentField().getAnnotation(Id.class);
        String propertyName = StringUtils.isNotBlank(id.name()) ? id.name() : context.getCurrentPropertyName();
        idMeta.setPropertyName(propertyName);

        return idMeta;
    }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.annotations.Id

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.