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

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

    AppRole2Employee appRole2Employee = (AppRole2Employee) obj;

    long primaryKey = appRole2Employee.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
コード例 #2
0
  @Override
  public int compareTo(AppRole2Employee appRole2Employee) {
    long primaryKey = appRole2Employee.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 AppRole2Employee toModel(AppRole2EmployeeSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    AppRole2Employee model = new AppRole2EmployeeImpl();

    model.setAppRole2EmployeeId(soapModel.getAppRole2EmployeeId());
    model.setUserId(soapModel.getUserId());
    model.setGroupId(soapModel.getGroupId());
    model.setCompanyId(soapModel.getCompanyId());
    model.setCreateDate(soapModel.getCreateDate());
    model.setAppRoleId(soapModel.getAppRoleId());
    model.setEmployeeId(soapModel.getEmployeeId());

    return model;
  }