Methods Summary |
---|
public void | afterTransactionCompletion(boolean success)
if ( persister.hasCache() ) {
final CacheKey ck = new CacheKey(
key,
persister.getKeyType(),
persister.getRole(),
session.getEntityMode(),
session.getFactory()
);
persister.getCache().release(ck, lock);
}
|
public final void | beforeExecutions()
// we need to obtain the lock before any actions are
// executed, since this may be an inverse="true"
// bidirectional association and it is one of the
// earlier entity actions which actually updates
// the database (this action is resposible for
// second-level cache invalidation only)
if ( persister.hasCache() ) {
final CacheKey ck = new CacheKey(
key,
persister.getKeyType(),
persister.getRole(),
session.getEntityMode(),
session.getFactory()
);
lock = persister.getCache().lock(ck, null);
}
|
public int | compareTo(java.lang.Object other)
CollectionAction action = ( CollectionAction ) other;
//sort first by role name
int roleComparison = collectionRole.compareTo( action.collectionRole );
if ( roleComparison != 0 ) {
return roleComparison;
}
else {
//then by fk
return persister.getKeyType()
.compare( key, action.key, session.getEntityMode() );
}
|
protected final void | evict()
if ( persister.hasCache() ) {
CacheKey ck = new CacheKey(
key,
persister.getKeyType(),
persister.getRole(),
session.getEntityMode(),
session.getFactory()
);
persister.getCache().evict(ck);
}
|
protected org.hibernate.collection.PersistentCollection | getCollection()
return collection;
|
protected final java.io.Serializable | getKey()
finalKey = key;
if ( key instanceof DelayedPostInsertIdentifier ) {
// need to look it up from the persistence-context
finalKey = session.getPersistenceContext().getEntry( collection.getOwner() ).getId();
if ( finalKey == key ) {
// we may be screwed here since the collection action is about to execute
// and we do not know the final owner key value
}
}
return finalKey;
|
protected final org.hibernate.persister.collection.CollectionPersister | getPersister()
return persister;
|
public java.io.Serializable[] | getPropertySpaces()
return persister.getCollectionSpaces();
|
protected final org.hibernate.engine.SessionImplementor | getSession()
return session;
|
public boolean | hasAfterTransactionCompletion()
return persister.hasCache();
|
private void | readObject(java.io.ObjectInputStream ois)
ois.defaultReadObject();
persister = session.getFactory().getCollectionPersister( collectionRole );
|
public java.lang.String | toString()
return StringHelper.unqualify( getClass().getName() ) +
MessageHelper.infoString( collectionRole, key );
|