Package org.hibernate

Examples of org.hibernate.SQLQuery$ReturnProperty


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


  }

  @Override
  public SQLQuery createSQLQuery(NamedSQLQueryDefinition namedQueryDefinition) {
    final ParameterMetadata parameterMetadata = factory.getQueryPlanCache().getSQLParameterMetadata( namedQueryDefinition.getQueryString() );
    final SQLQuery query = new SQLQueryImpl(
        namedQueryDefinition,
        this,
        parameterMetadata
    );
    query.setComment( "named native SQL query " + namedQueryDefinition.getName() );
    return query;
  }
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

          );
  }

  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

          );
  }

  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 int batchUpdateByNativeQuery(String queryString, Object[] params, Type[] types) {
    logger.debug("Batch Native Update[{}]",queryString);
    Session session = getSession();
    SQLQuery query = session.createSQLQuery(queryString);
    if(params != null && params.length > 0){
      for(int i=0; i< params.length; i++){
        logger.debug("{}) : {} [{}]", new Object[]{i+1, params[i], types[i]});
        query.setParameter(i, params[i], types[i]);
      }
    }   
    return query.executeUpdate();
  }
View Full Code Here

    return query.executeUpdate();
  }

  public void executeDDL(String queryString) {
    Session session = getSession();
    SQLQuery query = session.createSQLQuery(queryString);
    query.executeUpdate();
 
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.