コード例 #1
0
  public int compareTo(LegalDetails legalDetails) {
    long primaryKey = legalDetails.getPrimaryKey();

    if (getPrimaryKey() < primaryKey) {
      return -1;
    } else if (getPrimaryKey() > primaryKey) {
      return 1;
    } else {
      return 0;
    }
  }
コード例 #2
0
  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    LegalDetails legalDetails = null;

    try {
      legalDetails = (LegalDetails) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    long primaryKey = legalDetails.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
コード例 #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 LegalDetails toModel(LegalDetailsSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    LegalDetails model = new LegalDetailsImpl();

    model.setLegalDetailsId(soapModel.getLegalDetailsId());
    model.setCompanyId(soapModel.getCompanyId());
    model.setUserId(soapModel.getUserId());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setName(soapModel.getName());
    model.setValueAddedTaxNo(soapModel.getValueAddedTaxNo());
    model.setRegistrationCourt(soapModel.getRegistrationCourt());
    model.setLegalForm(soapModel.getLegalForm());
    model.setAddress(soapModel.getAddress());
    model.setTelephone(soapModel.getTelephone());
    model.setEmail(soapModel.getEmail());
    model.setURL(soapModel.getURL());
    model.setFax(soapModel.getFax());

    return model;
  }