public int compareTo(CdsPerformanceAppraisalSlotRating cdsPerformanceAppraisalSlotRating) {
    int value = 0;

    value = DateUtil.compareTo(getRatingAt(), cdsPerformanceAppraisalSlotRating.getRatingAt());

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

    return 0;
  }
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    CdsPerformanceAppraisalSlotRating cdsPerformanceAppraisalSlotRating = null;

    try {
      cdsPerformanceAppraisalSlotRating = (CdsPerformanceAppraisalSlotRating) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    Integer pk = cdsPerformanceAppraisalSlotRating.getPrimaryKey();

    if (getPrimaryKey().equals(pk)) {
      return true;
    } else {
      return false;
    }
  }
  public static CdsPerformanceAppraisalSlotRating toModel(
      CdsPerformanceAppraisalSlotRatingSoap soapModel) {
    CdsPerformanceAppraisalSlotRating model = new CdsPerformanceAppraisalSlotRatingImpl();

    model.setCdsPerformanceAppraisalSlotRatingId(
        soapModel.getCdsPerformanceAppraisalSlotRatingId());
    model.setPaId(soapModel.getPaId());
    model.setRootId(soapModel.getRootId());
    model.setPeriodId(soapModel.getPeriodId());
    model.setUserId(soapModel.getUserId());
    model.setSlotId(soapModel.getSlotId());
    model.setRatingBy(soapModel.getRatingBy());
    model.setRatingAt(soapModel.getRatingAt());
    model.setRatingStatus(soapModel.getRatingStatus());
    model.setUserType(soapModel.getUserType());
    model.setPointName(soapModel.getPointName());
    model.setPointValue(soapModel.getPointValue());
    model.setRatingOrgId(soapModel.getRatingOrgId());

    return model;
  }
  public CdsPerformanceAppraisalSlotRating toEscapedModel() {
    if (isEscapedModel()) {
      return (CdsPerformanceAppraisalSlotRating) this;
    } else {
      CdsPerformanceAppraisalSlotRating model = new CdsPerformanceAppraisalSlotRatingImpl();

      model.setNew(isNew());
      model.setEscapedModel(true);

      model.setCdsPerformanceAppraisalSlotRatingId(getCdsPerformanceAppraisalSlotRatingId());
      model.setPaId(getPaId());
      model.setRootId(getRootId());
      model.setPeriodId(getPeriodId());
      model.setUserId(getUserId());
      model.setSlotId(getSlotId());
      model.setRatingBy(getRatingBy());
      model.setRatingAt(getRatingAt());
      model.setRatingStatus(getRatingStatus());
      model.setUserType(getUserType());
      model.setPointName(HtmlUtil.escape(getPointName()));
      model.setPointValue(getPointValue());
      model.setRatingOrgId(getRatingOrgId());

      model =
          (CdsPerformanceAppraisalSlotRating)
              Proxy.newProxyInstance(
                  CdsPerformanceAppraisalSlotRating.class.getClassLoader(),
                  new Class[] {CdsPerformanceAppraisalSlotRating.class},
                  new ReadOnlyBeanHandler(model));

      return model;
    }
  }