Codota Logo
SessionImplementor.internalLoad
Code IndexAdd Codota to your IDE (free)

How to use
internalLoad
method
in
org.hibernate.engine.spi.SessionImplementor

Best Java code snippets using org.hibernate.engine.spi.SessionImplementor.internalLoad (Showing top 16 results out of 315)

  • Common ways to obtain SessionImplementor
private void myMethod () {
SessionImplementor s =
  • Codota IconEntityManager entityManager;entityManager.unwrap(SessionImplementor.class)
  • Codota IconFlushEntityEvent flushEntityEvent;flushEntityEvent.getSession()
  • Codota IconLazyInitializer lazyInitializer;lazyInitializer.getSession()
  • Smart code suggestions by Codota
}
origin: hibernate/hibernate-orm

@Override
public Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException {
  return delegate.internalLoad( entityName, id, eager, nullable );
}
origin: riotfamily/riot

public Object assemble(
  Serializable cached,
  SessionImplementor session,
  Object owner)
throws HibernateException {
  ObjectTypeCacheEntry e = (ObjectTypeCacheEntry) cached;
  return e==null ? null : session.internalLoad(e.entityName, e.id, false, false);
}
origin: org.hibernate/com.springsource.org.hibernate

public Object assemble(
  Serializable cached,
  SessionImplementor session,
  Object owner)
throws HibernateException {
  ObjectTypeCacheEntry e = (ObjectTypeCacheEntry) cached;
  return e==null ? null : session.internalLoad(e.entityName, e.id, false, false);
}
origin: org.hibernate/com.springsource.org.hibernate.core

public Object assemble(
  Serializable cached,
  SessionImplementor session,
  Object owner)
throws HibernateException {
  ObjectTypeCacheEntry e = (ObjectTypeCacheEntry) cached;
  return e==null ? null : session.internalLoad(e.entityName, e.id, false, false);
}
origin: riotfamily/riot

/**
 * Quote from the Hibernate docs:
 * <cite>
 * When <tt>nullable</tt> is enabled, the method does not create 
 * new proxies (but might return an existing proxy); if it does not 
 * exist, return <tt>null</tt>.
 * </cite>
 */
public Object internalLoad(String entityName, Serializable id,
    boolean eager, boolean nullable) throws HibernateException {
  
  return session.internalLoad(entityName, id, eager, true);
}
origin: org.hibernate/com.springsource.org.hibernate

private Object resolveAny(String entityName, Serializable id, SessionImplementor session)
throws HibernateException {
  return entityName==null || id==null ?
      null : session.internalLoad( entityName, id, false, false );
}
origin: org.hibernate/com.springsource.org.hibernate.core

private Object resolveAny(String entityName, Serializable id, SessionImplementor session)
throws HibernateException {
  return entityName==null || id==null ?
      null : session.internalLoad( entityName, id, false, false );
}
origin: org.jboss.seam/jboss-seam

public Object internalLoad(String paramString, Serializable paramSerializable, boolean paramBoolean1, boolean paramBoolean2) throws HibernateException
{
 return ((SessionImplementor) delegate).internalLoad(paramString, paramSerializable, paramBoolean1, paramBoolean2);
}
origin: org.hibernate.orm/hibernate-core

@Override
public Object internalLoad(String entityName, Object id, boolean eager, boolean nullable) throws HibernateException {
  return delegate.internalLoad( entityName, id, eager, nullable );
}
origin: riotfamily/riot

private Object resolveAny(String entityName, Serializable id, SessionImplementor session)
throws HibernateException {
  return entityName==null || id==null ?
      null : session.internalLoad( entityName, id, false, false );
}
origin: com.atlassian.hibernate/hibernate.adapter

@Override
public Object internalLoad(final String entityName, final Serializable id, final boolean eager, final boolean nullable) throws HibernateException {
  return getSessionImplementor().internalLoad(entityName, id, eager, nullable);
}
origin: org.hibernate/com.springsource.org.hibernate

public Object replace(
    Object original, 
    Object target,
    SessionImplementor session, 
    Object owner, 
    Map copyCache)
