ca.sqlpower.wabit
Class QueryCache

java.lang.Object
  extended by ca.sqlpower.wabit.AbstractWabitObject
      extended by ca.sqlpower.wabit.QueryCache
All Implemented Interfaces:
ca.sqlpower.query.Query, ca.sqlpower.swingui.query.StatementExecutor, ResultSetProducer, WabitBackgroundWorker, WabitObject

public class QueryCache
extends AbstractWabitObject
implements ca.sqlpower.query.Query, ca.sqlpower.swingui.query.StatementExecutor, ResultSetProducer

This method will be able to execute and cache the results of a query. It also delegates some of the methods to the QueryImpl contained in it.


Nested Class Summary
static class QueryCache.WabitObjectOrder
          FIXME This enum defines the WabitObject child classes a QueryCache takes as well as the ordinal order of these child classes such that the class going before does not depend on the class that goes after.
 
Constructor Summary
QueryCache(QueryCache q)
          This makes a copy of the given query cache.
QueryCache(QueryCache q, boolean connectListeners)
          This makes a copy of the given query cache.
QueryCache(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping)
          Creates a Query that caches the last set of results that were returned when during the last execution.
QueryCache(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping, boolean prepopulateConstants)
          Creates a Query that caches the last set of results that were returned when during the last execution.
QueryCache(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping, boolean prepopulateConstants, WabitConstantsContainer newConstantsContainer)
          Creates a Query that caches the last set of results that were returned when during the last execution.
 
Method Summary
protected  void addChildImpl(WabitObject child, int index)
          This is the object specific implementation of #addChild(WabitObject).
 void addItem(ca.sqlpower.query.Item col)
           
 void addJoin(ca.sqlpower.query.SQLJoin join)
           
 void addQueryChangeListener(ca.sqlpower.query.QueryChangeListener l)
           
 void addResultSetListener(ResultSetListener listener)
          Adds the given listener to this result set producer's list of interested parties.
 void addTable(ca.sqlpower.query.Container container)
           
 void addTable(ca.sqlpower.query.Container container, int index)
           
 boolean allowsChildren()
          Returns true if this object may contain children.
 void cancel()
          Cancels this query's execution if it is currently running.
 int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
          Returns the position in the list that would be returned by getChildren() that the first object of type childClass is, or where it would be if there were any children of that type.
 CleanupExceptions cleanup()
          Default cleanup method that does nothing.
 boolean containsCrossJoins()
           
 void endCompoundEdit()
           
 java.util.concurrent.Future<ResultSetAndUpdateCountCollection> execute()
          Executes the current query represented by this object, returning the results from the query's execution.
 boolean executeStatement()
          Executes the current SQL query, returning a cached copy of the result set.
 boolean executeStatement(boolean fetchFullResults)
          Executes the current SQL query, returning a cached copy of the result set that is either a subset of the full results, limited by the session's row limit, or the full result set.
protected  void fireCompoundEditEnded(ca.sqlpower.util.TransactionEvent evt)
           
protected  void fireCompoundEditStarted(ca.sqlpower.util.TransactionEvent evt)
           
protected  void fireContainerAdded(ca.sqlpower.query.QueryChangeEvent evt)
           
protected  void fireContainerRemoved(ca.sqlpower.query.QueryChangeEvent evt)
           
protected  void fireItemAdded(ca.sqlpower.query.QueryChangeEvent evt)
           
protected  void fireItemPropertyChangeEvent(java.beans.PropertyChangeEvent evt)
           
protected  void fireItemRemoved(ca.sqlpower.query.QueryChangeEvent evt)
           
protected  void fireJoinAdded(ca.sqlpower.query.QueryChangeEvent evt)
           
protected  void fireJoinPropertyChangeEvent(java.beans.PropertyChangeEvent evt)
           
protected  void fireJoinRemoved(ca.sqlpower.query.QueryChangeEvent evt)
           
