Tabnine Logo
SInstance.setValue
Code IndexAdd Tabnine to your IDE (free)

How to use
setValue
method
in
org.opensingular.form.SInstance

Best Java code snippets using org.opensingular.form.SInstance.setValue (Showing top 20 results out of 315)

origin: org.opensingular/form-core

@Override
public void fillInstance(SInstance ins, T obj) {
  ins.setValue(obj);
}
origin: org.opensingular/singular-form-core

@Override
public void fillInstance(SInstance ins, T obj) {
  ins.setValue(obj);
}
origin: org.opensingular/form-core

@Override
public void fillInstance(SInstance ins, T obj) {
  ins.setValue(obj.name());
}
origin: org.opensingular/singular-form-core

@Override
public void fillInstance(SInstance ins, T obj) {
  ins.setValue(obj.name());
}
origin: org.opensingular/form-core

@Override
public void setAttributeValue(String attributeFullName, String subPath, Object value) {
  SInstance instanceAtr = getOrCreateAttribute(attributeFullName);
  if (subPath != null) {
    instanceAtr.setValue(new PathReader(subPath), value);
  } else {
    instanceAtr.setValue(value);
  }
}
origin: org.opensingular/form-core

public E addValue(Object value) {
  E instance = addNew();
  try {
    instance.setValue(value);
  } catch (RuntimeException e) {
    //Senão conseguiu converter o valor, então desfaz a inclusão
    values.remove(values.size() - 1);
    throw e;
  }
  return instance;
}
origin: org.opensingular/singular-form-core

  public void fromRelationalColumn(Object dbData, SInstance toInstance) {
    if (dbData == null) {
      toInstance.clearInstance();
    } else {
      toInstance.setValue(dbData.toString());
    }
  }
}
origin: org.opensingular/singular-form-core

public void setAttributeValue(@Nonnull AttrInternalRef ref, @Nullable String subPath, @Nullable Object value) {
  SInstance instanceAtr = getCreating(ref);
  if (subPath != null) {
    instanceAtr.setValue(new PathReader(subPath), value);
  } else {
    instanceAtr.setValue(value);
  }
}
origin: org.opensingular/singular-form-core

public E addValue(Object value) {
  E instance = addNew();
  try {
    instance.setValue(value);
  } catch (RuntimeException e) {
    //Senão conseguiu converter o valor, então desfaz a inclusão
    values.remove(values.size() - 1);
    throw e;
  }
  return instance;
}
origin: org.opensingular/singular-form-core

@Override
void setValue(PathReader pathReader, Object value) {
  SInstance instance = getChecking(pathReader);
  if (pathReader.isLast()) {
    instance.setValue(value);
  } else {
    instance.setValue(pathReader.next(), value);
  }
}
origin: org.opensingular/form-core

@Override
void setValue(PathReader pathReader, Object value) {
  SInstance instance = getChecking(pathReader);
  if (pathReader.isLast()) {
    instance.setValue(value);
  } else {
    instance.setValue(pathReader.next(), value);
  }
}
origin: org.opensingular/form-core

@Override
public void setAttributeValue(String attributeFullName, String subPath, Object value) {
  SInstance instance = attributesResolved.getCreating(mapName(attributeFullName));
  if (subPath != null) {
    instance.setValue(new PathReader(subPath), value);
  } else {
    instance.setValue(value);
  }
}
origin: org.opensingular/form-wicket

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public void setObject(T object) {
  SInstance target = getTarget();
  if (target instanceof SIList) {
    target.clearInstance();
    ((List) object).forEach(((SIList) target)::addValue);
  } else {
    target.setValue(object);
  }
}
origin: org.opensingular/singular-form-wicket

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public void setObject(T object) {
  SInstance target = getTarget();
  if (target instanceof SIList) {
    target.clearInstance();
    ((List) object).forEach(((SIList) target)::addValue);
  } else {
    target.setValue(object);
  }
}
origin: org.opensingular/singular-form-wicket

