Package de.bytestore.hostinger.entity
Class Card
java.lang.Object
de.bytestore.hostinger.entity.Card
The Card entity represents a physical or virtual card managed in the system.
It is associated with a user and stores various properties such as priority,
provider, and location. The entity integrates with the CardService for performing
specific actions during the entity's lifecycle.
Entity-specific behaviors:
- On removal, associated card settings are also removed via the CardService.
- On load, the CardService instance is initialized for use within the entity.
Database Mapping:
- Mapped to the "HOST_CARD" database table.
- Has an index column for the associated user (USER_ID).
Lifecycle Annotations:
- @PostLoad: Initializes dependencies.
- @PostRemove: Handles cleanup operations upon removal.
Relationships:
- Many-to-one association with the User entity.
- The associated user is removed with a cascading delete policy.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Card
public Card()
-
-
Method Details
-
postRemove
public void postRemove() -
load
public void load()
-