Пример #1
0
 @Override
 public Value<?> getValue(final ValueService service) {
   FieldValue value;
   try {
     value = service.getField(key, RetrieveMode.READ_ONLY);
   } catch (final EntryNotFoundException e) {
     value = getInitialValue(service);
   }
   return value;
 }
Пример #2
0
 private FieldValue getInitialValue(final ValueService service) {
   final FieldValue value = getFieldType().getNewField(service.stringWithBase(name(), false));
   initializeFieldValue(value);
   return value;
 }