Package org.hibernate.jpa.criteria.expression

Examples of org.hibernate.jpa.criteria.expression.ParameterExpressionImpl


    final StringBuilder buffer = new StringBuilder();
    final Expression exp = getExpression();
    if ( ParameterExpressionImpl.class.isInstance( exp ) ) {
      // technically we only need to CAST (afaik) if expression and all values are parameters.
      // but checking for that condition could take long time on a lon value list
      final ParameterExpressionImpl parameterExpression = (ParameterExpressionImpl) exp;
      final SessionFactoryImplementor sfi = criteriaBuilder().getEntityManagerFactory().unwrap( SessionFactoryImplementor.class );
      final Type mappingType = sfi.getTypeResolver().heuristicType( parameterExpression.getParameterType().getName() );
      buffer.append( "cast(" )
          .append( parameterExpression.render( renderingContext ) )
          .append( " as " )
          .append( mappingType.getName() )
          .append( ")" );
    }
    else {
View Full Code Here


    final StringBuilder buffer = new StringBuilder();
    final Expression exp = getExpression();
    if ( ParameterExpressionImpl.class.isInstance( exp ) ) {
      // technically we only need to CAST (afaik) if expression and all values are parameters.
      // but checking for that condition could take long time on a lon value list
      final ParameterExpressionImpl parameterExpression = (ParameterExpressionImpl) exp;
      final SessionFactoryImplementor sfi = criteriaBuilder().getEntityManagerFactory().unwrap( SessionFactoryImplementor.class );
      final Type mappingType = sfi.getTypeResolver().heuristicType( parameterExpression.getParameterType().getName() );
      buffer.append( "cast(" )
          .append( parameterExpression.render( renderingContext ) )
          .append( " as " )
          .append( mappingType.getName() )
          .append( ")" );
    }
    else {
View Full Code Here

TOP

Related Classes of org.hibernate.jpa.criteria.expression.ParameterExpressionImpl

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.