Uniquely identifies a collection instance in a particular session.
| Method from org.hibernate.engine.CollectionKey Detail: |
static CollectionKey deserialize(ObjectInputStream ois,
SessionImplementor session) throws ClassNotFoundException, IOException {
return new CollectionKey(
( String ) ois.readObject(),
( Serializable ) ois.readObject(),
( Type ) ois.readObject(),
EntityMode.parse( ( String ) ois.readObject() ),
session.getFactory()
);
}
Custom deserialization routine used during deserialization of a
Session/PersistenceContext for increased performance. |
public boolean equals(Object other) {
CollectionKey that = (CollectionKey) other;
return that.role.equals(role) &&
keyType.isEqual(that.key, key, entityMode, factory);
}
|
public int generateHashCode() {
int result = 17;
result = 37 * result + role.hashCode();
result = 37 * result + keyType.getHashCode(key, entityMode, factory);
return result;
}
|
public Serializable getKey() {
return key;
}
|
public String getRole() {
return role;
}
|
public int hashCode() {
return hashCode;
}
|
void serialize(ObjectOutputStream oos) throws IOException {
oos.writeObject( role );
oos.writeObject( key );
oos.writeObject( keyType );
oos.writeObject( entityMode.toString() );
}
Custom serialization routine used during serialization of a
Session/PersistenceContext for increased performance. |
public String toString() {
return "CollectionKey" +
MessageHelper.collectionInfoString( factory.getCollectionPersister(role), key, factory );
}
|