File was renamed from src/main/java/hu/unr/fiber/cardapi/entity/Card.java |
| | |
| | | package hu.unr.fiber.cardapi.entity; |
| | | package hu.unr.fiber.cardapi.hibernate; |
| | | |
| | | import hu.unr.fiber.cardapi.interfaces.CardInterface; |
| | | |
| | | import javax.persistence.*; |
| | | import java.util.Objects; |
| | | |
| | | @Entity |
| | | @Table(name = "Card") |
| | | public class Card implements CardEntityInterface { |
| | | public class Card implements CardInterface { |
| | | public static final long INVALID_ID = 0; |
| | | |
| | | @Id |
| | |
| | | Objects.equals(cardHolder, card.cardHolder); |
| | | } |
| | | |
| | | public void update(Card otherCard) { |
| | | public CardInterface update(CardInterface otherCard) { |
| | | this.setName(otherCard.getName()); |
| | | this.setNumber(otherCard.getNumber()); |
| | | this.setCardHolder(otherCard.getCardHolder()); |
| | | |
| | | return this; |
| | | } |
| | | |
| | | @Override |