private void rollbackState() {
  try {
    if (adding) {
      listModel.getObject().remove(listModel.getObject().size() - 1);
    } else {
      MElement xml = MParser.parse(instanceBackupXml);
      SInstance i = SFormXMLUtil.fromXML(currentInstance.getObject().getType(), xml);
      currentInstance.getObject().setValue(i);
    }
  } catch (Exception e) {
    throw SingularException.rethrow(e.getMessage(), e);
  }
}
origin: org.opensingular/form-wicket

private void rollbackState() {
  try {
    if (adding) {
      listModel.getObject().remove(listModel.getObject().size() - 1);
    } else {
      MElement xml = MParser.parse(instanceBackupXml);
      SInstance i = MformPersistenciaXML.fromXML(currentInstance.getObject().getType(), xml);
      currentInstance.getObject().setValue(i);
    }
  } catch (Exception e) {
    throw SingularException.rethrow(e.getMessage(), e);
  }
}
origin: org.opensingular/singular-form-core

/** Retorna o atributo se existir associado no mapa atual de atributos. */
@Nullable
public SInstance get(@Nonnull AttrInternalRef ref) {
  SInstance instance = ArrUtil.arrayGet(attributes, ref.getIndex());
  if (instance != null && instance.isAttributeShouldMigrate() && ref.isResolved()) {
    //Precida migra o atributo de String para o tipo definitivo, pois a carga do valor foi lazy
    SInstance newAttr = createNewAttribute(ref);
    newAttr.setValue(instance.getValue());
    return set(ref, newAttr);
  }
  return instance;
}
origin: org.opensingular/form-core

  @Override
  public void setMember(String name, Object value) {
    int index = findIndexOf(name);
    if (index == -1) {
      super.setMember(name, value);
    } else {
      getFieldWrapper(index).getInstance().setValue(value);
    }
  }
}
origin: org.opensingular/singular-form-core

  @Override
  public void setMember(String name, Object value) {
    int index = findIndexOf(name);
    if (index == -1) {
      super.setMember(name, value);
    } else {
      getFieldWrapper(index).getInstance().setValue(value);
    }
  }
}
origin: org.opensingular/singular-form-core

@SuppressWarnings("unchecked")
private static void realMapToSInstance(Map<Integer, Map<String, Object>> pojoReferenceDataMap, Object pojoDataMap, SInstance rootInstance, boolean strictMode) {
  SType<?> type = rootInstance.getType();
  if (type.isComposite()) {
    mapToSIComposite(pojoReferenceDataMap, (Map<String, Object>) pojoDataMap, (SIComposite) rootInstance, strictMode);
  } else if (type.isList()) {
    mapToSIList(pojoReferenceDataMap, (Map<String, Object>) pojoDataMap, (SIList<SInstance>) rootInstance, strictMode, type);
  } else {
    rootInstance.setValue(((Map<String, Object>) pojoDataMap).get(type.getNameSimple()));
  }
}
org.opensingular.formSInstancesetValue

Javadoc

Resolves a field instance and sets its value.

Popular methods of SInstance

  • getDocument
    Retorna o documento ao qual pertence a instância atual.
  • getType
  • toStringDisplay
  • getId
    Retorna um ID único dentre as instâncias do mesmo documento. Um ID nunca é reutilizado, mesmo se a i
  • getAttributeValue
  • findNearest
    Returns the nearest SInstance for the given type in the form SInstance tree. The search is performed
  • setId
    Apenas para uso nas soluções de persistencia. Não deve ser usado fora dessa situação.
  • clearInstance
    Apaga os valores associados a instância. Se for uma lista ou composto, apaga os valores em profundid
  • getName
  • getParent
  • getValue
  • isEmptyOfData
    Retorna true se a instancia não conter nenhuma informação diferente de null. A pesquisa é feita em
  • getValue,
  • isEmptyOfData,
  • asAtr,
  • asAtrAnnotation,
  • asAtrProvider,
  • attachEventCollector,
  • detachEventCollector,
  • getDictionary,
  • getField,
  • getPathFromRoot

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • From CI to AI: The AI layer in your organization
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