コード例 #1
0
  public Object clone() {
    CombinationLookupMeta retval = (CombinationLookupMeta) super.clone();

    int nrkeys = keyField.length;

    retval.allocate(nrkeys);

    // Read keys to dimension
    for (int i = 0; i < nrkeys; i++) {
      retval.keyField[i] = keyField[i];
      retval.keyLookup[i] = keyLookup[i];
    }

    return retval;
  }
コード例 #2
0
  public boolean equals(Object other) {
    if (other == this) return true;
    if (other == null) return false;
    if (getClass() != other.getClass()) return false;
    CombinationLookupMeta o = (CombinationLookupMeta) other;

    if (getCommitSize() != o.getCommitSize()) return false;
    if (getCacheSize() != o.getCacheSize()) return false;
    if (!getTechKeyCreation().equals(o.getTechKeyCreation())) return false;
    if (replaceFields() != o.replaceFields()) return false;
    if (useHash() != o.useHash()) return false;
    if (replaceFields() != o.replaceFields()) return false;
    if ((getSequenceFrom() == null && o.getSequenceFrom() != null)
        || (getSequenceFrom() != null && o.getSequenceFrom() == null)
        || (getSequenceFrom() != null
            && o.getSequenceFrom() != null
            && !getSequenceFrom().equals(o.getSequenceFrom()))) return false;

    if ((getSchemaName() == null && o.getSchemaName() != null)
        || (getSchemaName() != null && o.getSchemaName() == null)
        || (getSchemaName() != null
            && o.getSchemaName() != null
            && !getSchemaName().equals(o.getSchemaName()))) return false;

    if ((getTablename() == null && o.getTablename() != null)
        || (getTablename() != null && o.getTablename() == null)
        || (getTablename() != null
            && o.getTablename() != null
            && !getTablename().equals(o.getTablename()))) return false;

    if ((getHashField() == null && o.getHashField() != null)
        || (getHashField() != null && o.getHashField() == null)
        || (getHashField() != null
            && o.getHashField() != null
            && !getHashField().equals(o.getHashField()))) return false;

    if ((getTechnicalKeyField() == null && o.getTechnicalKeyField() != null)
        || (getTechnicalKeyField() != null && o.getTechnicalKeyField() == null)
        || (getTechnicalKeyField() != null
            && o.getTechnicalKeyField() != null
            && !getTechnicalKeyField().equals(o.getTechnicalKeyField()))) return false;

    // comparison missing for the following, but can be added later
    // if required.
    //   getKeyField()
    //   getKeyLookup()

    return true;
  }