/**
   * Converts the soap model instance into a normal model instance.
   *
   * @param soapModel the soap model instance to convert
   * @return the normal model instance
   */
  public static WarrantUserUniqueId toModel(WarrantUserUniqueIdSoap soapModel) {
    WarrantUserUniqueId model = new WarrantUserUniqueIdImpl();

    model.setId(soapModel.getId());
    model.setUniqueId(soapModel.getUniqueId());
    model.setUserId(soapModel.getUserId());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setSentEmail(soapModel.getSentEmail());
    model.setSentDate(soapModel.getSentDate());
    model.setSentOmicode(soapModel.getSentOmicode());

    return model;
  }
  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    WarrantUserUniqueId warrantUserUniqueId = null;

    try {
      warrantUserUniqueId = (WarrantUserUniqueId) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    long primaryKey = warrantUserUniqueId.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
  public int compareTo(WarrantUserUniqueId warrantUserUniqueId) {
    int value = 0;

    value = DateUtil.compareTo(getCreateDate(), warrantUserUniqueId.getCreateDate());

    value = value * -1;

    if (value != 0) {
      return value;
    }

    return 0;
  }