Package org.hibernate.procedure

Examples of org.hibernate.procedure.ProcedureCall


    if ( ! isOpen() ) {
      throw new IllegalStateException( "EntityManagerFactory is closed" );
    }

    if ( StoredProcedureQueryImpl.class.isInstance( query ) ) {
      final ProcedureCall procedureCall = ( (StoredProcedureQueryImpl) query ).getHibernateProcedureCall();
      sessionFactory.getNamedQueryRepository().registerNamedProcedureCallMemento( name, procedureCall.extractMemento( query.getHints() ) );
    }
    else if ( ! HibernateQuery.class.isInstance( query ) ) {
      throw new PersistenceException( "Cannot use query non-Hibernate EntityManager query as basis for named query" );
    }
    else {
View Full Code Here


    final ProcedureCallMemento memento = ( (SessionImplementor) internalGetSession() ).getFactory()
        .getNamedQueryRepository().getNamedProcedureCallMemento( name );
    if ( memento == null ) {
      throw new IllegalArgumentException( "No @NamedStoredProcedureQuery was found with that name : " + name );
    }
    final ProcedureCall procedureCall = memento.makeProcedureCall( internalGetSession() );
    final StoredProcedureQueryImpl jpaImpl = new StoredProcedureQueryImpl( procedureCall, this );
    // apply hints
    if ( memento.getHintsMap() != null ) {
      for ( Map.Entry<String,Object> hintEntry : memento.getHintsMap().entrySet() ) {
        jpaImpl.setHint( hintEntry.getKey(), hintEntry.getValue() );
View Full Code Here

    if ( memento == null ) {
      throw new IllegalArgumentException(
          "Could not find named stored procedure call with that registration name : " + name
      );
    }
    final ProcedureCall procedureCall = memento.makeProcedureCall( this );
//    procedureCall.setComment( "Named stored procedure call [" + name + "]" );
    return procedureCall;
  }
View Full Code Here

  @Override
  @SuppressWarnings("UnnecessaryLocalVariable")
  public ProcedureCall createStoredProcedureCall(String procedureName) {
    errorIfClosed();
    final ProcedureCall procedureCall = new ProcedureCallImpl( this, procedureName );
//    call.setComment( "Dynamic stored procedure call" );
    return procedureCall;
  }
View Full Code Here

  @Override
  @SuppressWarnings("UnnecessaryLocalVariable")
  public ProcedureCall createStoredProcedureCall(String procedureName, Class... resultClasses) {
    errorIfClosed();
    final ProcedureCall procedureCall = new ProcedureCallImpl( this, procedureName, resultClasses );
//    call.setComment( "Dynamic stored procedure call" );
    return procedureCall;
  }
View Full Code Here

  @Override
  @SuppressWarnings("UnnecessaryLocalVariable")
  public ProcedureCall createStoredProcedureCall(String procedureName, String... resultSetMappings) {
    errorIfClosed();
    final ProcedureCall procedureCall = new ProcedureCallImpl( this, procedureName, resultSetMappings );
//    call.setComment( "Dynamic stored procedure call" );
    return procedureCall;
  }
View Full Code Here

        )
    );
  }

  private void addNamedStoredProcedureQuery(String name, StoredProcedureQueryImpl query) {
    final ProcedureCall procedureCall = query.getHibernateProcedureCall();
    sessionFactory.getNamedQueryRepository().registerNamedProcedureCallMemento(
        name,
        procedureCall.extractMemento( query.getHints() )
    );
  }
View Full Code Here

  @Override
  public StoredProcedureQuery createStoredProcedureQuery(String procedureName) {
    checkOpen();
    try {
      ProcedureCall procedureCall = internalGetSession().createStoredProcedureCall( procedureName );
      return new StoredProcedureQueryImpl( procedureCall, this );
    }
    catch ( HibernateException he ) {
      throw convert( he );
    }
View Full Code Here

  @Override
  public StoredProcedureQuery createStoredProcedureQuery(String procedureName, Class... resultClasses) {
    checkOpen();
    try {
      ProcedureCall procedureCall = internalGetSession().createStoredProcedureCall( procedureName, resultClasses );
      return new StoredProcedureQueryImpl( procedureCall, this );
    }
    catch ( HibernateException he ) {
      throw convert( he );
    }
View Full Code Here

    if ( memento == null ) {
      throw new IllegalArgumentException(
          "Could not find named stored procedure call with that registration name : " + name
      );
    }
    final ProcedureCall procedureCall = memento.makeProcedureCall( this );
//    procedureCall.setComment( "Named stored procedure call [" + name + "]" );
    return procedureCall;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.procedure.ProcedureCall

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.