public Collection(
      String name, String peerName, COL_TYPE type, int isPersistent, String keys, String nonKeys) {
    _name = name;
    _peerName = peerName;
    _type = type;
    if (_type.equals(COL_TYPE.EXT)) {
      _isPersistent = isPersistent;
      _suffix = "";
    } else {
      _isPersistent = 0;
      _suffix = "_i";
    }
    _keys = new ArrayList<String>();
    _nonKeys = new ArrayList<String>();
    _facts = new HashSet<String>();

    String[] tmp = keys.trim().split(",");
    for (int i = 0; i < tmp.length; i++) {
      _keys.add(tmp[i]);
    }

    if (nonKeys.length() > 0) {
      tmp = nonKeys.trim().split(",");
      _nonKeys = new ArrayList<String>();
      for (int i = 0; i < tmp.length; i++) {
        _nonKeys.add(tmp[i]);
      }
    }

    _schema = _name + _suffix + "@" + peerName + "(" + keysToString() + nonKeysToString() + ")";
    _schemaWithVars = _name + _suffix + "@" + peerName + "(" + colsToString() + ")";
  }
 public String getType() {
   return _type.toString().toLowerCase();
 }