org.teiid.translator.jdbc
Class ExtractFunctionModifier

java.lang.Object
  extended by org.teiid.translator.jdbc.FunctionModifier
      extended by org.teiid.translator.jdbc.ExtractFunctionModifier

public class ExtractFunctionModifier
extends FunctionModifier

Convert the YEAR/MONTH/DAY etc. function into an equivalent Extract function. Format: EXTRACT(YEAR from Element) or EXTRACT(YEAR from DATE '2004-03-03')


Field Summary
static java.lang.String DAY
           
static java.lang.String DAYOFWEEK
           
static java.lang.String DAYOFYEAR
           
static java.lang.String HOUR
           
static java.lang.String MILLISECONDS
           
static java.lang.String MINUTE
           
static java.lang.String MONTH
           
static java.lang.String QUARTER
           
static java.lang.String SECOND
           
static java.lang.String WEEK
           
static java.lang.String YEAR
           
 
Fields inherited from class org.teiid.translator.jdbc.FunctionModifier
BIGDECIMAL, BIGINTEGER, BLOB, BOOLEAN, BYTE, CHAR, CLOB, DATE, DOUBLE, FLOAT, INTEGER, LONG, OBJECT, SHORT, STRING, TIME, TIMESTAMP, XML
 
Constructor Summary
ExtractFunctionModifier()
           
 
Method Summary
 java.util.List<?> translate(Function function)
          Return a List of translated parts (LanguageObjects and Objects), or null if this FunctionModifier wishes to rely on the default translation of the conversion visitor.
 
Methods inherited from class org.teiid.translator.jdbc.FunctionModifier
getCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

YEAR

public static final java.lang.String YEAR
See Also:
Constant Field Values

QUARTER

public static final java.lang.String QUARTER
See Also:
Constant Field Values

MONTH

public static final java.lang.String MONTH
See Also:
Constant Field Values

DAYOFYEAR

public static final java.lang.String DAYOFYEAR
See Also:
Constant Field Values

DAY

public static final java.lang.String DAY
See Also:
Constant Field Values

WEEK

public static final java.lang.String WEEK
See Also:
Constant Field Values

DAYOFWEEK

public static final java.lang.String DAYOFWEEK
See Also:
Constant Field Values

HOUR

public static final java.lang.String HOUR
See Also:
Constant Field Values

MINUTE

public static final java.lang.String MINUTE
See Also:
Constant Field Values

SECOND

public static final java.lang.String SECOND
See Also:
Constant Field Values

MILLISECONDS

public static final java.lang.String MILLISECONDS
See Also:
Constant Field Values
Constructor Detail

ExtractFunctionModifier

public ExtractFunctionModifier()
Method Detail

translate

public java.util.List<?> translate(Function function)
Description copied from class: FunctionModifier
Return a List of translated parts (LanguageObjects and Objects), or null if this FunctionModifier wishes to rely on the default translation of the conversion visitor.

Specified by:
translate in class FunctionModifier
Parameters:
function - IFunction to be translated
Returns:
List of translated parts, or null


Copyright © 2010. All Rights Reserved.