org.teiid.query.sql.symbol
Class TextLine

java.lang.Object
  extended by org.teiid.query.sql.symbol.TextLine
All Implemented Interfaces:
java.lang.Cloneable, LanguageObject, Expression

public class TextLine
extends java.lang.Object
implements Expression

Represents the only allowable expression for the textagg aggregate. This is a Teiid specific construct.


Nested Class Summary
static interface TextLine.ValueExtractor<T>
           
 
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
 
Field Summary
static java.lang.String nl
           
 
Constructor Summary
TextLine()
           
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 TextLine clone()
          Implement clone to make objects cloneable.
 boolean equals(java.lang.Object obj)
           
static
<T> java.lang.String
evaluate(java.util.List<T> values, TextLine.ValueExtractor<T> valueExtractor, java.lang.Character delimeter, java.lang.Character quote)
           
 java.lang.Character getDelimiter()
           
 java.lang.String getEncoding()
           
 java.util.List<DerivedColumn> getExpressions()
           
 java.lang.Character getQuote()
           
 java.lang.Class<?> getType()
          Get the return type of this expression.
 int hashCode()
           
 boolean isIncludeHeader()
           
 boolean isResolved()
          Return true if expression has been fully resolved.
 void setDelimiter(java.lang.Character delimiter)
           
 void setEncoding(java.lang.String encoding)
           
 void setExpressions(java.util.List<DerivedColumn> expressions)
           
 void setIncludeHeader(boolean includeHeader)
           
 void setQuote(java.lang.Character quote)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

nl

public static final java.lang.String nl
Constructor Detail

TextLine

public TextLine()
Method Detail

getDelimiter

public java.lang.Character getDelimiter()

setDelimiter

public void setDelimiter(java.lang.Character delimiter)

getEncoding

public java.lang.String getEncoding()

setEncoding

public void setEncoding(java.lang.String encoding)

getQuote

public java.lang.Character getQuote()

setQuote

public void setQuote(java.lang.Character quote)

isIncludeHeader

public boolean isIncludeHeader()

setIncludeHeader

public void setIncludeHeader(boolean includeHeader)

getExpressions

public java.util.List<DerivedColumn> getExpressions()

setExpressions

public void setExpressions(java.util.List<DerivedColumn> expressions)

getType

public java.lang.Class<?> getType()
Description copied from interface: Expression
Get the return type of this expression. This method will not necessarily work right before resolution (Expression.isResolved() returns true).

Specified by:
getType in interface Expression
Returns:
Java class name

isResolved

public boolean isResolved()
Description copied from interface: Expression
Return true if expression has been fully resolved. Typically the QueryResolver component will handle resolution of an expression.

Specified by:
isResolved in interface Expression
Returns:
True if resolved

acceptVisitor

public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface: LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.

Specified by:
acceptVisitor in interface LanguageObject
Parameters:
visitor - Visitor being used

clone

public TextLine clone()
Description copied from interface: LanguageObject
Implement clone to make objects cloneable.

Specified by:
clone in interface LanguageObject
Overrides:
clone in class java.lang.Object
Returns:
Deep clone of this object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

evaluate

public static <T> java.lang.String evaluate(java.util.List<T> values,
                                            TextLine.ValueExtractor<T> valueExtractor,
                                            java.lang.Character delimeter,
                                            java.lang.Character quote)
                                 throws TransformationException
Throws:
TransformationException


Copyright © 2010. All Rights Reserved.