Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package obd.library;
- import java.util.Date;
- import javax.persistence.Entity;
- @Entity
- public abstract class User {
- private String CardNumber;
- private Date CreatedAt;
- private String FirstName;
- private String LastName;
- private Address Address;
- private int QuantityRentLimit = 0;
- private String Status;
- public User() {
- this.setActive();
- this.setCreatedAt(new Date());
- }
- public String getCardNumber() {
- return CardNumber;
- }
- public void setCardNumber(String cardNumber) {
- CardNumber = cardNumber;
- }
- public Date getCreatedAt() {
- return CreatedAt;
- }
- public void setCreatedAt(Date createdAt) {
- CreatedAt = createdAt;
- }
- public String getFirstName() {
- return FirstName;
- }
- public void setFirstName(String firstName) {
- FirstName = firstName;
- }
- public String getLastName() {
- return LastName;
- }
- public void setLastName(String lastName) {
- LastName = lastName;
- }
- public void setAddress(String Street, String ZipCode, String City, String Country) {
- this.Address = new Address(Street, ZipCode, City, Country);
- }
- public Address getAddress() {
- return this.Address;
- }
- public int getQuantityRentLimit() {
- return QuantityRentLimit;
- }
- public void setQuantityRentLimit(int quantityRentLimit) {
- QuantityRentLimit = quantityRentLimit;
- }
- public String getStatus() {
- return this.Status;
- }
- public void setBanned() {
- this.Status = "Zablokowany";
- }
- public void setActive() {
- this.Status = "Aktywny";
- }
- public int getRentedItemsQuantity() {
- return 0;
- }
- }
Add Comment
Please, Sign In to add comment