Esempio n. 1
0
  /**
   * Return a deep copy of this Insert.
   *
   * @return Deep copy of Insert
   */
  public Object clone() {
    GroupSymbol copyGroup = null;
    if (group != null) {
      copyGroup = group.clone();
    }

    List<ElementSymbol> copyVars =
        LanguageObject.Util.deepClone(getVariables(), ElementSymbol.class);

    List<Expression> copyVals = null;

    if (getValues() != null) {
      copyVals = LanguageObject.Util.deepClone(getValues(), Expression.class);
    }

    Insert copy = new Insert(copyGroup, copyVars, copyVals);
    if (this.queryExpression != null) {
      copy.setQueryExpression((QueryCommand) this.queryExpression.clone());
    }
    this.copyMetadataState(copy);
    return copy;
  }