throws HibernateException {
  if (original==null) {
    return null;
  }
  else {
    String entityName = session.bestGuessEntityName(original);
    Serializable id = ForeignKeys.getEntityIdentifierIfNotUnsaved(
        entityName,
        original,
        session
    );
    return session.internalLoad( 
        entityName, 
        id, 
        false, 
        false
      );
  }
}
public CascadeStyle getCascadeStyle(int i) {
origin: org.hibernate/com.springsource.org.hibernate.core

public Object replace(
    Object original, 
    Object target,
    SessionImplementor session, 
    Object owner, 
    Map copyCache)
throws HibernateException {
  if (original==null) {
    return null;
  }
  else {
    String entityName = session.bestGuessEntityName(original);
    Serializable id = ForeignKeys.getEntityIdentifierIfNotUnsaved(
        entityName,
        original,
        session
    );
    return session.internalLoad( 
        entityName, 
        id, 
        false, 
        false
      );
  }
}
public CascadeStyle getCascadeStyle(int i) {
origin: riotfamily/riot

public Object replace(
    Object original, 
    Object target,
    SessionImplementor session, 
    Object owner, 
    Map copyCache)
throws HibernateException {
  if (original==null) {
    return null;
  }
  else {
    String entityName = session.bestGuessEntityName(original);
    Serializable id = ForeignKeys.getEntityIdentifierIfNotUnsaved( 
        entityName, 
        original, 
        session 
      );
    return session.internalLoad( 
        entityName, 
        id, 
        false, 
        false
      );
  }
}
public CascadeStyle getCascadeStyle(int i) {
origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Resolve an identifier via a load.
 *
 * @param id The entity id to resolve
 * @param session The orginating session.
 * @return The resolved identifier (i.e., loaded entity).
 * @throws org.hibernate.HibernateException Indicates problems performing the load.
 */
protected final Object resolveIdentifier(Serializable id, SessionImplementor session) throws HibernateException {
  boolean isProxyUnwrapEnabled = unwrapProxy &&
      session.getFactory()
          .getEntityPersister( getAssociatedEntityName() )
          .isInstrumented();
  Object proxyOrEntity = session.internalLoad(
      getAssociatedEntityName(),
      id,
      eager,
      isNullable() && !isProxyUnwrapEnabled
  );
  if ( proxyOrEntity instanceof HibernateProxy ) {
    ( ( HibernateProxy ) proxyOrEntity ).getHibernateLazyInitializer()
        .setUnwrap( isProxyUnwrapEnabled );
  }
  return proxyOrEntity;
}
origin: org.hibernate/com.springsource.org.hibernate

/**
 * Resolve an identifier via a load.
 *
 * @param id The entity id to resolve
 * @param session The orginating session.
 * @return The resolved identifier (i.e., loaded entity).
 * @throws org.hibernate.HibernateException Indicates problems performing the load.
 */
protected final Object resolveIdentifier(Serializable id, SessionImplementor session) throws HibernateException {
  boolean isProxyUnwrapEnabled = unwrapProxy &&
      session.getFactory()
          .getEntityPersister( getAssociatedEntityName() )
          .isInstrumented();
  Object proxyOrEntity = session.internalLoad(
      getAssociatedEntityName(),
      id,
      eager,
      isNullable() && !isProxyUnwrapEnabled
  );
  if ( proxyOrEntity instanceof HibernateProxy ) {
    ( ( HibernateProxy ) proxyOrEntity ).getHibernateLazyInitializer()
        .setUnwrap( isProxyUnwrapEnabled );
  }
  return proxyOrEntity;
}
org.hibernate.engine.spiSessionImplementorinternalLoad

Javadoc

Load an instance without checking if it was deleted. When nullable is disabled this method may create a new proxy or return an existing proxy; if it does not exist, throw an exception. When nullable is enabled, the method does not create new proxies (but might return an existing proxy); if it does not exist, return null. When eager is enabled, the object is eagerly fetched

Popular methods of SessionImplementor

  • getFactory
    Get the creating SessionFactoryImplementor
  • getTransactionCoordinator
  • connection
  • getPersistenceContext
    Get the persistence context for this session
  • getLoadQueryInfluencers
    Get the load query influencers associated with this session.
  • isTransactionInProgress
    Does this Session have an active Hibernate transaction or is there a JTA transaction in progress?
  • getEntityPersister
    Get the EntityPersister for any instance
  • getJdbcCoordinator
  • isClosed
    Determine whether the session is closed. Provided separately from #isOpen() as this method does not
  • flush
  • getTenantIdentifier
    Match te method on org.hibernate.Session and org.hibernate.StatelessSession
  • generateEntityKey
  • getTenantIdentifier,
  • generateEntityKey,
  • getContextEntityIdentifier,
  • isOpen,
  • bestGuessEntityName,
  • getFlushMode,
  • getSessionFactory,
  • guessEntityName,
  • immediateLoad,
  • initializeCollection

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 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