Exemplo n.º 1
0
 @Override
 public Violation build() {
   try {
     Violation record = new Violation();
     record.businessId =
         fieldSetFlags()[0] ? this.businessId : (java.lang.Integer) defaultValue(fields()[0]);
     record.date =
         fieldSetFlags()[1] ? this.date : (java.lang.CharSequence) defaultValue(fields()[1]);
     record.violationTypeID =
         fieldSetFlags()[2] ? this.violationTypeID : (java.lang.Long) defaultValue(fields()[2]);
     record.riskCategory =
         fieldSetFlags()[3]
             ? this.riskCategory
             : (java.lang.CharSequence) defaultValue(fields()[3]);
     record.description =
         fieldSetFlags()[4]
             ? this.description
             : (java.lang.CharSequence) defaultValue(fields()[4]);
     return record;
   } catch (Exception e) {
     throw new org.apache.avro.AvroRuntimeException(e);
   }
 }