Package org.hibernate.procedure.spi

Examples of org.hibernate.procedure.spi.ParameterRegistrationImplementor


    String sep = "";

    // skip the first registration if it was a REF_CURSOR
    final int startIndex = firstParamIsRefCursor ? 1 : 0;
    for ( int i = startIndex; i < parameterRegistrations.size(); i++ ) {
      final ParameterRegistrationImplementor parameter = parameterRegistrations.get( i );

      // any additional REF_CURSOR parameter registrations are an error
      if ( parameter.getMode() == ParameterMode.REF_CURSOR ) {
        throw new HibernateException( "PostgreSQL supports only one REF_CURSOR parameter, but multiple were registered" );
      }

      for ( int ignored : parameter.getSqlTypes() ) {
        buffer.append( sep ).append( "?" );
        sep = ",";
      }
    }
View Full Code Here


    }

    @Override
    protected Output buildExtendedReturn() {
      ProcedureOutputsImpl.this.refCursorParamIndex++;
      final ParameterRegistrationImplementor refCursorParam = ProcedureOutputsImpl.this.refCursorParameters[refCursorParamIndex];
      ResultSet resultSet;
      if ( refCursorParam.getName() != null ) {
        resultSet = ProcedureOutputsImpl.this.procedureCall.getSession().getFactory().getServiceRegistry()
            .getService( RefCursorSupport.class )
            .getResultSet( ProcedureOutputsImpl.this.callableStatement, refCursorParam.getName() );
      }
      else {
        resultSet = ProcedureOutputsImpl.this.procedureCall.getSession().getFactory().getServiceRegistry()
            .getService( RefCursorSupport.class )
            .getResultSet( ProcedureOutputsImpl.this.callableStatement, refCursorParam.getPosition() );
      }
      return buildResultSetOutput( extractResults( resultSet ) );
    }
View Full Code Here

    String sep = "";

    // skip the first registration if it was a REF_CURSOR
    final int startIndex = firstParamIsRefCursor ? 1 : 0;
    for ( int i = startIndex; i < parameterRegistrations.size(); i++ ) {
      final ParameterRegistrationImplementor parameter = parameterRegistrations.get( i );

      // any additional REF_CURSOR parameter registrations are an error
      if ( parameter.getMode() == ParameterMode.REF_CURSOR ) {
        throw new HibernateException( "PostgreSQL supports only one REF_CURSOR parameter, but multiple were registered" );
      }

      for ( int ignored : parameter.getSqlTypes() ) {
        buffer.append( sep ).append( "?" );
        sep = ",";
      }
    }
View Full Code Here

TOP

Related Classes of org.hibernate.procedure.spi.ParameterRegistrationImplementor

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.