for (Element child : entity.getEnclosedElements()) {
if (child.accept(new EmptyContructorVisitor(), null) != null) {
noArgsConstructor = true;
}
VariableElement column = child.accept(new ColumnElementResolvingTypeVisitor(), null);
if (column != null) {
if (hasAmbiguosAssociationDeclaration(column)) {
return null;
}
if (column.getAnnotation(PrimaryKey.class) != null && ++primaryKeyCount > 1) {
messager.printMessage(Kind.ERROR, "Only one @PrimaryKey is allowed within an @Entity", entity);
return null;
}
ColumnReader columnReader = new ColumnReader(column, messager);
Column read = columnReader.read();
if (read != null) {
table.addColumn(read);
}
}
VariableElement association = child.accept(new AssociationElementResolvingTypeVisitor(), null);
if (association != null) {
AssociationReader associationReader = new AssociationReader(association, entityNames, messager);
Association read = associationReader.read();
if (read != null) {
table.addAssociation(read);