FileDocCategorySizeDatePackage
TableExpression.javaAPI DocGlassfish v2 API5468Tue May 22 16:54:34 BST 2007oracle.toplink.essentials.internal.expressions

TableExpression

public class TableExpression extends DataExpression

Fields Summary
protected DatabaseTable
table
Constructors Summary
public TableExpression()
TableExpression constructor comment.

        super();
    
public TableExpression(DatabaseTable aTable)
TableExpression constructor comment.

        super();
        table = aTable;
    
Methods Summary
public java.lang.StringdescriptionOfNodeType()
INTERNAL: Used for debug printing.

        return "Table";
    
public oracle.toplink.essentials.expressions.ExpressiongetField(java.lang.String fieldName)
INTERNAL: Fully-qualify the databaseField if the table is known. CR 3791

        // we need to check for full table qualification
        DatabaseField field = new DatabaseField(fieldName);
        if (!field.hasTableName()) {
            field.setTable(getTable());
        }
        return getField(field);
    
public java.util.VectorgetOwnedTables()
INTERNAL:

        Vector result = new Vector(1);
        result.addElement(getTable());
        return result;
    
public oracle.toplink.essentials.internal.helper.DatabaseTablegetTable()

        return table;
    
public booleanisTableExpression()

        return true;
    
public oracle.toplink.essentials.expressions.Expressionnormalize(oracle.toplink.essentials.internal.expressions.ExpressionNormalizer normalizer)
INTERNAL: Normalize the expression into a printable structure. Any joins must be added to form a new root.

		//Bug4736461  Only setTableQualifier if getDatasourceLogin().getTableQualifier() is an empty string to make the window much smaller when
		//DatabaseTable.qualifiedName is reset
        if (getTable().getTableQualifier().length() == 0 && (normalizer.getSession().getDatasourceLogin().getTableQualifier().length() != 0)) {
            getTable().setTableQualifier(normalizer.getSession().getDatasourceLogin().getTableQualifier());
        }
        return super.normalize(normalizer);
    
public oracle.toplink.essentials.expressions.ExpressionrebuildOn(oracle.toplink.essentials.expressions.Expression newBase)
INTERNAL: This expression is built on a different base than the one we want. Rebuild it and return the root of the new tree

        Expression newLocalBase = getBaseExpression().rebuildOn(newBase);
        return newLocalBase.getTable(getTable());

    
public voidsetTable(oracle.toplink.essentials.internal.helper.DatabaseTable table)
INTERNAL: Added for temporal querying.

        this.table = table;
    
public oracle.toplink.essentials.expressions.ExpressiontwistedForBaseAndContext(oracle.toplink.essentials.expressions.Expression newBase, oracle.toplink.essentials.expressions.Expression context)
INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping) into part of some larger expression. You normally would not call this directly, instead calling twist See the comment there for more details"

        Expression twistedBase = getBaseExpression().twistedForBaseAndContext(newBase, context);
        return twistedBase.getTable(getTable());

    
public voidwriteDescriptionOn(java.io.BufferedWriter writer)
INTERNAL: Used to print a debug form of the expression tree.

        writer.write(getTable().toString());
        writer.write(tableAliasesDescription());