Package com.arconsis.android.datarobot.builder.schema.data

Examples of com.arconsis.android.datarobot.builder.schema.data.Column


        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);

          if (AssociationType.TO_MANY == read.getCardinality()) {
            if (countedToManyAssociations.containsKey(read.getCanonicalTypeInEntity())) {
              countedToManyAssociations.get(read.getCanonicalTypeInEntity()).incrementAndGet();
            } else {
              countedToManyAssociations.put(read.getCanonicalTypeInEntity(), new AtomicInteger(1));
            }
          }
        }
      }
    }
View Full Code Here


    boolean isPrimaryKey = isPrimaryKeyAnnotated(column);
    boolean isAutoincrementing = isAutoIncrementAnnotated(column);

    checkPrimaryKeyAndAutoincrementLocation(isPrimaryKey, isAutoincrementing, column, typeInEntity);
    try {
      return new Column(nameInEntity, typeInEntity, ColumnType.resolveColumnType(typeInEntity), isPrimaryKey, isAutoincrementing);
    } catch (IllegalStateException e) {
      messager.printMessage(Kind.ERROR, e.getMessage(), column);
      return null;
    }
  }
View Full Code Here

TOP

Related Classes of com.arconsis.android.datarobot.builder.schema.data.Column

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.