Class HanaHints

  • All Implemented Interfaces:
    Hint, QueryHint

    public final class HanaHints
    extends java.lang.Object
    implements QueryHint
    Allows to build HANA optimizer/query hints. Keep in mind that you should use just one QueryHint for FlexibleSearchQuery. That means adding more than one will lead to query errors. You can combine more than one optimiser hints by using create(String...) (String...)} as follows:
     QueryHint hint = HanaHints.create("HINT_ONE", "HINT_TWO");
     

    and then pass it to the FlexibleSearchQuery object using FlexibleSearchQuery.addHints(Hint...) method. All provided hints will be compiled into one HANA hint directive and added to the end of the query:

         WITH HINT(HINT_ONE,HINT_TWO)
     

    If you need to add more hints to existing object, for instance iterating over some list of objects, you can use method add(String).

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      HanaHints add​(java.lang.String hint)  
      java.lang.String apply​(java.lang.String query)  
      static HanaHints create​(java.lang.String... hints)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • add

        public HanaHints add​(java.lang.String hint)
      • create

        public static HanaHints create​(java.lang.String... hints)
      • apply

        public java.lang.String apply​(java.lang.String query)
        Specified by:
        apply in interface QueryHint