protected  void firePropertyChangeEvent(java.beans.PropertyChangeEvent evt)
           
 void generateNewUUID()
          Sets the UUID of this object to a newly generated UUID.
 java.lang.String generateQuery()
           
 ca.sqlpower.sql.CachedRowSet getCachedRowSet()
           
 java.util.List<? extends WabitObject> getChildren()
          Returns an unmodifiable list of the children in this WabitObject.
 ca.sqlpower.query.Container getConstantsContainer()
           
 ca.sqlpower.sqlobject.SQLDatabase getDatabase()
           
 ca.sqlpower.sql.JDBCDataSource getDataSource()
           
 ca.sqlpower.sqlobject.SQLDatabaseMapping getDBMapping()
           
 java.util.List<WabitObject> getDependencies()
          Returns a list of all WabitObjects that this Wabit object is dependent on.
 boolean getExecuteQueriesWithCrossJoins()
           
 java.util.List<ca.sqlpower.query.Container> getFromTableList()
           
 java.lang.String getGlobalWhereClause()
           
 java.util.Collection<ca.sqlpower.query.SQLJoin> getJoins()
           
 boolean getMoreResults()
           
 java.lang.String getName()
          Returns the short name for this object.
 java.util.List<ca.sqlpower.query.Item> getOrderByList()
           
 boolean getPromptForCrossJoins()
           
 java.sql.ResultSet getResultSet()
           
protected  java.util.List<ca.sqlpower.sql.CachedRowSet> getResultSets()
           
 int getRowLimit()
           
 java.util.List<ca.sqlpower.query.Item> getSelectedColumns()
           
 java.lang.String getStatement()
           
 int getStreamingRowLimit()
           
 int getUpdateCount()
           
 java.lang.String getUserModifiedQuery()
           
 WabitConstantsContainer getWabitConstantsContainer()
           
 WabitDataSource getWabitDataSource()
           
 int getZoomLevel()
           
 int indexOfSelectedItem(ca.sqlpower.query.Item item)
           
 boolean isAutomaticallyExecuting()
           
 boolean isGroupingEnabled()
           
 boolean isPhantomQuery()
          If this returns true then this query cache is a query that should not be hooked up to listeners.
 boolean isRunning()
          Returns true if this Wabit object is doing something in the background.
 boolean isScriptModified()
           
 boolean isStreaming()
           
 void moveItem(ca.sqlpower.query.Item movedColumn, int toIndex)
           
 void moveOrderBy(ca.sqlpower.query.Item item, int index)
           
 void moveOrderByItemToEnd(ca.sqlpower.query.Item item)
           
 void orderColumn(ca.sqlpower.query.Item item, ca.sqlpower.query.QueryImpl.OrderByArgument ordering)
           
protected  boolean removeChildImpl(WabitObject child)
          This is the object specific implementation of removeChild.
 void removeDependency(WabitObject dependency)
          Removes the given object as a dependency of this object.
 void removeItem(ca.sqlpower.query.Item col)
           
 void removeJoin(ca.sqlpower.query.SQLJoin joinLine)
           
 void removeQueryChangeListener(ca.sqlpower.query.QueryChangeListener l)
           
 void removeResultSetListener(ResultSetListener listener)
          Removes the given listener from the listener list.
 void removeTable(ca.sqlpower.query.Container table)
           
 void removeUserModifications()
           
 void reset()
           
 void selectItem(ca.sqlpower.query.Item item)
           
 void setAutomaticallyExecuting(boolean automaticallyExecute)
           
 void setDataSource(ca.sqlpower.sql.JDBCDataSource ds)
           
 boolean setDataSourceWithoutSideEffects(ca.sqlpower.sql.JDBCDataSource dataSource)
           
 void setDBMapping(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping)
           
 void setExecuteQueriesWithCrossJoins(boolean executeQueriesWithCrossJoins)
           
 void setGlobalWhereClause(java.lang.String whereClause)
           
 void setGroupingEnabled(boolean enabled)
           
 void setName(java.lang.String string)
          Sets the name for this object
 void setPromptForCrossJoins(boolean promptForCrossJoins)
           
 void setRowLimit(int rowLimit)
          This will set the row limit on the query.
 void setStreaming(boolean streaming)
           
 void setStreamingRowLimit(int streamingRowLimit)
           
 void setUserModifiedQuery(java.lang.String query)
           
 void setUUID(java.lang.String uuid)
           
 void setZoomLevel(int zoomLevel)
           
 void startCompoundEdit(java.lang.String message)
           
 java.lang.String toString()
           
 void unselectItem(ca.sqlpower.query.Item item)
           
 
Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject
addChild, addWabitListener, begin, beginTransaction, commit, commitTransaction, equals, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, getChildren, getParent, getSession, getUUID, isForegroundThread, removeChild, removeWabitListener, rollback, rollbackTransaction, runInBackground, runInForeground, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ca.sqlpower.query.Query
getUUID
 
