|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.Member
public class Member
Reference to an column of a table.
A member can be a composite designator, following references between tables, and it can indicate that an SQL outer join should be done when using it.
| Constructor Summary | |
|---|---|
Member(int baseColumn,
Column column)
Create a member reference. |
|
Member(int baseColumn,
Column[] selectors)
Create a member reference. |
|
Member(int baseColumn,
Column[] selectors,
boolean outerJoin)
Create a member reference over multiple tables. |
|
Member(int baseColumn,
Column column,
boolean outerJoin)
Create a member reference. |
|
Member(int baseColumn,
Column column1,
Column column2)
Create a member reference over column1, which references
another table to column2 of this one. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests whether this member expression is equal to another object. |
int |
getBaseColumn()
|
Column |
getLastSelector()
|
int |
getNumSelectors()
|
Column |
getSelector(int idx)
|
Column[] |
getSelectors()
|
java.lang.String |
getSqlValue(EvalContext eval)
Returns the SQL expression for this term. |
int |
hashCode()
|
boolean |
isConstant()
Tests whether the expression can be evaluated without an object. |
boolean |
isJoin()
Tests whether this expression enforces any kind of join. |
boolean |
isOuterJoin()
|
boolean |
isSelection()
Tests whether this expression is a selection. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Member(int baseColumn,
Column[] selectors,
boolean outerJoin)
This method simplifies expressions of this form:
ta.b=tb.id AND tb.c=tc.id AND tc.d=td.id AND ...
The corresponding JAVA expression would look like this:
new Member(0, new Column[]{attrB, TableB.attrC, TableC.attrD, ...})
java.lang.IllegalArgumentException - if selectors contains any
null, or if baseColumn is negative.
public Member(int baseColumn,
Column[] selectors)
java.lang.IllegalArgumentException - if selectors contains any
null.
public Member(int baseColumn,
Column column1,
Column column2)
column1, which references
another table to column2 of this one.
The table references by column1 will be added
automatically to the FROM clause if needed.
java.lang.IllegalArgumentException - if column1 or
column2 is null.
public Member(int baseColumn,
Column column,
boolean outerJoin)
java.lang.IllegalArgumentException - if column1 is
null.
public Member(int baseColumn,
Column column)
java.lang.IllegalArgumentException - if column1 is
null.| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objecttrue is the other object is an existing member
expression for the same table and equal
selector list. Two selector lists are equal if the have the same length
and each selector is equal and in the same order as in the other list.public final int getBaseColumn()
public final int getNumSelectors()
public final Column[] getSelectors()
public final Column getSelector(int idx)
public final Column getLastSelector()
public int hashCode()
hashCode in class java.lang.Objectpublic final boolean isConstant()
Term
isConstant in interface Termpublic final boolean isJoin()
Term
isJoin in interface Termpublic final boolean isSelection()
TermWith selection is an expression meant that binds a Member to
one Literal.
isSelection in interface Termpublic final boolean isOuterJoin()
public java.lang.String getSqlValue(EvalContext eval)
As this term represents a column from a table the corresponding name
will be returned. Further tables will be added to the FROM
clause if more then one column is given.
getSqlValue in interface Termpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||