public final class EntityKey
extends java.lang.Object
implements java.io.Serializable
equals(java.lang.Object)
).
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.Constructor and Description |
---|
EntityKey(java.io.Serializable id,
EntityPersister persister)
Construct a unique identifier for an entity class instance.
|
Modifier and Type | Method and Description |
---|---|
static EntityKey |
deserialize(java.io.ObjectInputStream ois,
SessionFactoryImplementor sessionFactory)
Custom deserialization routine used during deserialization of a
Session/PersistenceContext for increased performance.
|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getEntityName() |
java.io.Serializable |
getIdentifier() |
int |
hashCode() |
boolean |
isBatchLoadable() |
void |
serialize(java.io.ObjectOutputStream oos)
Custom serialization routine used during serialization of a
Session/PersistenceContext for increased performance.
|
java.lang.String |
toString() |
public EntityKey(java.io.Serializable id, EntityPersister persister)
SharedSessionContractImplementor.generateEntityKey(java.io.Serializable, org.hibernate.persister.entity.EntityPersister)
method was added to hide the session-specific changes.id
- The entity idpersister
- The entity persisterpublic boolean isBatchLoadable()
public java.io.Serializable getIdentifier()
public java.lang.String getEntityName()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void serialize(java.io.ObjectOutputStream oos) throws java.io.IOException
oos
- The stream to which we should write the serial data.java.io.IOException
- Thrown by Java I/Opublic static EntityKey deserialize(java.io.ObjectInputStream ois, SessionFactoryImplementor sessionFactory) throws java.io.IOException, java.lang.ClassNotFoundException
ois
- The stream from which to read the entry.sessionFactory
- The SessionFactory owning the Session being deserialized.java.io.IOException
- Thrown by Java I/Ojava.lang.ClassNotFoundException
- Thrown by Java I/OCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.