Tabnine Logo
ElementInstance.clone
Code IndexAdd Tabnine to your IDE (free)

How to use
clone
method
in
se.cambio.cds.model.instance.ElementInstance

Best Java code snippets using se.cambio.cds.model.instance.ElementInstance.clone (Showing top 3 results out of 315)

origin: org.gdl-lang.gdl-tools/cds-core

private static ElementInstance cloneElementInstanceWithGTCodes(ElementInstance ei, ArchetypeReference ar, boolean useGTCodes) {
  ei = ei.clone();
  ei.setArchetypeReference(ar);
  if (!useGTCodes && ei instanceof GeneratedElementInstance) {
    ((GeneratedElementInstance) ei).getRuleReferences().clear();
  }
  return ei;
}
origin: org.gdl-lang.gdl-tools/cds-core

boolean matchAndFill(GeneratedArchetypeReference ar1, ArchetypeReference ar2, Map<String, Guide> guideMap, Calendar date) {
  Collection<ElementInstance> emptyElementInstances = new ArrayList<ElementInstance>();
  boolean matches = matches(ar1, ar2, guideMap, date);
  if (!matches) {
    return false;
  } else {
    if (ar2 instanceof GeneratedArchetypeReference) {
      for (String idElement : ar1.getElementInstancesMap().keySet()) {
        ElementInstance ei1 = ar1.getElementInstancesMap().get(idElement);
        ElementInstance ei2 = ar2.getElementInstancesMap().get(idElement);
        if (!(ei1 instanceof PredicateGeneratedElementInstance) && ei2 == null) {
          ei2 = ei1.clone();
          emptyElementInstances.add(ei2);
        }
        if (ei1 instanceof GeneratedElementInstance && ei2 instanceof GeneratedElementInstance) {
          ((GeneratedElementInstance) ei2).getRuleReferences().addAll(((GeneratedElementInstance) ei1).getRuleReferences());
        }
      }
      for (ElementInstance elementInstance : emptyElementInstances) {
        elementInstance.setArchetypeReference(ar2);
      }
    }
  }
  return true;
}
origin: org.gdl-lang.gdl-tools/cds-core

ElementInstance ei = originalEI.clone();
ei.setArchetypeReference(arAux);
if (originalEI instanceof GeneratedElementInstance) {
se.cambio.cds.model.instanceElementInstanceclone

Popular methods of ElementInstance

  • getArchetypeReference
  • getId
  • <init>
  • getDataValue
  • setArchetypeReference
  • setDataValue
  • setNullFlavour

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • getSystemService (Context)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best IntelliJ 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