protected CollectionPersister resolveCollectionPersister( SessionImplementor session, PersistentCollection collection) { // First attempt to resolve the persister from the collection entry if ( collection != null ) { CollectionEntry collectionEntry = session.getPersistenceContext().getCollectionEntry( collection ); if ( collectionEntry != null ) { CollectionPersister collectionPersister = collectionEntry.getCurrentPersister(); if ( collectionPersister != null ) { return collectionPersister; } } } // Fallback to resolving the persister from the collection role final CollectionPersister collectionPersister = session.getFactory() .getMetamodel() .collectionPersister( commonCollectionMapperData.getRole() ); if ( collectionPersister == null ) { throw new AuditException( String.format( Locale.ROOT, "Failed to locate CollectionPersister for collection [%s]", commonCollectionMapperData.getRole() ) ); } return collectionPersister; }
/** * Called after execution of an action */ public void afterAction(PersistentCollection collection) { loadedKey = getCurrentKey(); setLoadedPersister( getCurrentPersister() ); boolean resnapshot = collection.wasInitialized() && ( isDoremove() || isDorecreate() || isDoupdate() ); if ( resnapshot ) { snapshot = loadedPersister==null || !loadedPersister.isMutable() ? null : collection.getSnapshot(loadedPersister); //re-snapshot } collection.postAction(); }
new CollectionRecreateAction( coll, ce.getCurrentPersister(), ce.getCurrentKey(), session
final CollectionPersister currentPersister = entry.getCurrentPersister(); if ( loadedPersister != null || currentPersister != null ) {
/** * Called after execution of an action */ public void afterAction(PersistentCollection collection) { loadedKey = getCurrentKey(); setLoadedPersister( getCurrentPersister() ); boolean resnapshot = collection.wasInitialized() && ( isDoremove() || isDorecreate() || isDoupdate() ); if ( resnapshot ) { snapshot = loadedPersister==null || !loadedPersister.isMutable() ? null : collection.getSnapshot(loadedPersister); //re-snapshot } collection.postAction(); }
/** * Called after execution of an action */ public void afterAction(PersistentCollection collection) { loadedKey = getCurrentKey(); setLoadedPersister( getCurrentPersister() ); boolean resnapshot = collection.wasInitialized() && ( isDoremove() || isDorecreate() || isDoupdate() ); if ( resnapshot ) { snapshot = loadedPersister==null || !loadedPersister.isMutable() ? null : collection.getSnapshot(loadedPersister); //re-snapshot } collection.postAction(); }
new CollectionRecreateAction( coll, ce.getCurrentPersister(), ce.getCurrentKey(), session
new CollectionRecreateAction( coll, ce.getCurrentPersister(), ce.getCurrentKey(), session
final CollectionPersister currentPersister = entry.getCurrentPersister(); if ( loadedPersister != null || currentPersister != null ) { // it is or was referenced _somewhere_
final CollectionPersister currentPersister = entry.getCurrentPersister(); if ( loadedPersister != null || currentPersister != null ) { // it is or was referenced _somewhere_