ca.sqlpower.wabit.rs.query
Class WabitJoin
java.lang.Object
ca.sqlpower.object.AbstractSPObject
ca.sqlpower.wabit.AbstractWabitObject
ca.sqlpower.wabit.rs.query.WabitJoin
- All Implemented Interfaces:
- ca.sqlpower.object.SPObject, ca.sqlpower.query.Join, WabitObject
public class WabitJoin
- extends AbstractWabitObject
- implements ca.sqlpower.query.Join
Wraps a SQLJoin and converts events on the join to SPListener
events.
| Fields inherited from class ca.sqlpower.object.AbstractSPObject |
uuid |
|
Constructor Summary |
WabitJoin(QueryCache query,
ca.sqlpower.query.SQLJoin delegate)
Constructs a WabitJoin that converts SQLJoin events to
SPListener events. |
| Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject |
commit, equals, generateNewUUID, getParent, getSession, isForegroundThread, removeChild, rollback, runInBackground, runInForeground, toString |
| Methods inherited from class ca.sqlpower.object.AbstractSPObject |
addChild, addChildImpl, addSPListener, begin, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ca.sqlpower.query.Join |
getName, getUUID, setName, setUUID |
| Methods inherited from interface ca.sqlpower.object.SPObject |
addChild, addSPListener, begin, getChildren, getName, getUUID, removeSPListener, setName, setParent, setUUID |
WabitJoin
public WabitJoin(QueryCache query,
ca.sqlpower.query.SQLJoin delegate)
- Constructs a WabitJoin that converts
SQLJoin events to
SPListener events.
- Parameters:
query - The QueryCache this WabitJoin will be a part of. This
is passed in to find the appropriate WabitItem objects
for the left and right columns of the given SQLJoin.
If new WabitItems are created here their UUIDs would
not match the WabitItems in the QueryCache and be
considered different object.delegate - The SQLJoin to listen to.
firePropertyChangeEvent
protected void firePropertyChangeEvent(java.beans.PropertyChangeEvent evt)
cleanup
public ca.sqlpower.object.CleanupExceptions cleanup()
- Description copied from class:
AbstractWabitObject
- Default cleanup method that does nothing. Override and implement this
method if cleanup is necessary.
- Specified by:
cleanup in interface ca.sqlpower.object.SPObject- Overrides:
cleanup in class AbstractWabitObject
getQuery
public QueryCache getQuery()
- XXX The query may be equivalent to the parent. If this is the case the query
variable should be merged with the parent.
getDelegate
public ca.sqlpower.query.SQLJoin getDelegate()
- Returns the
SQLJoin delegate of this object.
XXX This method should be removed in the future to make its delegate a proper delegate.
removeChildImpl
protected boolean removeChildImpl(ca.sqlpower.object.SPObject child)
- Specified by:
removeChildImpl in class ca.sqlpower.object.AbstractSPObject
allowsChildren
public boolean allowsChildren()
- Specified by:
allowsChildren in interface ca.sqlpower.object.SPObject
childPositionOffset
public int childPositionOffset(java.lang.Class<? extends ca.sqlpower.object.SPObject> childType)
- Specified by:
childPositionOffset in interface ca.sqlpower.object.SPObject
getChildren
public java.util.List<? extends WabitObject> getChildren()
- Specified by:
getChildren in interface ca.sqlpower.object.SPObject
getDependencies
public java.util.List<WabitObject> getDependencies()
- Specified by:
getDependencies in interface ca.sqlpower.object.SPObject
removeDependency
public void removeDependency(ca.sqlpower.object.SPObject dependency)
- Specified by:
removeDependency in interface ca.sqlpower.object.SPObject
setLeftColumnOuterJoin
public void setLeftColumnOuterJoin(boolean isOuterJoin)
- Specified by:
setLeftColumnOuterJoin in interface ca.sqlpower.query.Join
isLeftColumnOuterJoin
public boolean isLeftColumnOuterJoin()
- Specified by:
isLeftColumnOuterJoin in interface ca.sqlpower.query.Join
setRightColumnOuterJoin
public void setRightColumnOuterJoin(boolean isOuterJoin)
- Specified by:
setRightColumnOuterJoin in interface ca.sqlpower.query.Join
isRightColumnOuterJoin
public boolean isRightColumnOuterJoin()
- Specified by:
isRightColumnOuterJoin in interface ca.sqlpower.query.Join
setComparator
public void setComparator(java.lang.String comparator)
- Specified by:
setComparator in interface ca.sqlpower.query.Join
getComparator
public java.lang.String getComparator()
- Specified by:
getComparator in interface ca.sqlpower.query.Join
addJoinChangeListener
public void addJoinChangeListener(java.beans.PropertyChangeListener l)
- Specified by:
addJoinChangeListener in interface ca.sqlpower.query.Join
getLeftColumn
public ca.sqlpower.query.Item getLeftColumn()
- Specified by:
getLeftColumn in interface ca.sqlpower.query.Join
getRightColumn
public ca.sqlpower.query.Item getRightColumn()
- Specified by:
getRightColumn in interface ca.sqlpower.query.Join
removeAllListeners
public void removeAllListeners()
- This remove all the listeners inside this object's delegate to ensure that
listeners do not remain attached to the join when it is removed. Used for
deleting a join.
XXX This should be removed and objects adding listeners to a join should
remove the joins appropriately when they are not needed.
- Specified by:
removeAllListeners in interface ca.sqlpower.query.Join
removeJoinChangeListener
public void removeJoinChangeListener(java.beans.PropertyChangeListener l)
- Specified by:
removeJoinChangeListener in interface ca.sqlpower.query.Join
getAllowedChildTypes
public java.util.List<java.lang.Class<? extends ca.sqlpower.object.SPObject>> getAllowedChildTypes()
Copyright © 2009. All Rights Reserved.