Package org.hibernate.dialect.function

Examples of org.hibernate.dialect.function.SQLFunction.render()


    }
    else {
      // this function has a template -> restore output, apply the template and write the result out
      FunctionArguments functionArguments = ( FunctionArguments ) writer;   // TODO: Downcast to avoid using an interface?  Yuck.
      writer = ( SqlWriter ) outputStack.removeFirst();
      out( template.render( functionArguments.getArgs(), sessionFactory ) );
    }
  }

  // --- Inner classes (moved here from sql-gen.g) ---
View Full Code Here


    else {
      final Type functionType = functionNode.getFirstArgumentType();
      // this function has a registered SQLFunction -> redirect output and catch the arguments
      FunctionArguments functionArguments = (FunctionArguments) writer;
      writer = outputStack.removeFirst();
      out( sqlFunction.render( functionType, functionArguments.getArgs(), sessionFactory ) );
    }
  }

  // --- Inner classes (moved here from sql-gen.g) ---
View Full Code Here

    }
    else {
      // this function has a template -> restore output, apply the template and write the result out
      FunctionArguments functionArguments = ( FunctionArguments ) writer;   // TODO: Downcast to avoid using an interface?  Yuck.
      writer = ( SqlWriter ) outputStack.removeFirst();
      out( template.render( functionArguments.getArgs(), sessionFactory ) );
    }
  }

  // --- Inner classes (moved here from sql-gen.g) ---
View Full Code Here

    }
    else {
      // this function has a template -> restore output, apply the template and write the result out
      FunctionArguments functionArguments = ( FunctionArguments ) writer;   // TODO: Downcast to avoid using an interface?  Yuck.
      writer = ( SqlWriter ) outputStack.removeFirst();
      out( template.render( functionArguments.getArgs(), sessionFactory ) );
    }
  }

  // --- Inner classes (moved here from sql-gen.g) ---
View Full Code Here

    }
    else {
      // this function has a template -> restore output, apply the template and write the result out
      FunctionArguments functionArguments = ( FunctionArguments ) writer;   // TODO: Downcast to avoid using an interface?  Yuck.
      writer = ( SqlWriter ) outputStack.removeFirst();
      out( template.render( functionArguments.getArgs(), sessionFactory ) );
    }
  }

  // --- Inner classes (moved here from sql-gen.g) ---
View Full Code Here

      ArrayList expressions = new ArrayList();
      while ( child != null ) {
        expressions.add( resolveFunctionArgument( child ) );
        child = child.getNextSibling();
      }
      final String text = function.render( null, expressions, context.getSessionFactory() );
      return getASTFactory().create( OrderByTemplateTokenTypes.IDENT, text );
    }
  }

  private String resolveFunctionArgument(AST argumentNode) {
View Full Code Here

      ArrayList expressions = new ArrayList();
      while ( child != null ) {
        expressions.add( child.getText() );
        child = child.getNextSibling();
      }
      final String text = function.render( null, expressions, context.getSessionFactory() );
      return getASTFactory().create( OrderByTemplateTokenTypes.IDENT, text );
    }
  }

  /**
 
View Full Code Here

    else {
      final Type functionType = functionNode.getFirstArgumentType();
      // this function has a registered SQLFunction -> redirect output and catch the arguments
      FunctionArguments functionArguments = ( FunctionArguments ) writer;
      writer = outputStack.removeFirst();
      out( sqlFunction.render( functionType, functionArguments.getArgs(), sessionFactory ) );
    }
  }

  // --- Inner classes (moved here from sql-gen.g) ---
View Full Code Here

      ArrayList expressions = new ArrayList();
      while ( child != null ) {
        expressions.add( child.getText() );
        child = child.getNextSibling();
      }
      final String text = function.render( null, expressions, context.getSessionFactory() );
      return getASTFactory().create( OrderByTemplateTokenTypes.IDENT, text );
    }
  }

  /**
 
View Full Code Here

      ArrayList expressions = new ArrayList();
      while ( child != null ) {
        expressions.add( child.getText() );
        child = child.getNextSibling();
      }
      final String text = function.render( expressions, context.getSessionFactory() );
      return getASTFactory().create( OrderByTemplateTokenTypes.IDENT, text );
    }
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.