Examples of NativeSQLQuerySpecification


Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

  public List list() throws HibernateException {
    verifyParameters();
    before();

    Map namedParams = getNamedParams();
    NativeSQLQuerySpecification spec = generateQuerySpecification( namedParams );

    try {
      return getSession().list( spec, getQueryParameters( namedParams ) );
    }
    finally {
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

      after();
    }
  }

  private NativeSQLQuerySpecification generateQuerySpecification(Map namedParams) {
    return new NativeSQLQuerySpecification(
            expandParameterLists(namedParams),
        queryReturns.toArray( new NativeSQLQueryReturn[queryReturns.size()] ),
            querySpaces
    );
  }
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

  public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException {
    verifyParameters();
    before();

    Map namedParams = getNamedParams();
    NativeSQLQuerySpecification spec = generateQuerySpecification( namedParams );

    QueryParameters qp = getQueryParameters( namedParams );
    qp.setScrollMode( scrollMode );

    try {
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

      // this will throw an error if there's something wrong.
      try {
        log.debugf( "Checking named SQL query: %s", namedSQLQueryDefinition.getName() );
        // TODO : would be really nice to cache the spec on the query-def so as to not have to re-calc the hash;
        // currently not doable though because of the resultset-ref stuff...
        NativeSQLQuerySpecification spec;
        if ( namedSQLQueryDefinition.getResultSetRef() != null ) {
          ResultSetMappingDefinition definition = getResultSetMappingDefinition( namedSQLQueryDefinition.getResultSetRef() );
          if ( definition == null ) {
            throw new MappingException( "Unable to find resultset-ref definition: " + namedSQLQueryDefinition.getResultSetRef() );
          }
          spec = new NativeSQLQuerySpecification(
              namedSQLQueryDefinition.getQueryString(),
              definition.getQueryReturns(),
              namedSQLQueryDefinition.getQuerySpaces()
          );
        }
        else {
          spec =  new NativeSQLQuerySpecification(
              namedSQLQueryDefinition.getQueryString(),
              namedSQLQueryDefinition.getQueryReturns(),
              namedSQLQueryDefinition.getQuerySpaces()
          );
        }
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

      // this will throw an error if there's something wrong.
      try {
        LOG.debugf( "Checking named SQL query: %s", queryName );
        // TODO : would be really nice to cache the spec on the query-def so as to not have to re-calc the hash;
        // currently not doable though because of the resultset-ref stuff...
        NativeSQLQuerySpecification spec;
        if ( qd.getResultSetRef() != null ) {
          ResultSetMappingDefinition definition = sqlResultSetMappings.get( qd.getResultSetRef() );
          if ( definition == null ) {
            throw new MappingException( "Unable to find resultset-ref definition: " + qd.getResultSetRef() );
          }
          spec = new NativeSQLQuerySpecification(
              qd.getQueryString(),
                  definition.getQueryReturns(),
                  qd.getQuerySpaces()
          );
        }
        else {
          spec =  new NativeSQLQuerySpecification(
              qd.getQueryString(),
                  qd.getQueryReturns(),
                  qd.getQuerySpaces()
          );
        }
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

      // this will throw an error if there's something wrong.
      try {
        LOG.debugf( "Checking named SQL query: %s", queryName );
        // TODO : would be really nice to cache the spec on the query-def so as to not have to re-calc the hash;
        // currently not doable though because of the resultset-ref stuff...
        NativeSQLQuerySpecification spec;
        if ( qd.getResultSetRef() != null ) {
          ResultSetMappingDefinition definition = sqlResultSetMappings.get( qd.getResultSetRef() );
          if ( definition == null ) {
            throw new MappingException( "Unable to find resultset-ref definition: " + qd.getResultSetRef() );
          }
          spec = new NativeSQLQuerySpecification(
              qd.getQueryString(),
                  definition.getQueryReturns(),
                  qd.getQuerySpaces()
          );
        }
        else {
          spec =  new NativeSQLQuerySpecification(
              qd.getQueryString(),
                  qd.getQueryReturns(),
                  qd.getQuerySpaces()
          );
        }
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

  public List list() throws HibernateException {
    verifyParameters();
    before();

    Map namedParams = getNamedParams();
    NativeSQLQuerySpecification spec = generateQuerySpecification( namedParams );

    try {
      return getSession().list( spec, getQueryParameters( namedParams ) );
    }
    finally {
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

      after();
    }
  }

  private NativeSQLQuerySpecification generateQuerySpecification(Map namedParams) {
    return new NativeSQLQuerySpecification(
            expandParameterLists(namedParams),
            getQueryReturns(),
            querySpaces
    );
  }
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

  public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException {
    verifyParameters();
    before();

    Map namedParams = getNamedParams();
    NativeSQLQuerySpecification spec = generateQuerySpecification( namedParams );

    QueryParameters qp = getQueryParameters( namedParams );
    qp.setScrollMode( scrollMode );

    try {
View Full Code Here

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification

        if ( debugEnabled ) {
          LOG.debugf( "Checking named SQL query: %s", queryName );
        }
        // TODO : would be really nice to cache the spec on the query-def so as to not have to re-calc the hash;
        // currently not doable though because of the resultset-ref stuff...
        NativeSQLQuerySpecification spec;
        if ( qd.getResultSetRef() != null ) {
          ResultSetMappingDefinition definition = sqlResultSetMappings.get( qd.getResultSetRef() );
          if ( definition == null ) {
            throw new MappingException( "Unable to find resultset-ref definition: " + qd.getResultSetRef() );
          }
          spec = new NativeSQLQuerySpecification(
              qd.getQueryString(),
                  definition.getQueryReturns(),
                  qd.getQuerySpaces()
          );
        }
        else {
          spec =  new NativeSQLQuerySpecification(
              qd.getQueryString(),
                  qd.getQueryReturns(),
                  qd.getQuerySpaces()
          );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.