shillelagh-processor/src/main/java/shillelagh/internal/ShillelaghProcessor.java
private void checkForTableId(TableObject tableObject, Element element) {
    // Check if user wants to use an id other than _id
    Id idAnnotation = element.getAnnotation(Id.class);
    if (idAnnotation != null) {
      if (element.asType().getKind() != TypeKind.LONG && !("java.lang.Long".equals(
          element.asType().toString()))) {
        logger.e("@Id must be on a long");
      }

      // Id attribute set and continue
      String columnName = Strings.isBlank(idAnnotation.name()) //
          ? element.getSimpleName().toString() //
          : idAnnotation.name();

      final TableColumn idColumn = new TableColumn(columnName, element.getSimpleName().toString(),
          element.asType().toString(), SqliteType.INTEGER);

      tableObject.setIdColumn(idColumn);
    }
  }
private void checkForTableId(TableObject tableObject, Element element) {
    // Check if user wants to use an id other than _id
    Id idAnnotation = element.getAnnotation(Id.class);
    if (idAnnotation != null) {
      if (element.asType().getKind() != TypeKind.LONG && !("java.lang.Long".equals(
          element.asType().toString()))) {
        logger.e("@Id must be on a long");
      }

      // Id attribute set and continue
      String columnName = Strings.isBlank(idAnnotation.name()) //
          ? element.getSimpleName().toString() //
          : idAnnotation.name();

      final TableColumn idColumn = new TableColumn(columnName, element.getSimpleName().toString(),
          element.asType().toString(), SqliteType.INTEGER);

      tableObject.setIdColumn(idColumn);
    }
  }
private void checkForTableId ( TableObject tableObject , Element element ) { // Check if user wants to use an id other than _id Id idAnnotation = element . getAnnotation ( Id . class ) ; if ( idAnnotation != null ) { if ( element . asType ( ) . getKind ( ) != TypeKind . LONG && ! ( "java.lang.Long" . equals ( element . asType ( ) . toString ( ) ) ) ) { logger . e ( "@Id must be on a long" ) ; } // Id attribute set and continue String columnName = Strings . isBlank ( idAnnotation . name ( ) ) // ? element . getSimpleName ( ) . toString ( ) // : idAnnotation . name ( ) ; final TableColumn idColumn = new TableColumn ( columnName , element . getSimpleName ( ) . toString ( ) , element . asType ( ) . toString ( ) , SqliteType . INTEGER ) ; tableObject . setIdColumn ( idColumn ) ; } }
Check if the element has the @Id annotation if it does use that for it's id
Check if the element has the