code: public static Class<?> toIdType(EntityType entityType) {
      AttributeType attributeType = entityType.getIdAttribute().getDataType();
      //noinspection EnumSwitchStatementWhichMissesCases
      switch (attributeType) {
        case EMAIL:
        case HYPERLINK:
        case STRING:
          return String.class;
        case INT:
          return Integer.class;
        case LONG:
          return Long.class;
        default:
          throw new UnexpectedEnumException(attributeType);
      }
    }
docs: Returns the domain object identifier type (e.g. String or Long) for the given entity type.