Tabnine Logo
FieldType.parseJsonValue
Code IndexAdd Tabnine to your IDE (free)

How to use
parseJsonValue
method
in
org.activityinfo.model.type.FieldType

Best Java code snippets using org.activityinfo.model.type.FieldType.parseJsonValue (Showing top 7 results out of 315)

origin: bedatadriven/activityinfo

@Override
public void set(ResultSet rs) throws SQLException {
  String json = rs.getString(STRING_VALUE_COLUMN);
  if (Strings.isNullOrEmpty(json)) {
    value = null;
  } else {
    value = type.parseJsonValue(parser.parse(json));
  }
}
origin: bedatadriven/activityinfo

  @Override
  public FieldValue toFieldValue(Object hrdValue) {
    JsonValue element = FormConverter.fromPropertyValue(hrdValue);
    return type.parseJsonValue(element);
  }
};
origin: bedatadriven/activityinfo

public void onNext(RecordObject record) {
  JsonValue jsonValue = record.getField(fieldName);
  if(jsonValue.isJsonNull()) {
    observer.onNext(null);
  } else {
    FieldValue value = fieldType.parseJsonValue(jsonValue);
    observer.onNext(value);
  }
}
origin: bedatadriven/activityinfo

  fieldValue = typeClass.createType().parseJsonValue(Json.parse(textValue));
} catch (JsonException e) {
  LOGGER.severe("Failed to parse indicator " + indicatorId + " with type " + typeClass +
origin: bedatadriven/activityinfo

private static FieldValue parseFieldValue(FormField field, JsonValue jsonValue) {
  if(jsonValue.isJsonNull()) {
    return null;
  } else if(field.getType() instanceof EnumType) {
    return parseEnumValue((EnumType)field.getType(), jsonValue);
  } else {
    return field.getType().parseJsonValue(jsonValue);
  }
}
origin: bedatadriven/activityinfo

} else {
  try {
    updatedValue = formField.getType().parseJsonValue(updatedValueElement);
  } catch(Exception e) {
    e.printStackTrace();
origin: bedatadriven/activityinfo

public static TypedFormRecord toTypedFormRecord(FormClass formClass, FormRecord record) {
  TypedFormRecord instance = new TypedFormRecord(ResourceId.valueOf(record.getRecordId()), formClass.getId());
  if (record.getParentRecordId() != null) {
    instance.setParentRecordId(ResourceId.valueOf(record.getParentRecordId()));
  }
  JsonValue fieldsObject = record.getFields();
  for (FormField field : formClass.getFields()) {
    if(fieldsObject.hasKey(field.getName())) {
      JsonValue fieldValue = fieldsObject.get(field.getName());
      if (!fieldValue.isJsonNull()) {
        instance.set(field.getId(), field.getType().parseJsonValue(fieldValue));
      }
    }
  }
  return instance;
}
org.activityinfo.model.typeFieldTypeparseJsonValue

Popular methods of FieldType

  • getTypeClass
  • accept
  • isUpdatable

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now