Package org.apache.groovy.ginq.dsl.expression

# Class FromExpression

java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.expr.Expression
org.apache.groovy.ginq.dsl.expression.AbstractGinqExpression
org.apache.groovy.ginq.dsl.expression.DataSourceExpression
org.apache.groovy.ginq.dsl.expression.FromExpression

All Implemented Interfaces:
  `GroovydocHolder<AnnotatedNode>`, `DataSourceHolder`, `NodeMetaDataHandler`

public class FromExpression extends DataSourceExpression
Represents the from expression

Since:
  4.0.0

- ## Field Summary

  ### Fields inherited from class org.apache.groovy.ginq.dsl.expression.DataSourceExpression

  `aliasExpr, dataSourceExpr`

  ### Fields inherited from class org.codehaus.groovy.ast.expr.Expression

  `EMPTY_ARRAY`

  ### Fields inherited from interface groovy.lang.groovydoc.GroovydocHolder

  `DOC_COMMENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FromExpression(Expression aliasExpr, Expression dataSourceExpr)`
  Creates a `from` clause.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<R> R`
  `accept(GinqAstVisitor<R> visitor)`
  Accepts a visitor for this clause.
  `DataSourceExpression`
  `getDataSourceExpression()`
  Returns this clause as its own data-source expression.
  `String`
  `getText()`
  Returns the textual GINQ form of this clause.
  `void`
  `setDataSourceExpression(DataSourceExpression dataSourceExpression)`
  Rejects replacing the `from` clause with another data source.
  `String`
  `toString()`
  Returns the textual form of this clause.

  ### Methods inherited from class org.apache.groovy.ginq.dsl.expression.DataSourceExpression

  `getAliasExpr, getDataSourceExpr, setDataSourceExpr`

  ### Methods inherited from class org.apache.groovy.ginq.dsl.expression.AbstractGinqExpression

  `transformExpression, visit`

  ### Methods inherited from class org.codehaus.groovy.ast.expr.Expression

  `getType, setType, transformExpressions, transformExpressions`

  ### Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode

  `addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`

  ### Methods inherited from class org.codehaus.groovy.ast.ASTNode

  `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler

  `copyNodeMetaData, getMetaDataMap, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setMetaDataMap, setNodeMetaData`

- ## Constructor Details

  - ### FromExpression

    public FromExpression(Expression aliasExpr, Expression dataSourceExpr)
    Creates a `from` clause.
    Parameters:
      `aliasExpr` - the alias expression
      `dataSourceExpr` - the source expression

- ## Method Details

  - ### accept

    public <R> R accept(GinqAstVisitor<R> visitor)
    Accepts a visitor for this clause.
    Specified by:
      `accept` in class `AbstractGinqExpression`
    Type Parameters:
      `R` - the visit result type
    Parameters:
      `visitor` - the visitor to accept
    Returns:
      the visit result

  - ### getDataSourceExpression

    public DataSourceExpression getDataSourceExpression()
    Returns this clause as its own data-source expression.
    Returns:
      this instance

  - ### setDataSourceExpression

    public void setDataSourceExpression(DataSourceExpression dataSourceExpression)
    Rejects replacing the `from` clause with another data source.
    Parameters:
      `dataSourceExpression` - the ignored replacement

  - ### getText

    public String getText()
    Returns the textual GINQ form of this clause.
    Overrides:
      `getText` in class `ASTNode`
    Returns:
      the clause text

  - ### toString

    public String toString()
    Returns the textual form of this clause.
    Overrides:
      `toString` in class `Object`
    Returns:
      the clause text