Information used to determine uniqueness consists of the entity-name and the identifier value (see equals).
Performance considerations: lots of instances of this type are created at runtime. Make sure each one is as small as possible by storing just the essential needed.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final Serializable | |
| private final EntityPersister |
| Access | Constructor and Description |
|---|---|
| public | EntityKey(Serializable
The entity id id, EntityPersister The entity persister persister)Construct a unique identifier for an entity class instance. |
| Modifier and Type | Method and Description |
|---|---|
| public static EntityKey | Returns: The deserialized EntityEntryThe stream from which to read the entry. ois, SessionFactoryImplementor The SessionFactory owning the Session being deserialized. sessionFactory)
Deprecated
as a consequence of
Custom deserialization routine used during deserialization of a
Session/PersistenceContext for increased performance.
SessionFactoryImplementor being deprecated.
|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| private int | |
| public String | |
| public Serializable | |
| public EntityPersister | |
| public int | |
| public boolean | |
| private boolean | |
| private boolean | |
| public void | serialize(ObjectOutputStream
The stream to which we should write the serial data. oos)Custom serialization routine used during serialization of a Session/PersistenceContext for increased performance. |
| public String |
| hashCode | back to summary |
|---|---|
| private final int hashCode | |
| identifier | back to summary |
|---|---|
| private final Serializable identifier | |
| persister | back to summary |
|---|---|
| private final EntityPersister persister | |
| EntityKey | back to summary |
|---|---|
| public EntityKey(Serializable id, EntityPersister persister) Construct a unique identifier for an entity class instance.
NOTE : This signature has changed to accommodate both entity mode and multi-tenancy, both of which relate to
the Session to which this key belongs. To help minimize the impact of these changes in the future, the
| |
| deserialize | back to summary |
|---|---|
| public static EntityKey deserialize(ObjectInputStream ois, SessionFactoryImplementor sessionFactory) throws IOException, ClassNotFoundException
Deprecated as a consequence of Custom deserialization routine used during deserialization of a Session/PersistenceContext for increased performance.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| generateHashCode | back to summary |
|---|---|
| private int generateHashCode() | |
| getEntityName | back to summary |
|---|---|
| public String getEntityName() | |
| getIdentifier | back to summary |
|---|---|
| public Serializable getIdentifier() | |
| getPersister | back to summary |
|---|---|
| public EntityPersister getPersister() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isBatchLoadable | back to summary |
|---|---|
| public boolean isBatchLoadable() | |
| sameIdentifier | back to summary |
|---|---|
| private boolean sameIdentifier(final EntityKey otherKey) | |
| samePersistentType | back to summary |
|---|---|
| private boolean samePersistentType(final EntityKey otherKey) | |
| serialize | back to summary |
|---|---|
| public void serialize(ObjectOutputStream oos) throws IOException Custom serialization routine used during serialization of a Session/PersistenceContext for increased performance.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |