コード例 #1
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!(obj instanceof Education)) {
      return false;
    }

    Education education = (Education) obj;

    long primaryKey = education.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
コード例 #2
0
  @Override
  public int compareTo(Education education) {
    long primaryKey = education.getPrimaryKey();

    if (getPrimaryKey() < primaryKey) {
      return -1;
    } else if (getPrimaryKey() > primaryKey) {
      return 1;
    } else {
      return 0;
    }
  }
コード例 #3
0
  /**
   * 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 Education toModel(EducationSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    Education model = new EducationImpl();

    model.setEducationId(soapModel.getEducationId());
    model.setUserId(soapModel.getUserId());
    model.setSchoolName(soapModel.getSchoolName());
    model.setDegreeId(soapModel.getDegreeId());
    model.setGraduateYear(soapModel.getGraduateYear());
    model.setRecommender(soapModel.getRecommender());
    model.setIntroduction(soapModel.getIntroduction());

    return model;
  }