Tabnine Logo
SessionImplementor.getNamedQuery
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: hibernate/hibernate-orm

@Override
public QueryImplementor getNamedQuery(String name) {
  return delegate.getNamedQuery( name );
}
origin: org.jboss.seam/jboss-seam

public Query getNamedQuery(String paramString)
{
 return ((SessionImplementor) delegate).getNamedQuery(paramString);
}
origin: riotfamily/riot

public Query getNamedQuery(String name) {
  return session.getNamedQuery(name);
}
origin: org.hibernate.orm/hibernate-core

@Override
public QueryImplementor getNamedQuery(String name) {
  return delegate.getNamedQuery( name );
}
origin: com.atlassian.hibernate/hibernate.adapter

@Override
public QueryImplementor getNamedQuery(final String name) {
  return getSessionImplementor().getNamedQuery(name);
}
origin: org.hibernate/com.springsource.org.hibernate

  public Object load(Serializable id, Object optionalObject, SessionImplementor session) {
    LOG.debugf("Loading entity: %s using named query: %s", persister.getEntityName(), queryName);

    AbstractQueryImpl query = (AbstractQueryImpl) session.getNamedQuery(queryName);
    if ( query.hasNamedParameters() ) {
      query.setParameter(
          query.getNamedParameters()[0],
          id,
          persister.getIdentifierType()
        );
    }
    else {
      query.setParameter( 0, id, persister.getIdentifierType() );
    }
    query.setOptionalId(id);
    query.setOptionalEntityName( persister.getEntityName() );
    query.setOptionalObject(optionalObject);
    query.setFlushMode( FlushMode.MANUAL );
    query.list();

    // now look up the object we are really interested in!
    // (this lets us correctly handle proxies and multi-row or multi-column queries)
    return session.getPersistenceContext().getEntity( session.generateEntityKey( id, persister ) );

  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

  public Object load(Serializable id, Object optionalObject, SessionImplementor session) {
    LOG.debugf("Loading entity: %s using named query: %s", persister.getEntityName(), queryName);

    AbstractQueryImpl query = (AbstractQueryImpl) session.getNamedQuery(queryName);
    if ( query.hasNamedParameters() ) {
      query.setParameter(
          query.getNamedParameters()[0],
          id,
          persister.getIdentifierType()
        );
    }
    else {
      query.setParameter( 0, id, persister.getIdentifierType() );
    }
    query.setOptionalId(id);
    query.setOptionalEntityName( persister.getEntityName() );
    query.setOptionalObject(optionalObject);
    query.setFlushMode( FlushMode.MANUAL );
    query.list();

    // now look up the object we are really interested in!
    // (this lets us correctly handle proxies and multi-row or multi-column queries)
    return session.getPersistenceContext().getEntity( session.generateEntityKey( id, persister ) );

  }
}
org.hibernate.engine.spiSessionImplementorgetNamedQuery

Javadoc

Get a Query instance for a named query or named native SQL query

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

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • String (java.lang)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Top plugins for WebStorm
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