Package org.hibernate.procedure

Examples of org.hibernate.procedure.ProcedureCallMemento


  }

  @Override
  public StoredProcedureQuery createNamedStoredProcedureQuery(String name) {
    checkOpen();
    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() );
      }
    }
    return jpaImpl;
  }
View Full Code Here


    this.namedSqlQueryDefinitionMap = Collections.unmodifiableMap( copy );
  }

  public synchronized void registerNamedProcedureCallMemento(String name, ProcedureCallMemento memento) {
    final Map<String, ProcedureCallMemento> copy = CollectionHelper.makeCopy( procedureCallMementoMap );
    final ProcedureCallMemento previous = copy.put( name, memento );
    if ( previous != null ) {
      log.debugf(
          "registering named procedure call definition [%s] overriding previously registered definition [%s]",
          name,
          previous
View Full Code Here

  @Override
  @SuppressWarnings("UnnecessaryLocalVariable")
  public ProcedureCall getNamedProcedureCall(String name) {
    errorIfClosed();

    final ProcedureCallMemento memento = factory.getNamedQueryRepository().getNamedProcedureCallMemento( name );
    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 getNamedProcedureCall(String name) {
    errorIfClosed();

    final ProcedureCallMemento memento = factory.getNamedQueryRepository().getNamedProcedureCallMemento( name );
    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
  public StoredProcedureQuery createNamedStoredProcedureQuery(String name) {
    checkOpen();
    try {
      final ProcedureCallMemento memento = ( (SessionImplementor) internalGetSession() ).getFactory()
          .getNamedQueryRepository().getNamedProcedureCallMemento( name );
      if ( memento == null ) {
        throw new IllegalArgumentException( "No @NamedStoredProcedureQuery was found with that name : " + name );
      }
      final StoredProcedureQueryImpl jpaImpl = new StoredProcedureQueryImpl( memento, this );
      // apply hints
      if ( memento.getHintsMap() != null ) {
        for ( Map.Entry<String,Object> hintEntry : memento.getHintsMap().entrySet() ) {
          jpaImpl.setHint( hintEntry.getKey(), hintEntry.getValue() );
        }
      }
      return jpaImpl;
    }
View Full Code Here

  @Override
  @SuppressWarnings("UnnecessaryLocalVariable")
  public ProcedureCall getNamedProcedureCall(String name) {
    errorIfClosed();

    final ProcedureCallMemento memento = factory.getNamedQueryRepository().getNamedProcedureCallMemento( name );
    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

    this.namedSqlQueryDefinitionMap = Collections.unmodifiableMap( copy );
  }

  public synchronized void registerNamedProcedureCallMemento(String name, ProcedureCallMemento memento) {
    final Map<String, ProcedureCallMemento> copy = CollectionHelper.makeCopy( procedureCallMementoMap );
    final ProcedureCallMemento previous = copy.put( name, memento );
    if ( previous != null ) {
      log.debugf(
          "registering named procedure call definition [%s] overriding previously registered definition [%s]",
          name,
          previous
View Full Code Here

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

  @Override
  @SuppressWarnings("UnnecessaryLocalVariable")
  public ProcedureCall getNamedProcedureCall(String name) {
    errorIfClosed();

    final ProcedureCallMemento memento = factory.getNamedQueryRepository().getNamedProcedureCallMemento( name );
    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
  public StoredProcedureQuery createNamedStoredProcedureQuery(String name) {
    checkOpen();
    try {
      final ProcedureCallMemento memento = ( (SessionImplementor) internalGetSession() ).getFactory()
          .getNamedQueryRepository().getNamedProcedureCallMemento( name );
      if ( memento == null ) {
        throw new IllegalArgumentException( "No @NamedStoredProcedureQuery was found with that name : " + name );
      }
      final StoredProcedureQueryImpl jpaImpl = new StoredProcedureQueryImpl( memento, this );
      // apply hints
      if ( memento.getHintsMap() != null ) {
        for ( Map.Entry<String,Object> hintEntry : memento.getHintsMap().entrySet() ) {
          jpaImpl.setHint( hintEntry.getKey(), hintEntry.getValue() );
        }
      }
      return jpaImpl;
    }
View Full Code Here

TOP

Related Classes of org.hibernate.procedure.ProcedureCallMemento

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.