congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SInstance.setId
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.opensingular/singular-form-core

private static void readAttributes(SInstance instance, MElement xml) {
  NamedNodeMap attributes = xml.getAttributes();
  if (attributes != null) {
    for (int i = 0; i < attributes.getLength(); i++) {
      Attr at = (Attr) attributes.item(i);
      if (at.getName().equals(ID_ATTRIBUTE)) {
        instance.setId(Integer.valueOf(at.getValue()));
      } else if (!at.getName().equals(LAST_ID_ATTRIBUTE)) {
        InternalAccess.INTERNAL.setAttributeValueSavingForLatter(instance, at.getName(), at.getValue());
      }
    }
  }
}
origin: org.opensingular/form-core

private static void lerAtributos(SInstance instancia, MElement xml) {
  NamedNodeMap atributos = xml.getAttributes();
  if (atributos != null) {
    for (int i = 0; i < atributos.getLength(); i++) {
      Attr at = (Attr) atributos.item(i);
      if (at.getName().equals(ATRIBUTO_ID)) {
        instancia.setId(Integer.parseInt(at.getValue()));
      } else if (!at.getName().equals(ATRIBUTO_LAST_ID)) {
        instancia.setAttributeValue(at.getName(), at.getValue());
      }
    }
  }
}
origin: org.opensingular/singular-requirement-commons

private static void copyIdValues(SInstance source, SInstance target) {
  target.setId(source.getId());
  if (source instanceof SIComposite) {
    SIComposite sourceComposite = (SIComposite) source;
    SIComposite targetComposite = (SIComposite) target;
    for (int i = 0; i < sourceComposite.getFields().size() ; i++) {
      copyIdValues(sourceComposite.getField(i), targetComposite.getField(i));
    }
  } else if (source instanceof SIList) {
    SIList sourceList = (SIList) source;
    SIList targetList = (SIList) target;
    if (sourceList.getChildren() != null) {
      for (int i = 0; i < sourceList.getChildren().size() ; i++) {
        SInstance sourceItem = (SInstance) sourceList.getChildren().get(i);
        SInstance targetItem = (SInstance) targetList.getChildren().get(i);
        copyIdValues(sourceItem, targetItem);
      }
    }
  }
}
origin: org.opensingular/singular-server-commons

private static void copyIdValues(SInstance source, SInstance target) {
  target.setId(source.getId());
  if (source instanceof SIComposite) {
    SIComposite sourceComposite = (SIComposite) source;
    SIComposite targetComposite = (SIComposite) target;
    for (int i = 0; i < sourceComposite.getFields().size() ; i++) {
      copyIdValues(sourceComposite.getField(i), targetComposite.getField(i));
    }
  } else if (source instanceof SIList) {
    SIList sourceList = (SIList) source;
    SIList targetList = (SIList) target;
    if (sourceList.getChildren() != null) {
      for (int i = 0; i < sourceList.getChildren().size() ; i++) {
        SInstance sourceItem = (SInstance) sourceList.getChildren().get(i);
        SInstance targetItem = (SInstance) targetList.getChildren().get(i);
        copyIdValues(sourceItem, targetItem);
      }
    }
  }
}
origin: org.opensingular/singular-requirement-module

private static void copyIdValues(SInstance source, SInstance target) {
  target.setId(source.getId());
  if (source instanceof SIComposite) {
    SIComposite sourceComposite = (SIComposite) source;
    SIComposite targetComposite = (SIComposite) target;
    for (int i = 0; i < sourceComposite.getFields().size() ; i++) {
      copyIdValues(sourceComposite.getField(i), targetComposite.getField(i));
    }
  } else if (source instanceof SIList) {
    SIList sourceList = (SIList) source;
    SIList targetList = (SIList) target;
    if (sourceList.getChildren() != null) {
      for (int i = 0; i < sourceList.getChildren().size() ; i++) {
        SInstance sourceItem = (SInstance) sourceList.getChildren().get(i);
        SInstance targetItem = (SInstance) targetList.getChildren().get(i);
        copyIdValues(sourceItem, targetItem);
      }
    }
  }
}
origin: org.opensingular/server-commons

private void copyIdValues(SInstance source, SInstance target) {
  target.setId(source.getId());
  if (source instanceof SIComposite) {
    SIComposite sourceComposite = (SIComposite) source;
    SIComposite targetComposite = (SIComposite) target;
    if (sourceComposite.getFields() != null) {
      for (int i = 0; i < sourceComposite.getFields().size() ; i++) {
        copyIdValues(sourceComposite.getField(i), targetComposite.getField(i));
      }
    }
  } else if (source instanceof SIList) {
    SIList sourceList = (SIList) source;
    SIList targetList = (SIList) target;
    if (sourceList.getChildren() != null) {
      for (int i = 0; i < sourceList.getChildren().size() ; i++) {
        SInstance sourceItem = (SInstance) sourceList.getChildren().get(i);
        SInstance targetItem = (SInstance) targetList.getChildren().get(i);
        copyIdValues(sourceItem, targetItem);
      }
    }
  }
}
org.opensingular.formSInstancesetId

Javadoc

Apenas para uso nas soluções de persistencia. Não deve ser usado fora dessa situação.

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
  • 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
  • asAtr
  • isEmptyOfData,
  • asAtr,
  • asAtrAnnotation,
  • asAtrProvider,
  • attachEventCollector,
  • detachEventCollector,
  • getDictionary,
  • getField,
  • getPathFromRoot

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JTable (javax.swing)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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