コード例 #1
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 Smearstation toModel(SmearstationSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    Smearstation model = new SmearstationImpl();

    model.setStationID(soapModel.getStationID());
    model.setDcmipoint(soapModel.getDcmipoint());
    model.setName(soapModel.getName());
    model.setDataAvail(soapModel.getDataAvail());

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

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

    Smearstation smearstation = (Smearstation) obj;

    long primaryKey = smearstation.getPrimaryKey();

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

    if (getPrimaryKey() < primaryKey) {
      return -1;
    } else if (getPrimaryKey() > primaryKey) {
      return 1;
    } else {
      return 0;
    }
  }