Methods inherited from interface ca.sqlpower.wabit.WabitObject
addChild, addWabitListener, begin, commit, getChildren, getParent, getUUID, removeChild, removeWabitListener, rollback, setParent
 

Constructor Detail

QueryCache

public QueryCache(QueryCache q)
This makes a copy of the given query cache. The query in the given query cache has its listeners disconnected to prevent copies from being affected by user actions. This also makes cleanup of copies easier.


QueryCache

public QueryCache(QueryCache q,
                  boolean connectListeners)
This makes a copy of the given query cache. The query in the given query cache can have its listeners connected to allow using this query cache in the workspace.


QueryCache

public QueryCache(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping)
Creates a Query that caches the last set of results that were returned when during the last execution.

Parameters:
dbMapping - A mapping of SPDataSources to corresponding SQLDatabases that allows getting the connection pool in the SQLDatabase based on the connection defined by the SPDataSource.

QueryCache

public QueryCache(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping,
                  boolean prepopulateConstants)
Creates a Query that caches the last set of results that were returned when during the last execution.

Parameters:
dbMapping - A mapping of SPDataSources to corresponding SQLDatabases that allows getting the connection pool in the SQLDatabase based on the connection defined by the SPDataSource.
prepopulateConstants - True if the constants table should be pre-populated with some useful default constants, false otherwise.

QueryCache

public QueryCache(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping,
                  boolean prepopulateConstants,
                  WabitConstantsContainer newConstantsContainer)
Creates a Query that caches the last set of results that were returned when during the last execution.

See Also:
the query implementation constructor with the same args
Method Detail

executeStatement

public boolean executeStatement()
                         throws java.sql.SQLException
Executes the current SQL query, returning a cached copy of the result set. The returned copy of the result set is guaranteed to be scrollable. If the query is not streaming it does not hold any remote database resources. If the query is streaming then the connection and statement will be held open to continue streaming in values.

Specified by:
executeStatement in interface ca.sqlpower.swingui.query.StatementExecutor
Returns:
an in-memory copy of the result set produced by this query cache's current query. You are not required to close the returned result set when you are finished with it, but you can if you like.
Throws:
java.sql.SQLException - If the query fails to execute for any reason.

executeStatement

public boolean executeStatement(boolean fetchFullResults)
                         throws java.sql.SQLException
Executes the current SQL query, returning a cached copy of the result set that is either a subset of the full results, limited by the session's row limit, or the full result set. The returned copy of the result set is guaranteed to be scrollable. If the query is not streaming it does not hold any remote database resources. If the query is streaming then the connection and statement will be held open to continue streaming in values.

Parameters:
fullResultSet - If true the full result set will be retrieved. If false then a limited result set will be retrieved based on the session's row limit.
Returns:
an in-memory copy of the result set produced by this query cache's current query. You are not required to close the returned result set when you are finished with it, but you can if you like.
Throws:
java.sql.SQLException - If the query fails to execute for any reason.

cancel

public void cancel()
Cancels this query's execution if it is currently running. Cancellation is not guaranteed to work perfectly, because it is partly the underlying JDBC driver's responsibility to provide an effective implementation of Statement.cancel().

Specified by:
cancel in interface WabitBackgroundWorker

getResultSet

public java.sql.ResultSet getResultSet()
Specified by:
getResultSet in interface ca.sqlpower.swingui.query.StatementExecutor

getCachedRowSet

