Codota Logo
DefaultPersistEventListener.saveWithGeneratedId
Code IndexAdd Codota to your IDE (free)

How to use
saveWithGeneratedId
method
in
org.hibernate.event.internal.DefaultPersistEventListener

Best Java code snippets using org.hibernate.event.internal.DefaultPersistEventListener.saveWithGeneratedId (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: hibernate/hibernate-orm

/**
 * Handle the given create event.
 *
 * @param event The save event to be handled.
 * @param createCache The copy cache of entity instance to merge/copy instance.
 */
@SuppressWarnings({"unchecked"})
protected void entityIsTransient(PersistEvent event, Map createCache) {
  LOG.trace( "Saving transient instance" );
  final EventSource source = event.getSession();
  final Object entity = source.getPersistenceContext().unproxy( event.getObject() );
  if ( createCache.put( entity, entity ) == null ) {
    saveWithGeneratedId( entity, event.getEntityName(), createCache, source, false );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.ejb

@Override
protected Serializable saveWithGeneratedId(
    Object entity,
    String entityName,
    Object anything,
    EventSource source,
    boolean requiresImmediateIdAccess) {
  callbackHandler.preCreate( entity );
  return super.saveWithGeneratedId( entity, entityName, anything, source, requiresImmediateIdAccess );
}
origin: org.hibernate/com.springsource.org.hibernate

/**
 * Handle the given create event.
 *
 * @param event The save event to be handled.
 * @param createCache The copy cache of entity instance to merge/copy instance.
 */
@SuppressWarnings( {"unchecked"})
protected void entityIsTransient(PersistEvent event, Map createCache) {
  LOG.trace( "Saving transient instance" );
  final EventSource source = event.getSession();
  final Object entity = source.getPersistenceContext().unproxy( event.getObject() );
  if ( createCache.put( entity, entity ) == null ) {
    saveWithGeneratedId( entity, event.getEntityName(), createCache, source, false );
  }
}
origin: org.hibernate.orm/hibernate-core

/**
 * Handle the given create event.
 *
 * @param event The save event to be handled.
 * @param createCache The copy cache of entity instance to merge/copy instance.
 */
@SuppressWarnings({"unchecked"})
protected void entityIsTransient(PersistEvent event, Map createCache) {
  LOG.trace( "Saving transient instance" );
  final EventSource source = event.getSession();
  final Object entity = source.getPersistenceContext().unproxy( event.getObject() );
  if ( createCache.put( entity, entity ) == null ) {
    saveWithGeneratedId( entity, event.getEntityName(), createCache, source, false );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Handle the given create event.
 *
 * @param event The save event to be handled.
 * @param createCache The copy cache of entity instance to merge/copy instance.
 */
@SuppressWarnings( {"unchecked"})
protected void entityIsTransient(PersistEvent event, Map createCache) {
  LOG.trace( "Saving transient instance" );
  final EventSource source = event.getSession();
  final Object entity = source.getPersistenceContext().unproxy( event.getObject() );
  if ( createCache.put( entity, entity ) == null ) {
    saveWithGeneratedId( entity, event.getEntityName(), createCache, source, false );
  }
}
org.hibernate.event.internalDefaultPersistEventListenersaveWithGeneratedId

Popular methods of DefaultPersistEventListener

  • <init>
  • cascadeAfterSave
  • cascadeBeforeSave
  • entityIsDeleted
  • entityIsPersistent
  • entityIsTransient
    Handle the given create event.
  • getEntityState
  • getLoggableName
  • justCascade
  • onPersist
    Handle the given create event.
  • saveWithRequestedId
  • saveWithRequestedId

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now