| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package com.zipcoder.payment;
-
- public class PayPal implements Payment {
-
- Long id;
- String payerName;
- String email;
-
- public PayPal(Long id, String payerName, String email) {
- this.id = id;
- this.payerName = payerName;
- this.email = email;
- }
-
- public PayPal() {
- id = 0L;
- payerName = "";
- email = "";
- }
-
-
- public void setId(Long id) {
- this.id = id;
- }
-
- //on Payment interface
- public Long getId() {
- return id;
- }
-
-
- public void setPayerName(String payerName) {
- this.payerName = payerName;
- }
-
- //on Payment interface
- public String getPayerName() {
- return payerName;
- }
-
-
- public void setEmail(String email) {
- this.email = email;
- }
-
-
- public String getEmail() {
- return email;
- }
-
- //on Payment interface
- public String getShortDescription() {
- return "Paypal " + payerName +" "+email;
- }
-
-
- public int compareTo(Payment o) {
- return this.getShortDescription().compareTo(o.getShortDescription());
- }
- }
|