org.jpox.store.expression
Class LogicSetExpression

java.lang.Object
  extended byorg.jpox.store.expression.LogicSetExpression
Direct Known Subclasses:
TableExprAsJoins, TableExprAsSubjoins, TableExprAsSubquery

public abstract class LogicSetExpression
extends java.lang.Object

Represents a Set. A collection of objects. For in-depth details read about the mathematical "set" theory. Pragmatically, it represents a SQL table expression as might be listed in the FROM clause of a SELECT statement. A table expression is a fragment of a larger containing QueryStatement.

A table expression has a base "main" table. If that table serves as backing for a Java class, and that class has persistence-capable superclasses, then the table expression may include joins to superclass tables, or may cause such joins to occur in its surrounding QueryStatement.

Version:
$Revision: 1.1 $
See Also:
QueryExpression

Field Summary
protected  java.util.Map embeddedFieldMappings
          Collection of field expressions already created for this table expression.
protected static Localiser LOCALISER
          Localiser for messages
protected  DatastoreIdentifier mainRangeVar
           
protected  DatastoreContainerObject mainTable
           
protected  QueryExpression qs
           
protected  java.lang.String sqlText
          The SQL text.
protected  StoreManager storeMgr
           
 
Constructor Summary
protected LogicSetExpression(QueryExpression qs, DatastoreContainerObject mainTable, DatastoreIdentifier mainRangeVar)
          Constructor.
 
Method Summary
protected  void assertNotFrozen()
           
 boolean equals(java.lang.Object obj)
           
 DatastoreObject getMainTable()
          Accessor for the main table for this expression.
 DatastoreIdentifier getRangeVariable()
          Accessor for the range variable for this table expression.
 int hashCode()
           
 ScalarExpression newFieldExpression(java.lang.String fieldName)
          Accessor for a field expression on this table
abstract  java.lang.String referenceColumn(DatastoreField col)
          Return an identifier/reference to the datastore field/column.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Localiser for messages


qs

protected final QueryExpression qs

mainTable

protected final DatastoreContainerObject mainTable

mainRangeVar

protected final DatastoreIdentifier mainRangeVar

storeMgr

protected final StoreManager storeMgr

sqlText

protected java.lang.String sqlText
The SQL text.


embeddedFieldMappings

protected java.util.Map embeddedFieldMappings
Collection of field expressions already created for this table expression. Used by nested embedded queries.

Constructor Detail

LogicSetExpression

protected LogicSetExpression(QueryExpression qs,
                             DatastoreContainerObject mainTable,
                             DatastoreIdentifier mainRangeVar)
Constructor.

Parameters:
qs - Query Expression
mainTable - The main table for this query
mainRangeVar - Table range variable
Method Detail

assertNotFrozen

protected void assertNotFrozen()

getMainTable

public final DatastoreObject getMainTable()
Accessor for the main table for this expression.

Returns:
The main table

getRangeVariable

public final DatastoreIdentifier getRangeVariable()
Accessor for the range variable for this table expression.

Returns:
The range variable

newFieldExpression

public ScalarExpression newFieldExpression(java.lang.String fieldName)
Accessor for a field expression on this table

Parameters:
fieldName - Name of the field
Returns:
The field expression

referenceColumn

public abstract java.lang.String referenceColumn(DatastoreField col)
Return an identifier/reference to the datastore field/column.

Parameters:
col - the column to have a reference
Returns:
identifier or fully qualified identifier

toString

public abstract java.lang.String toString()

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)


Copyright © -2007 . All Rights Reserved.