Class ExpressionSupport
- java.lang.Object
-
- com.ibm.fhir.database.utils.query.expression.ExpressionSupport
-
public class ExpressionSupport extends Object
Collection of utility functions for building predicate expressions. Consumers should static import the functions they require for cleaner syntax.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExpNodeacos(ExpNode arg)Factory function to create a ACosExpNode with the given valuestatic Aliasalias(String aliasStr)Factory function for creating anAliasfrom a stringstatic BindMarkerNodebind(Double value)Factory function to create a BindMarkerNode with the given valuestatic BindMarkerNodebind(Integer value)Factory function to create a BindMarkerNode with the given valuestatic BindMarkerNodebind(Long value)Factory function to create a BindMarkerNode with the given valuestatic BindMarkerNodebind(String value)Factory function for creating a BindMarkerNode instancestatic BindMarkerNodebind(BigDecimal value)Factory function to create a BindMarkerNode with the given valuestatic BindMarkerNodebind(Instant value)Factory function to create a BindMarkerNode with the given valuestatic ColumnRefcol(String ref)Factory function for creating aColumnRefinstance from a stringstatic ColumnRefcol(String alias, String name)static ExpNodecos(ExpNode arg)Factory function to create a CosExpNode with the given valuestatic ExpNodeisDeleted(String alias)Factory function to create the expression {alias}.IS_DELETED = 'N'static WhereFragmenton(String col)Creates aWhereFragmentstarting with a simple column reference for use in a join clausestatic WhereFragmenton(String tableAlias, String col)Creates aWhereFragmentstarting with a qualified column reference for use in a join clausestatic ExpNodesin(ExpNode arg)Factory function to create a SinExpNode with the given valuestatic LiteralStringstring(String value)Simple container for a string value to make overloading of methods more natural
-
-
-
Method Detail
-
on
public static WhereFragment on(String col)
Creates aWhereFragmentstarting with a simple column reference for use in a join clause- Parameters:
col-- Returns:
-
on
public static WhereFragment on(String tableAlias, String col)
Creates aWhereFragmentstarting with a qualified column reference for use in a join clause- Parameters:
tableAlias-col-- Returns:
-
alias
public static Alias alias(String aliasStr)
Factory function for creating anAliasfrom a string- Parameters:
aliasStr-- Returns:
-
col
public static ColumnRef col(String ref)
Factory function for creating aColumnRefinstance from a string- Parameters:
ref-- Returns:
-
string
public static LiteralString string(String value)
Simple container for a string value to make overloading of methods more natural- Parameters:
value-- Returns:
-
bind
public static BindMarkerNode bind(String value)
Factory function for creating a BindMarkerNode instance- Returns:
-
bind
public static BindMarkerNode bind(Long value)
Factory function to create a BindMarkerNode with the given value- Parameters:
value-- Returns:
-
bind
public static BindMarkerNode bind(Integer value)
Factory function to create a BindMarkerNode with the given value- Parameters:
value-- Returns:
-
bind
public static BindMarkerNode bind(Double value)
Factory function to create a BindMarkerNode with the given value- Parameters:
value-- Returns:
-
bind
public static BindMarkerNode bind(Instant value)
Factory function to create a BindMarkerNode with the given value- Parameters:
value-- Returns:
-
bind
public static BindMarkerNode bind(BigDecimal value)
Factory function to create a BindMarkerNode with the given value- Parameters:
value-- Returns:
-
sin
public static ExpNode sin(ExpNode arg)
Factory function to create a SinExpNode with the given value- Parameters:
value-- Returns:
-
cos
public static ExpNode cos(ExpNode arg)
Factory function to create a CosExpNode with the given value- Parameters:
value-- Returns:
-
acos
public static ExpNode acos(ExpNode arg)
Factory function to create a ACosExpNode with the given value- Parameters:
value-- Returns:
-
-