예제 #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 PaymentMethod toModel(PaymentMethodSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    PaymentMethod model = new PaymentMethodImpl();

    model.setUuid(soapModel.getUuid());
    model.setCompanyId(soapModel.getCompanyId());
    model.setGroupId(soapModel.getGroupId());
    model.setUserId(soapModel.getUserId());
    model.setPaymentMethodId(soapModel.getPaymentMethodId());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setKey(soapModel.getKey());
    model.setName(soapModel.getName());

    return model;
  }
예제 #2
0
  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    PaymentMethod paymentMethod = null;

    try {
      paymentMethod = (PaymentMethod) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    long primaryKey = paymentMethod.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
예제 #3
0
  public int compareTo(PaymentMethod paymentMethod) {
    int value = 0;

    value = DateUtil.compareTo(getModifiedDate(), paymentMethod.getModifiedDate());

    value = value * -1;

    if (value != 0) {
      return value;
    }

    return 0;
  }