Examples of BigQueryDataField


Examples of com.google.appengine.tools.mapreduce.BigQueryDataField

   * @param field - {@link Field} of a class.
   * @return {@link BigQueryDataField} annotated name. If annotation is not present then returns the
   *         name of the field.
   */
  public static String getFieldName(Field field) {
    BigQueryDataField bq = field.getAnnotation(BigQueryDataField.class);
    if (bq != null && !Strings.isNullOrEmpty(bq.name())) {
      return bq.name();
    }
    return field.getName();
  }
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.BigQueryDataField

  /**
   * @param field - {@link Field} of a class.
   * @return {@link BigQueryDataField} annotation description. Null if annotation is not present.
   */
  public static String getFieldDescription(Field field) {
    BigQueryDataField bq = field.getAnnotation(BigQueryDataField.class);
    if (bq == null || bq.description().equals("")) {
      return null;
    }
    return bq.description();
  }
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.BigQueryDataField

  /**
   * @param field - {@link Field} of a class.
   * @return {@link BigQueryDataField} annotation mode.
   */
  public static String getFieldMode(Field field) {
    BigQueryDataField bq = field.getAnnotation(BigQueryDataField.class);
    if (bq == null) {
      if (field.getType().isPrimitive()) {
        return BigQueryFieldMode.REQUIRED.getValue();
      }
      return null;
    }
    return bq.mode().getValue();
  }
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.BigQueryDataField

  /**
   * Returns true if the field is annotated as a required bigquery field.
   */
  static boolean isFieldRequired(Field field) {
    BigQueryDataField bqAnnotation = field.getAnnotation(BigQueryDataField.class);

    return (bqAnnotation != null && bqAnnotation.mode().equals(BigQueryFieldMode.REQUIRED))
        || field.getType().isPrimitive();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.