Tabnine Logo
CollectionEntry.afterAction
Code IndexAdd Tabnine to your IDE (free)

How to use
afterAction
method
in
org.hibernate.engine.spi.CollectionEntry

Best Java code snippets using org.hibernate.engine.spi.CollectionEntry.afterAction (Showing top 13 results out of 315)

origin: hibernate/hibernate-orm

  @Override
  public void execute() throws HibernateException {
    // this QueuedOperationCollectionAction has to be executed before any other
    // CollectionAction involving the same collection.

    getPersister().processQueuedOps( getCollection(), getKey(), getSession() );

    // TODO: It would be nice if this could be done safely by CollectionPersister#processQueuedOps;
    //       Can't change the SPI to do this though.
    ((AbstractPersistentCollection) getCollection() ).clearOperationQueue();

    // The other CollectionAction types call CollectionEntry#afterAction, which
    // clears the dirty flag. We don't want to call CollectionEntry#afterAction unless
    // there is no other CollectionAction that will be executed on the same collection.
    final CollectionEntry ce = getSession().getPersistenceContext().getCollectionEntry( getCollection() );
    if ( !ce.isDoremove() && !ce.isDoupdate() && !ce.isDorecreate() ) {
      ce.afterAction( getCollection() );
    }
  }
}
origin: hibernate/hibernate-orm

@Override
public void execute() throws HibernateException {
  // this method is called when a new non-null collection is persisted
  // or when an existing (non-null) collection is moved to a new owner
  final PersistentCollection collection = getCollection();
  
  preRecreate();
  getPersister().recreate( collection, getKey(), getSession() );
  getSession().getPersistenceContext().getCollectionEntry( collection ).afterAction( collection );
  evict();
  postRecreate();
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatistics().recreateCollection( getPersister().getRole() );
  }
}
origin: hibernate/hibernate-orm

@Override
public void execute() throws HibernateException {
  preRemove();
  if ( !emptySnapshot ) {
    // an existing collection that was either non-empty or uninitialized
    // is replaced by null or a different collection
    // (if the collection is uninitialized, hibernate has no way of
    // knowing if the collection is actually empty without querying the db)
    getPersister().remove( getKey(), getSession() );
  }
  
  final PersistentCollection collection = getCollection();
  if ( collection != null ) {
    getSession().getPersistenceContext().getCollectionEntry( collection ).afterAction( collection );
  }
  evict();
  postRemove();
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatistics().removeCollection( getPersister().getRole() );
  }
}
origin: hibernate/hibernate-orm

getSession().getPersistenceContext().getCollectionEntry( collection ).afterAction( collection );
evict();
postUpdate();
origin: org.hibernate.orm/hibernate-core

