/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression acos(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Acos); return anOperator.expressionFor(expression); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression atan2(Expression expression1, Expression expression2) { ExpressionOperator anOperator = expression1.getOperator(ExpressionOperator.Atan2); return anOperator.expressionFor(expression1, expression2); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression ceil(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Ceil); return anOperator.expressionFor(expression); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression floor(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Floor); return anOperator.expressionFor(expression); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression mod(Expression expression, Object base) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Mod); return anOperator.expressionFor(expression, base); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression sign(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Sign); return anOperator.expressionFor(expression); }
/** * PUBLIC: * Function, returns the single character strings ascii value. */ public Expression asciiValue() { ExpressionOperator anOperator = getOperator(ExpressionOperator.Ascii); return anOperator.expressionFor(this); }
/** * PUBLIC: * Function, returns the date converted to the string value in the default database format. */ public Expression dateToString() { ExpressionOperator anOperator = getOperator(ExpressionOperator.DateToString); return anOperator.expressionFor(this); }
/** * INTERNAL: * Return an expression representing an outer join comparison */ // cr3546 public Expression equalOuterJoin(Object theValue) { ExpressionOperator anOperator = getOperator(ExpressionOperator.EqualOuterJoin); return anOperator.expressionFor(this, theValue); }
/** * PUBLIC: * Function, returns the string padded with the substring to the size. */ public Expression rightPad(Object size, Object substring) { ExpressionOperator anOperator = getOperator(ExpressionOperator.RightPad); List args = new ArrayList(2); args.add(size); args.add(substring); return anOperator.expressionForArguments(this, args); }
/** * PUBLIC: * Function, returns the string with the substring trimed from the right. */ public Expression rightTrim(Object substring) { ExpressionOperator anOperator = getOperator(ExpressionOperator.RightTrim2); return anOperator.expressionFor(this, substring); }
/** * PUBLIC: * Function, returns the date rounded to the year, month or day. */ public Expression roundDate(Object yearOrMonthOrDayRoundToken) { ExpressionOperator anOperator = getOperator(ExpressionOperator.RoundDate); return anOperator.expressionFor(this, yearOrMonthOrDayRoundToken); }
/** * PUBLIC: * Return a intersect expression with the subquery. */ public Expression intersect(Expression arguments) { ExpressionOperator anOperator = getOperator(ExpressionOperator.Intersect); return anOperator.expressionFor(this, arguments); }
/** * PUBLIC: * Function, to add months to a date. */ public Expression addMonths(Object months) { ExpressionOperator anOperator = getOperator(ExpressionOperator.AddMonths); return anOperator.expressionFor(this, months); }
/** * PUBLIC: * Function, returns binary array value for the hex string. */ public Expression hexToRaw() { ExpressionOperator anOperator = getOperator(ExpressionOperator.HexToRaw); return anOperator.expressionFor(this); }
/** * PUBLIC: * Function, returns the decimal number of months between the two dates. */ public Expression monthsBetween(Object otherDate) { ExpressionOperator anOperator = getOperator(ExpressionOperator.MonthsBetween); return anOperator.expressionFor(this, otherDate); }
/** * PUBLIC: * Function, returns the string with the substring trimed from the right. */ public Expression rightTrim(Object substring) { ExpressionOperator anOperator = getOperator(ExpressionOperator.RightTrim2); return anOperator.expressionFor(this, substring); }
/** * PUBLIC: * Function, returns the string right and left trimmed for the substring. */ public Expression trim(Object substring) { ExpressionOperator anOperator = getOperator(ExpressionOperator.Trim2); return anOperator.expressionForWithBaseLast(this, substring); }
/** * PUBLIC: * XMLType Function, extracts a secton of XML from a larget XML document * @param xpath XPath expression representing the node to be returned */ public Expression extractXml(String xpath) { ExpressionOperator anOperator = getOperator(ExpressionOperator.ExtractXml); return anOperator.expressionFor(this, xpath); }
/** * PUBLIC: * Extract the date part from the date/time value. * EXTRACT is part of the SQL standard, so should be supported by most databases. * @param part is the date part to extract, "YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND", "TIMEZONE_HOUR", "TIMEZONE_MINUTE". */ public Expression extract(String part) { ExpressionOperator anOperator = getOperator(ExpressionOperator.Extract); return anOperator.expressionFor(this, literal(part)); }