public static CdsPerformanceAppraisalSlotComments toModel(
      CdsPerformanceAppraisalSlotCommentsSoap soapModel) {
    CdsPerformanceAppraisalSlotComments model = new CdsPerformanceAppraisalSlotCommentsImpl();

    model.setCdsPerformanceAppraisalSlotCommentsId(
        soapModel.getCdsPerformanceAppraisalSlotCommentsId());
    model.setPaId(soapModel.getPaId());
    model.setRootId(soapModel.getRootId());
    model.setPeriodId(soapModel.getPeriodId());
    model.setUserId(soapModel.getUserId());
    model.setSlotId(soapModel.getSlotId());
    model.setCommentBy(soapModel.getCommentBy());
    model.setCommentAt(soapModel.getCommentAt());
    model.setCommentContent(soapModel.getCommentContent());

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

    CdsPerformanceAppraisalSlotComments cdsPerformanceAppraisalSlotComments = null;

    try {
      cdsPerformanceAppraisalSlotComments = (CdsPerformanceAppraisalSlotComments) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    Integer pk = cdsPerformanceAppraisalSlotComments.getPrimaryKey();

    if (getPrimaryKey().equals(pk)) {
      return true;
    } else {
      return false;
    }
  }
  public int compareTo(CdsPerformanceAppraisalSlotComments cdsPerformanceAppraisalSlotComments) {
    Integer pk = cdsPerformanceAppraisalSlotComments.getPrimaryKey();

    return getPrimaryKey().compareTo(pk);
  }
  public CdsPerformanceAppraisalSlotComments toEscapedModel() {
    if (isEscapedModel()) {
      return (CdsPerformanceAppraisalSlotComments) this;
    } else {
      CdsPerformanceAppraisalSlotComments model = new CdsPerformanceAppraisalSlotCommentsImpl();

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

      model.setCdsPerformanceAppraisalSlotCommentsId(getCdsPerformanceAppraisalSlotCommentsId());
      model.setPaId(getPaId());
      model.setRootId(getRootId());
      model.setPeriodId(getPeriodId());
      model.setUserId(getUserId());
      model.setSlotId(getSlotId());
      model.setCommentBy(getCommentBy());
      model.setCommentAt(getCommentAt());
      model.setCommentContent(HtmlUtil.escape(getCommentContent()));

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

      return model;
    }
  }