@Override
public void execute() throws HibernateException {
  // this method is called when a new non-null collection is persisted
  // or when an existing (non-null) collection is moved to a new owner
  final PersistentCollection collection = getCollection();
  
  preRecreate();
  getPersistentCollectionDescriptor().recreate( collection, getKey(), getSession() );
  getSession().getPersistenceContext().getCollectionEntry( collection ).afterAction( collection );
  evict();
  postRecreate();
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatistics().recreateCollection( getPersistentCollectionDescriptor().getNavigableRole().getNavigableName() );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

@Override
public void execute() throws HibernateException {
  // this method is called when a new non-null collection is persisted
  // or when an existing (non-null) collection is moved to a new owner
  final PersistentCollection collection = getCollection();
  
  preRecreate();
  getPersister().recreate( collection, getKey(), getSession() );
  
  getSession().getPersistenceContext()
      .getCollectionEntry(collection)
      .afterAction(collection);
  
  evict();
  postRecreate();
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatisticsImplementor()
        .recreateCollection( getPersister().getRole() );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

@Override
public void execute() throws HibernateException {
  // this method is called when a new non-null collection is persisted
  // or when an existing (non-null) collection is moved to a new owner
  final PersistentCollection collection = getCollection();
  
  preRecreate();
  getPersister().recreate( collection, getKey(), getSession() );
  
  getSession().getPersistenceContext()
      .getCollectionEntry(collection)
      .afterAction(collection);
  
  evict();
  postRecreate();
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatisticsImplementor()
        .recreateCollection( getPersister().getRole() );
  }
}
origin: org.hibernate.orm/hibernate-core

@Override
public void execute() throws HibernateException {
  preRemove();
  if ( !emptySnapshot ) {
    // an existing collection that was either non-empty or uninitialized
    // is replaced by null or a different collection
    // (if the collection is uninitialized, hibernate has no way of
    // knowing if the collection is actually empty without querying the db)
    getPersistentCollectionDescriptor().remove( getKey(), getSession() );
  }
  
  final PersistentCollection collection = getCollection();
  if ( collection != null ) {
    getSession().getPersistenceContext().getCollectionEntry( collection ).afterAction( collection );
  }
  evict();
  postRemove();
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatistics().removeCollection( getPersistentCollectionDescriptor().getNavigableRole().getFullPath() );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

@Override
public void execute() throws HibernateException {
  preRemove();
  if ( !emptySnapshot ) {
    // an existing collection that was either non-empty or uninitialized
    // is replaced by null or a different collection
    // (if the collection is uninitialized, hibernate has no way of
    // knowing if the collection is actually empty without querying the db)
    getPersister().remove( getKey(), getSession() );
  }
  
  final PersistentCollection collection = getCollection();
  if (collection!=null) {
    getSession().getPersistenceContext()
      .getCollectionEntry(collection)
      .afterAction(collection);
  }
  
  evict();
  postRemove();        
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatisticsImplementor()
        .removeCollection( getPersister().getRole() );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

@Override
public void execute() throws HibernateException {
  preRemove();
  if ( !emptySnapshot ) {
    // an existing collection that was either non-empty or uninitialized
    // is replaced by null or a different collection
    // (if the collection is uninitialized, hibernate has no way of
    // knowing if the collection is actually empty without querying the db)
    getPersister().remove( getKey(), getSession() );
  }
  
  final PersistentCollection collection = getCollection();
  if (collection!=null) {
    getSession().getPersistenceContext()
      .getCollectionEntry(collection)
      .afterAction(collection);
  }
  
  evict();
  postRemove();        
  if ( getSession().getFactory().getStatistics().isStatisticsEnabled() ) {
    getSession().getFactory().getStatisticsImplementor()
        .removeCollection( getPersister().getRole() );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

.afterAction(collection);
origin: org.hibernate/com.springsource.org.hibernate.core

.afterAction(collection);
origin: org.hibernate.orm/hibernate-core

getSession().getPersistenceContext().getCollectionEntry( collection ).afterAction( collection );
evict();
postUpdate();
org.hibernate.engine.spiCollectionEntryafterAction

Javadoc

Called after execution of an action

Popular methods of CollectionEntry

  • getLoadedPersister
    This is only available late during the flush cycle
  • getSnapshot
  • getLoadedKey
  • getOrphans
    Get the collection orphans (entities which were removed from the collection)
  • <init>
    For newly wrapped collections, or dereferenced collection wrappers
  • afterDeserialize
  • deserialize
    Custom deserialization routine used during deserialization of a Session/PersistenceContext for incre
  • dirty
    Determine if the collection is "really" dirty, by checking dirtiness of the collection elements, if
  • getCurrentKey
    This is only available late during the flush cycle
  • getCurrentPersister
  • getRole
  • isDorecreate
  • getRole,
  • isDorecreate,
  • isDoremove,
  • isDoupdate,
  • isIgnore,
  • isProcessed,
  • isReached,
  • isSnapshotEmpty,
  • postFlush

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Kernel (java.awt.image)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • JFrame (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now