public ca.sqlpower.sql.CachedRowSet getCachedRowSet()

getResultSets

protected java.util.List<ca.sqlpower.sql.CachedRowSet> getResultSets()

getUpdateCount

public int getUpdateCount()
Specified by:
getUpdateCount in interface ca.sqlpower.swingui.query.StatementExecutor

getMoreResults

public boolean getMoreResults()
Specified by:
getMoreResults in interface ca.sqlpower.swingui.query.StatementExecutor

cleanup

public 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 WabitObject
Overrides:
cleanup in class AbstractWabitObject
Returns:
A collection of exceptions and errors that occurred during cleanup if any occurred.

getWabitDataSource

public WabitDataSource getWabitDataSource()

isRunning

public boolean isRunning()
Description copied from interface: WabitBackgroundWorker
Returns true if this Wabit object is doing something in the background.

Note to implementers: this method is likely to be used for inter-thread communication. Be sure to use proper synchronization when passing the flag between threads!

Specified by:
isRunning in interface WabitBackgroundWorker

allowsChildren

public boolean allowsChildren()
Description copied from interface: WabitObject
Returns true if this object may contain children. Not all types of WabitObjects can be a child to any WabitObject.

Specified by:
allowsChildren in interface WabitObject
See Also:
WabitObject.childPositionOffset(Class)

childPositionOffset

public int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
Description copied from interface: WabitObject
Returns the position in the list that would be returned by getChildren() that the first object of type childClass is, or where it would be if there were any children of that type.

Specified by:
childPositionOffset in interface WabitObject

getChildren

public java.util.List<? extends WabitObject> getChildren()
Description copied from interface: WabitObject
Returns an unmodifiable list of the children in this WabitObject. If there are no children in this WabitObject an empty list should be returned.

Specified by:
getChildren in interface WabitObject

toString

public java.lang.String toString()
Specified by:
toString in interface ca.sqlpower.query.Query
Overrides:
toString in class AbstractWabitObject

getDependencies

public java.util.List<WabitObject> getDependencies()
Description copied from interface: WabitObject
Returns a list of all WabitObjects that this Wabit object is dependent on. Children of a WabitObject are not dependencies and will not be returned in this list. If there are no objects this Wabit object is dependent on an empty list should be returned. These are only the immediate dependencies of this object. If you want to find the dependencies of this object's dependencies as well it may be useful to look at WorkspaceGraphModel to make a full graph of all of the dependencies.

Specified by:
getDependencies in interface WabitObject

removeDependency

public void removeDependency(WabitObject dependency)
Description copied from interface: WabitObject
Removes the given object as a dependency of this object. For this object to no longer be dependent on the given dependency all of its children must also not be dependent on the given dependency when this method returns. This may remove this object from its parent if necessary.

Specified by:
removeDependency in interface WabitObject

isPhantomQuery

public boolean isPhantomQuery()
If this returns true then this query cache is a query that should not be hooked up to listeners.


setPromptForCrossJoins

public void setPromptForCrossJoins(boolean promptForCrossJoins)

getPromptForCrossJoins

public boolean getPromptForCrossJoins()

setExecuteQueriesWithCrossJoins

public void setExecuteQueriesWithCrossJoins(boolean executeQueriesWithCrossJoins)

getExecuteQueriesWithCrossJoins

public boolean getExecuteQueriesWithCrossJoins()

setAutomaticallyExecuting

public void setAutomaticallyExecuting(boolean automaticallyExecute)

isAutomaticallyExecuting

public boolean isAutomaticallyExecuting()

removeChildImpl

protected boolean removeChildImpl(WabitObject child)
Description copied from class: AbstractWabitObject
This is the object specific implementation of removeChild. There are checks in the removeChild method to ensure the child being removed has no dependencies and is a child of this object.

Specified by:
removeChildImpl in class AbstractWabitObject
See Also:
AbstractWabitObject.removeChild(WabitObject)

addChildImpl

protected void addChildImpl(WabitObject child,
                            int index)
