Package org.hibernate

Examples of org.hibernate.SQLQuery$ReturnProperty


  }

  public Query createNativeQuery(String sqlString) {
    //adjustFlushMode();
    try {
      SQLQuery q = getSession().createSQLQuery( sqlString );
      return new QueryImpl( q, this );
    }
    catch (HibernateException he) {
      throwPersistenceException( he );
      return null;
View Full Code Here


  }

  public Query createNativeQuery(String sqlString, Class resultClass) {
    //adjustFlushMode();
    try {
      SQLQuery q = getSession().createSQLQuery( sqlString );
      q.addEntity( "alias1", resultClass.getName(), LockMode.READ );
      return new QueryImpl( q, this );
    }
    catch (HibernateException he) {
      throwPersistenceException( he );
      return null;
View Full Code Here

  }

  public Query createNativeQuery(String sqlString, String resultSetMapping) {
    //adjustFlushMode();
    try {
      SQLQuery q = getSession().createSQLQuery( sqlString );
      q.setResultSetMapping( resultSetMapping );
      return new QueryImpl( q, this );
    }
    catch (HibernateException he) {
      throwPersistenceException( he );
      return null;
View Full Code Here

          );
  }

  public Query createNativeQuery(String sqlString) {
    try {
      SQLQuery q = getSession().createSQLQuery( sqlString );
      return new QueryImpl( q, this );
    }
    catch ( HibernateException he ) {
      throw convert( he );
    }
View Full Code Here

    }
  }

  public Query createNativeQuery(String sqlString, Class resultClass) {
    try {
      SQLQuery q = getSession().createSQLQuery( sqlString );
      q.addEntity( "alias1", resultClass.getName(), LockMode.READ );
      return new QueryImpl( q, this );
    }
    catch ( HibernateException he ) {
      throw convert( he );
    }
View Full Code Here

    }
  }

  public Query createNativeQuery(String sqlString, String resultSetMapping) {
    try {
      SQLQuery q = getSession().createSQLQuery( sqlString );
      q.setResultSetMapping( resultSetMapping );
      return new QueryImpl( q, this );
    }
    catch ( HibernateException he ) {
      throw convert( he );
    }
View Full Code Here

      // this need only exists for native SQL queries, not JPQL or Criteria queries (both of which do
      // partial auto flushing already).
      return;
    }

    final SQLQuery sqlQuery = (SQLQuery) query;
    if ( sqlQuery.getSynchronizedQuerySpaces() != null && ! sqlQuery.getSynchronizedQuerySpaces().isEmpty() ) {
      // The application defined query spaces on the Hibernate native SQLQuery which means the query will already
      // perform a partial flush according to the defined query spaces, no need to do a full flush.
      return;
    }
View Full Code Here

    String natSQL = new SQLStorage(this.timeFilterFrom, this.timeFilterTo,
        this.timeGrouping, IDlist).getSQL();

    Session session = Helper.getHibernateSession();

    SQLQuery query = session.createSQLQuery(natSQL);

    //needs to be there otherwise an exception is thrown
    query.addScalar("storage", StandardBasicTypes.DOUBLE);
    query.addScalar("intervall", StandardBasicTypes.STRING);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    DataTable dtbl = new DataTable(StatisticsMode.getByClassName(
        this.getClass()).getTitle() + " "
        + Helper.getTranslation("_inGB"));
View Full Code Here

      String stepName = step.getTitle();
      headerRow.setName("header - delete again");
      headerRow.addValue(stepName, Double.parseDouble("0"));
    }

    SQLQuery query = session.createSQLQuery(natSQL);

    // needs to be there otherwise an exception is thrown
    query.addScalar("stepCount", StandardBasicTypes.DOUBLE);
    query.addScalar("stepName", StandardBasicTypes.STRING);
    query.addScalar("intervall", StandardBasicTypes.STRING);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    DataTable dtbl = new DataTable("");

    // if headerRow is set then add it to the DataTable to set columns
    // needs to be removed later
View Full Code Here

        getTimeUnit(), IDlist).getSQL(HistoryEventType.stepError, null,
        false, false);

    Session session = Helper.getHibernateSession();

    SQLQuery query = session.createSQLQuery(natSQL);

    //needs to be there otherwise an exception is thrown
    query.addScalar("stepCount", StandardBasicTypes.DOUBLE);
    query.addScalar("intervall", StandardBasicTypes.STRING);

    @SuppressWarnings("rawtypes")
    List list = query.list();

    DataTable dtbl = new DataTable(StatisticsMode.getByClassName(
        this.getClass()).getTitle()
        + Helper.getTranslation("_(number)"));
View Full Code Here

TOP

Related Classes of org.hibernate.SQLQuery$ReturnProperty

Copyright © 2018 www.massapicom. 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.