public void addFieldGroupFields(Field field) {
   FieldGroupFieldValue value =
       (FieldGroupFieldValue) ((FieldValueDefinition.Data) field).fieldValue().get();
   // find field group definition, and recurse for each field
   Fields.Data fields =
       module
           .unitOfWorkFactory()
           .currentUnitOfWork()
           .get(Fields.Data.class, value.fieldGroup().get().identity());
   for (Field groupField : fields.fields()) {
     Field createdField =
         fieldGroupFieldsAdded(null, field, idGen.generate(Identity.class), groupField);
     createdField.changeDescription(groupField.getDescription());
     fieldGroupFieldInstanceAdded(null, field, idGen.generate(Identity.class), createdField);
   }
 }
예제 #2
0
 public GaeEntityStoreMixin(
     @Service IdentityGenerator uuid,
     @Service @Tagged(ValueSerialization.Formats.JSON) ValueSerialization valueSerialization) {
   System.out.println("Initializing GAE EntityStore.");
   this.uuid = uuid.generate(Identity.class) + ":";
   this.valueSerialization = valueSerialization;
   counter = 0L;
 }