Description copied from class: AbstractWabitObject
This is the object specific implementation of #addChild(WabitObject). There are checks in the #addChild(WabitObject) method to ensure that the object given here is a valid child type of this object.

This method should be overwritten if children are allowed.

Overrides:
addChildImpl in class AbstractWabitObject
Parameters:
child - The child to add to this object.
index - The index to add the child at.

addResultSetListener

public void addResultSetListener(ResultSetListener listener)
Description copied from interface: ResultSetProducer
Adds the given listener to this result set producer's list of interested parties. Each listener on the list receives an event whenever a new result set is available (as a result of the query be executed).

Specified by:
addResultSetListener in interface ResultSetProducer
Parameters:
listener - The listener to add (must not be null).

removeResultSetListener

public void removeResultSetListener(ResultSetListener listener)
Description copied from interface: ResultSetProducer
Removes the given listener from the listener list. Has no effect if the given listener was not already on the list.

Specified by:
removeResultSetListener in interface ResultSetProducer
Parameters:
listener - The listener to remove. Nulls are ignored.

execute

public java.util.concurrent.Future<ResultSetAndUpdateCountCollection> execute()
                                                                       throws ResultSetProducerException
Description copied from interface: ResultSetProducer
Executes the current query represented by this object, returning the results from the query's execution.

Every call to this method causes a ResultSetEvent to be fired, whether or not the call simply returns the same cached results as a previous invocation.

If the query is in a state where it can't be executed (because it is not sufficiently configured to issue a sensible query, or because the connection to the data source can't be established), the event will still be fired if it results in a state change from the previous execution attempt. In these cases, the event will deliver a null ResultSet to listeners.

Implementations of ResultSetProducer are allowed to fire the ResultSetEvent while the query is locked against concurrent and/or recursive execution, so it is vitally important that ResultSetListeners do not attempt to re-execute the query in response to any ResultSetEvent. Such behaviour by ResultSetListeners is unsafe in general, and may cause deadlock.

Specified by:
execute in interface ResultSetProducer
Returns:
The results of executing of the query. If the query is not currently in a state where it can be executed, this method returns null and fires a ResultSetEvent with a null result set.
Throws:
ResultSetProducerException - If there was any problem obtaining the result set

getStatement

public java.lang.String getStatement()
Specified by:
getStatement in interface ca.sqlpower.swingui.query.StatementExecutor

generateQuery

public java.lang.String generateQuery()
Specified by:
generateQuery in interface ca.sqlpower.query.Query

containsCrossJoins

public boolean containsCrossJoins()
Specified by:
containsCrossJoins in interface ca.sqlpower.query.Query

isScriptModified

public boolean isScriptModified()
Specified by:
isScriptModified in interface ca.sqlpower.query.Query

setDataSource

public void setDataSource(ca.sqlpower.sql.JDBCDataSource ds)
Specified by:
setDataSource in interface ca.sqlpower.query.Query

setDataSourceWithoutSideEffects

public boolean setDataSourceWithoutSideEffects(ca.sqlpower.sql.JDBCDataSource dataSource)
Specified by:
setDataSourceWithoutSideEffects in interface ca.sqlpower.query.Query

getDataSource

public ca.sqlpower.sql.JDBCDataSource getDataSource()
Specified by:
getDataSource in interface ca.sqlpower.query.Query

setName

public void setName(java.lang.String string)
Description copied from interface: WabitObject
Sets the name for this object

Specified by:
setName in interface ca.sqlpower.query.Query
Specified by:
setName in interface WabitObject
Overrides:
setName in class AbstractWabitObject

getName

public java.lang.String getName()
Description copied from interface: WabitObject
Returns the short name for this object.

Specified by:
getName in interface ca.sqlpower.query.Query
Specified by:
getName in interface WabitObject
Overrides:
getName in class AbstractWabitObject

setDBMapping

public void setDBMapping(ca.sqlpower.sqlobject.SQLDatabaseMapping dbMapping)
Specified by:
setDBMapping in interface ca.sqlpower.query.Query

getStreamingRowLimit

public int getStreamingRowLimit()
Specified by:
getStreamingRowLimit in interface ca.sqlpower.query.Query

