Tabnine Logo
SIComposite.getAllChildren
Code IndexAdd Tabnine to your IDE (free)

How to use
getAllChildren
method
in
org.opensingular.form.SIComposite

Best Java code snippets using org.opensingular.form.SIComposite.getAllChildren (Showing top 8 results out of 315)

origin: org.opensingular/singular-form-core

protected static Optional<SInstance> findDescendant(SIComposite instance, SType<?> type) {
  for (SInstance current : instance.getAllChildren()) {
    if (current.getType().getSuperType() == type) {
      return Optional.of(current);
    }
  }
  return Optional.empty();
}
origin: org.opensingular/singular-form-core

public static List<SType<?>> getFields(SIComposite instance) {
  List<SType<?>> list = new ArrayList<>();
  instance.getAllChildren().forEach(child -> addFieldToList(child.getType(), list));
  return list;
}
origin: org.opensingular/singular-form-core

private static void toMap(Map<String, Content> value, SInstance instance) {
  if (instance instanceof SIComposite) {
    SIComposite item = (SIComposite) instance;
    for (SInstance i : item.getAllChildren()) {
      value.put(i.getName(), dehydrate(i));
    }
  }
}
origin: org.opensingular/form-core

private static void toMap(Map<String, Content> value, SInstance instancia) {
  if (instancia instanceof SIComposite) {
    SIComposite item = (SIComposite) instancia;
    for (SInstance i : item.getAllChildren()) {
      value.put(i.getName(), dehydrate(i));
    }
  }
}
origin: org.opensingular/singular-form-core

  composite.getAllChildren().forEach(inst -> attributeNames.add(inst.getType().getNameSimple()));
  Set<String> keySet = pojoDataMap.keySet();
  for (String string : keySet) {
for (SInstance child : composite.getAllChildren()) {
  Object object = pojoDataMap.get(child.getType().getNameSimple());
origin: org.opensingular/singular-form-core

private SInstance getTupleKeyRef(SInstance instance, RelationalColumn column) {
  if (instance.getType().isComposite()) {
    for (SInstance field : ((SIComposite) instance).getAllChildren()) {
      String fieldTable = RelationalSQL.table(RelationalSQL.tableContext(field.getType()));
      String fieldColunm = RelationalSQL.column(field.getType());
      if (fieldTable != null && fieldColunm != null && fieldTable.equalsIgnoreCase(column.getTable())
          && fieldColunm.equalsIgnoreCase(column.getName())) {
        return RelationalSQL.tupleKeyRef(field);
      }
    }
    for (SInstance field : ((SIComposite) instance).getAllChildren()) {
      SInstance current = getTupleKeyRef(field, column);
      if (current != null) {
        return current;
      }
    }
  }
  return null;
}
origin: org.opensingular/singular-form-core

protected void updateInternal(@Nonnull SIComposite instance, SIComposite previousPersistedInstance,
    Integer inclusionActor) {
  for (SInstance field : instance.getAllChildren()) {
    if (RelationalSQL.isListWithTableBound(field.getType())) {
      updateFieldInternal(instance, previousPersistedInstance, inclusionActor, field);
    }
  }
  if (execScript(RelationalSQL.update(instance, previousPersistedInstance).toSQLScript()) == 0) {
    throw new SingularFormNotFoundException(FormKey.fromInstance(instance));
  }
}
origin: org.opensingular/singular-form-core

public void delete(@Nonnull FormKey key) {
  INSTANCE mainInstance = load(key);
  mainInstance.getAllChildren().stream().filter(field -> RelationalSQL.isListWithTableBound(field.getType()))
      .forEach(field -> {
        SIList<SIComposite> listInstance = mainInstance.getFieldList(field.getType().getNameSimple(),
            SIComposite.class);
        for (SIComposite item : listInstance.getChildren()) {
          String manyToManyTable = manyToManyTable(item);
          if (manyToManyTable != null) {
            executeManyToManyDelete(mainInstance, item, manyToManyTable);
          }
          deleteInternal(item.getType(), FormKey.fromInstance(item));
        }
      });
  deleteInternal(createType(), key);
}
org.opensingular.formSICompositegetAllChildren

Popular methods of SIComposite

  • getField
  • getFields
    List only those fields already instantiated. OBS: field instantiation occurs automatically when its
  • getType
  • findNearest
  • getDocument
  • setValue
  • asAtr
  • findDescendant
  • getFieldList
  • asAtrAnnotation
  • asAtrBootstrap
  • clearInstance
  • asAtrBootstrap,
  • clearInstance,
  • createField,
  • findFieldIndex,
  • findFieldIndexOpt,
  • getAllFields,
  • getDictionary,
  • getFieldLocalWithoutCreating,
  • getFieldOpt

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JList (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top Sublime Text plugins
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