Class BaseEntity
java.lang.Object
com.app.persistence.entity.BaseEntity
- Direct Known Subclasses:
HolidayEntity
,UserEntity
,VerificationTokenEntity
Base entity class to be extended by all JPA entities.
Provides a common identifier property `id` with auto-generated value,
and overrides
equals(Object)
and hashCode()
methods
to ensure correct entity equality semantics, including support for Hibernate proxies.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
The unique identifier of the entity.
-
-
Constructor Details
-
BaseEntity
public BaseEntity()
-
-
Method Details
-
equals
Determines equality of entities based on their identifier. Takes into account Hibernate proxies to avoid issues with lazy loading. -
hashCode
-