setStreamingRowLimit

public void setStreamingRowLimit(int streamingRowLimit)
Specified by:
setStreamingRowLimit in interface ca.sqlpower.query.Query

isStreaming

public boolean isStreaming()
Specified by:
isStreaming in interface ca.sqlpower.query.Query

setRowLimit

public void setRowLimit(int rowLimit)
This will set the row limit on the query. This also clears the cache.

Specified by:
setRowLimit in interface ca.sqlpower.query.Query

addItem

public void addItem(ca.sqlpower.query.Item col)
Specified by:
addItem in interface ca.sqlpower.query.Query

addJoin

public void addJoin(ca.sqlpower.query.SQLJoin join)
Specified by:
addJoin in interface ca.sqlpower.query.Query

addQueryChangeListener

public void addQueryChangeListener(ca.sqlpower.query.QueryChangeListener l)
Specified by:
addQueryChangeListener in interface ca.sqlpower.query.Query

addTable

public void addTable(ca.sqlpower.query.Container container)
Specified by:
addTable in interface ca.sqlpower.query.Query

addTable

public void addTable(ca.sqlpower.query.Container container,
                     int index)
Specified by:
addTable in interface ca.sqlpower.query.Query

setUserModifiedQuery

public void setUserModifiedQuery(java.lang.String query)
Specified by:
setUserModifiedQuery in interface ca.sqlpower.query.Query

getUserModifiedQuery

public java.lang.String getUserModifiedQuery()
Specified by:
getUserModifiedQuery in interface ca.sqlpower.query.Query

endCompoundEdit

public void endCompoundEdit()
Specified by:
endCompoundEdit in interface ca.sqlpower.query.Query

getConstantsContainer

public ca.sqlpower.query.Container getConstantsContainer()
Specified by:
getConstantsContainer in interface ca.sqlpower.query.Query

getDatabase

public ca.sqlpower.sqlobject.SQLDatabase getDatabase()
Specified by:
getDatabase in interface ca.sqlpower.query.Query

getDBMapping

public ca.sqlpower.sqlobject.SQLDatabaseMapping getDBMapping()
Specified by:
getDBMapping in interface ca.sqlpower.query.Query

getFromTableList

public java.util.List<ca.sqlpower.query.Container> getFromTableList()
Specified by:
getFromTableList in interface ca.sqlpower.query.Query

getGlobalWhereClause

public java.lang.String getGlobalWhereClause()
Specified by:
getGlobalWhereClause in interface ca.sqlpower.query.Query

getJoins

public java.util.Collection<ca.sqlpower.query.SQLJoin> getJoins()
Specified by:
getJoins in interface ca.sqlpower.query.Query

getOrderByList

public java.util.List<ca.sqlpower.query.Item> getOrderByList()
Specified by:
getOrderByList in interface ca.sqlpower.query.Query

getRowLimit

public int getRowLimit()
Specified by:
getRowLimit in interface ca.sqlpower.query.Query

getSelectedColumns

public java.util.List<ca.sqlpower.query.Item> getSelectedColumns()
Specified by:
getSelectedColumns in interface ca.sqlpower.query.Query

getZoomLevel

public int getZoomLevel()
Specified by:
getZoomLevel in interface ca.sqlpower.query.Query

isGroupingEnabled

public boolean isGroupingEnabled()
Specified by:
isGroupingEnabled in interface ca.sqlpower.query.Query

moveItem

public void moveItem(ca.sqlpower.query.Item movedColumn,
                     int toIndex)
Specified by:
moveItem in interface ca.sqlpower.query.Query

moveOrderBy

public void moveOrderBy(ca.sqlpower.query.Item item,
                        int index)
Specified by:
moveOrderBy in interface ca.sqlpower.query.Query

moveOrderByItemToEnd

public void moveOrderByItemToEnd(ca.sqlpower.query.Item item)
Specified by:
moveOrderByItemToEnd in interface ca.sqlpower.query.Query

removeItem

public void removeItem(ca.sqlpower.query.Item col)
Specified by:
removeItem in interface ca.sqlpower.query.Query

