|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.map.Join
Represents an SQL join between two tables, spanning one or more columns.
History:
08-03-2004: Initial version of this class.
Field Summary | |
private java.util.Set |
fromColumns
|
private java.lang.String |
fromTable
|
private java.util.Map |
otherSide
|
private java.lang.String |
sqlExpression
|
private java.util.Set |
toColumns
|
private java.lang.String |
toTable
|
Constructor Summary | |
Join()
|
Method Summary | |
void |
addCondition(java.lang.String joinCondition)
|
static Join |
buildJoin(java.lang.String condition)
|
static java.util.Set |
buildJoins(java.util.Collection joinConditions)
Builds a list of Join objects from a list of join condition strings. |
java.lang.Object |
clone()
Make a shallow copy of this . |
boolean |
containsColumn(Column column)
|
boolean |
containsTable(java.lang.String tableName)
|
private static Column |
getColumn(java.lang.String joinCondition,
boolean first)
|
java.util.Set |
getFirstColumns()
|
java.lang.String |
getFirstTable()
|
Column |
getOtherSide(Column column)
|
java.util.Set |
getSecondColumns()
|
java.lang.String |
getSecondTable()
|
boolean |
isOneSide(java.util.Set columns)
Checks if one side of the join is equal to the argument set of Column s. |
void |
prefixTables(TablePrefixer prefixer)
Changes the fields in a newly created clone that are to be modified when making aliasses. |
java.lang.String |
sqlExpression()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.util.Set fromColumns
private java.util.Set toColumns
private java.util.Map otherSide
private java.lang.String fromTable
private java.lang.String toTable
private java.lang.String sqlExpression
Constructor Detail |
public Join()
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Prefixable
this
.
General advice: Do not overwrite clone().
prefixTables() works best with shallow copy which Object implements.
Issues: I have not found a (preferred) static equivalent of clone().
Since Objects clone() method is protected, we cannot just declare
Cloneable
, if we want to call clone() from outside of that
class hierarchy. Instead it must be public and implemented in each
Prefixable class by a call to super.clone().
clone
in interface Prefixable
java.lang.CloneNotSupportedException
public void prefixTables(TablePrefixer prefixer)
Prefixable
prefixTables
in interface Prefixable
prefixer
- does the actual prefixing of simple and complex types.public void addCondition(java.lang.String joinCondition)
public boolean containsTable(java.lang.String tableName)
public boolean containsColumn(Column column)
public java.lang.String getFirstTable()
public java.lang.String getSecondTable()
public java.util.Set getFirstColumns()
public java.util.Set getSecondColumns()
public boolean isOneSide(java.util.Set columns)
Column
s.
columns
- a set of Column instances
public Column getOtherSide(Column column)
private static Column getColumn(java.lang.String joinCondition, boolean first)
public static java.util.Set buildJoins(java.util.Collection joinConditions)
joinConditions
- a collection of strings
public static Join buildJoin(java.lang.String condition)
public java.lang.String sqlExpression()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |