Package org.hibernate.engine.query.spi.sql

Examples of org.hibernate.engine.query.spi.sql.NativeSQLQueryConstructorReturn


      if ( !resultType.isAssignableFrom( actualReturnedClass ) ) {
        throw buildIncompatibleException( resultType, actualReturnedClass );
      }
    }
    else if ( nativeSQLQueryReturn instanceof NativeSQLQueryConstructorReturn ) {
      final NativeSQLQueryConstructorReturn ctorRtn = (NativeSQLQueryConstructorReturn) nativeSQLQueryReturn;
      if ( !resultType.isAssignableFrom( ctorRtn.getTargetClass() ) ) {
        throw buildIncompatibleException( resultType, ctorRtn.getTargetClass() );
      }
    }
    else {
      //TODO support other NativeSQLQueryReturn type. For now let it go.
    }
View Full Code Here


        }
        customReturns.add( customReturn );
        customReturnsByAlias.put( alias, customReturn );
      }
      else if ( NativeSQLQueryConstructorReturn.class.isInstance( queryReturn ) ) {
        final NativeSQLQueryConstructorReturn constructorReturn = (NativeSQLQueryConstructorReturn) queryReturn;
        final ScalarReturn[] scalars = new ScalarReturn[ constructorReturn.getColumnReturns().length ];
        int i = 0;
        for ( NativeSQLQueryScalarReturn scalarReturn : constructorReturn.getColumnReturns() ) {
          scalars[i++] = new ScalarReturn( scalarReturn.getType(), scalarReturn.getColumnAlias() );
        }
        customReturns.add( new ConstructorReturn( constructorReturn.getTargetClass(), scalars ) );
      }
      else {
        throw new IllegalStateException(
            "Unrecognized NativeSQLQueryReturn concrete type : " + queryReturn
        );
View Full Code Here

                null
            )
        );
      }
      definition.addQueryReturn(
          new NativeSQLQueryConstructorReturn( constructorResult.targetClass(), columnReturns )
      );
    }

    if ( isDefault ) {
      mappings.addDefaultResultSetMapping( definition );
View Full Code Here

      if ( !resultType.isAssignableFrom( actualReturnedClass ) ) {
        throw buildIncompatibleException( resultType, actualReturnedClass );
      }
    }
    else if ( nativeSQLQueryReturn instanceof NativeSQLQueryConstructorReturn ) {
      final NativeSQLQueryConstructorReturn ctorRtn = (NativeSQLQueryConstructorReturn) nativeSQLQueryReturn;
      if ( !resultType.isAssignableFrom( ctorRtn.getTargetClass() ) ) {
        throw buildIncompatibleException( resultType, ctorRtn.getTargetClass() );
      }
    }
    else {
      //TODO support other NativeSQLQueryReturn type. For now let it go.
    }
View Full Code Here

      if ( !resultType.isAssignableFrom( actualReturnedClass ) ) {
        throw buildIncompatibleException( resultType, actualReturnedClass );
      }
    }
    else if ( nativeSQLQueryReturn instanceof NativeSQLQueryConstructorReturn ) {
      final NativeSQLQueryConstructorReturn ctorRtn = (NativeSQLQueryConstructorReturn) nativeSQLQueryReturn;
      if ( !resultType.isAssignableFrom( ctorRtn.getTargetClass() ) ) {
        throw buildIncompatibleException( resultType, ctorRtn.getTargetClass() );
      }
    }
    else {
      //TODO support other NativeSQLQueryReturn type. For now let it go.
    }
View Full Code Here

        }
        customReturns.add( customReturn );
        customReturnsByAlias.put( alias, customReturn );
      }
      else if ( NativeSQLQueryConstructorReturn.class.isInstance( queryReturn ) ) {
        final NativeSQLQueryConstructorReturn constructorReturn = (NativeSQLQueryConstructorReturn) queryReturn;
        final ScalarReturn[] scalars = new ScalarReturn[ constructorReturn.getColumnReturns().length ];
        int i = 0;
        for ( NativeSQLQueryScalarReturn scalarReturn : constructorReturn.getColumnReturns() ) {
          scalars[i++] = new ScalarReturn( scalarReturn.getType(), scalarReturn.getColumnAlias() );
        }
        customReturns.add( new ConstructorReturn( constructorReturn.getTargetClass(), scalars ) );
      }
      else {
        throw new IllegalStateException(
            "Unrecognized NativeSQLQueryReturn concrete type : " + queryReturn
        );
View Full Code Here

                null
            )
        );
      }
      definition.addQueryReturn(
          new NativeSQLQueryConstructorReturn( constructorResult.targetClass(), columnReturns )
      );
    }

    if ( isDefault ) {
      mappings.addDefaultResultSetMapping( definition );
View Full Code Here

      if ( !resultType.isAssignableFrom( actualReturnedClass ) ) {
        throw buildIncompatibleException( resultType, actualReturnedClass );
      }
    }
    else if ( nativeSQLQueryReturn instanceof NativeSQLQueryConstructorReturn ) {
      final NativeSQLQueryConstructorReturn ctorRtn = (NativeSQLQueryConstructorReturn) nativeSQLQueryReturn;
      if ( !resultType.isAssignableFrom( ctorRtn.getTargetClass() ) ) {
        throw buildIncompatibleException( resultType, ctorRtn.getTargetClass() );
      }
    }
    else {
      //TODO support other NativeSQLQueryReturn type. For now let it go.
    }
View Full Code Here

      if ( !resultType.isAssignableFrom( actualReturnedClass ) ) {
        throw buildIncompatibleException( resultType, actualReturnedClass );
      }
    }
    else if ( nativeSQLQueryReturn instanceof NativeSQLQueryConstructorReturn ) {
      final NativeSQLQueryConstructorReturn ctorRtn = (NativeSQLQueryConstructorReturn) nativeSQLQueryReturn;
      if ( !resultType.isAssignableFrom( ctorRtn.getTargetClass() ) ) {
        throw buildIncompatibleException( resultType, ctorRtn.getTargetClass() );
      }
    }
    else {
      //TODO support other NativeSQLQueryReturn type. For now let it go.
    }
View Full Code Here

      if ( !resultType.isAssignableFrom( actualReturnedClass ) ) {
        throw buildIncompatibleException( resultType, actualReturnedClass );
      }
    }
    else if ( nativeSQLQueryReturn instanceof NativeSQLQueryConstructorReturn ) {
      final NativeSQLQueryConstructorReturn ctorRtn = (NativeSQLQueryConstructorReturn) nativeSQLQueryReturn;
      if ( !resultType.isAssignableFrom( ctorRtn.getTargetClass() ) ) {
        throw buildIncompatibleException( resultType, ctorRtn.getTargetClass() );
      }
    }
    else {
      //TODO support other NativeSQLQueryReturn type. For now let it go.
    }
View Full Code Here

TOP

Related Classes of org.hibernate.engine.query.spi.sql.NativeSQLQueryConstructorReturn

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.