removeJoin

public void removeJoin(ca.sqlpower.query.SQLJoin joinLine)
Specified by:
removeJoin in interface ca.sqlpower.query.Query

removeQueryChangeListener

public void removeQueryChangeListener(ca.sqlpower.query.QueryChangeListener l)
Specified by:
removeQueryChangeListener in interface ca.sqlpower.query.Query

removeTable

public void removeTable(ca.sqlpower.query.Container table)
Specified by:
removeTable in interface ca.sqlpower.query.Query

removeUserModifications

public void removeUserModifications()
Specified by:
removeUserModifications in interface ca.sqlpower.query.Query

reset

public void reset()
Specified by:
reset in interface ca.sqlpower.query.Query

setGlobalWhereClause

public void setGlobalWhereClause(java.lang.String whereClause)
Specified by:
setGlobalWhereClause in interface ca.sqlpower.query.Query

setGroupingEnabled

public void setGroupingEnabled(boolean enabled)
Specified by:
setGroupingEnabled in interface ca.sqlpower.query.Query

setStreaming

public void setStreaming(boolean streaming)
Specified by:
setStreaming in interface ca.sqlpower.query.Query

setZoomLevel

public void setZoomLevel(int zoomLevel)
Specified by:
setZoomLevel in interface ca.sqlpower.query.Query

startCompoundEdit

public void startCompoundEdit(java.lang.String message)
Specified by:
startCompoundEdit in interface ca.sqlpower.query.Query

indexOfSelectedItem

public int indexOfSelectedItem(ca.sqlpower.query.Item item)
Specified by:
indexOfSelectedItem in interface ca.sqlpower.query.Query

selectItem

public void selectItem(ca.sqlpower.query.Item item)
Specified by:
selectItem in interface ca.sqlpower.query.Query

unselectItem

public void unselectItem(ca.sqlpower.query.Item item)
Specified by:
unselectItem in interface ca.sqlpower.query.Query

orderColumn

public void orderColumn(ca.sqlpower.query.Item item,
                        ca.sqlpower.query.QueryImpl.OrderByArgument ordering)
Specified by:
orderColumn in interface ca.sqlpower.query.Query

fireJoinAdded

protected void fireJoinAdded(ca.sqlpower.query.QueryChangeEvent evt)

fireJoinRemoved

protected void fireJoinRemoved(ca.sqlpower.query.QueryChangeEvent evt)

fireJoinPropertyChangeEvent

protected void fireJoinPropertyChangeEvent(java.beans.PropertyChangeEvent evt)

firePropertyChangeEvent

protected void firePropertyChangeEvent(java.beans.PropertyChangeEvent evt)

fireCompoundEditStarted

protected void fireCompoundEditStarted(ca.sqlpower.util.TransactionEvent evt)

fireCompoundEditEnded

protected void fireCompoundEditEnded(ca.sqlpower.util.TransactionEvent evt)

fireItemPropertyChangeEvent

protected void fireItemPropertyChangeEvent(java.beans.PropertyChangeEvent evt)

fireItemAdded

protected void fireItemAdded(ca.sqlpower.query.QueryChangeEvent evt)

fireItemRemoved

protected void fireItemRemoved(ca.sqlpower.query.QueryChangeEvent evt)

fireContainerRemoved

protected void fireContainerRemoved(ca.sqlpower.query.QueryChangeEvent evt)

fireContainerAdded

protected void fireContainerAdded(ca.sqlpower.query.QueryChangeEvent evt)

getWabitConstantsContainer

public WabitConstantsContainer getWabitConstantsContainer()

setUUID

public void setUUID(java.lang.String uuid)
Specified by:
setUUID in interface WabitObject
Overrides:
setUUID in class AbstractWabitObject

generateNewUUID

public void generateNewUUID()
Description copied from interface: WabitObject
Sets the UUID of this object to a newly generated UUID. This is necessary if the object is being cloned or copied to a new workspace.

Specified by:
generateNewUUID in interface WabitObject
Overrides:
generateNewUUID in class AbstractWabitObject


Copyright © 2009. All Rights Reserved.