com.f1j.data
Interface DataQueryCollection


public interface DataQueryCollection

This interface defines the API to a collection of data queries. A list of listening data queries is mantained by the collection.


Method Summary
 void clear()
          Clears the current DataQueryCollection of all queries.
 void delete(DataQuery query)
          Deletes a data query from the collection.
 void delete(java.lang.String name)
          Deletes a data query from the collection.
 DataQuery factory(java.lang.String name)
          Creates a data query and adds it to this collection of data queries.
 DataQuery find(DataRange range)
          Returns the data query in this collection which has the specified data range registered as listening to it.
 DataQuery find(java.lang.String name)
          Returns the data query with the specified name in this collection.
 java.lang.String generateName()
          Generates a unique (one that is not already contained in this collection) name for a new data query.
 DataQuery[] get()
          Returns a list of data queries in this DataQueryCollection.
 Source getDataSource()
          Returns the data source associated with this DataQueryCollection.
 java.lang.String[] getNames()
          Returns a list of the names of queries in this collection, ordered by the queries' refresh indexes.
 boolean isEmpty()
          Returns whether the current data query collection contains any queries.
 boolean isNameValid(java.lang.String name)
          Returns whether or not the specified name is valid for a new query to be added to this collection.
 boolean isParameterRequired(java.lang.String paramName)
          Returns whether this query requires the specified report parameter.
 boolean isParameterUsed(java.lang.String paramName)
          Returns whether this collection uses the specified report parameter.
 

Method Detail

getDataSource

public Source getDataSource()
Returns the data source associated with this DataQueryCollection.
Returns:
a Source object.
See Also:
Source, factory(java.lang.String)

factory

public DataQuery factory(java.lang.String name)
                  throws F1Exception
Creates a data query and adds it to this collection of data queries.
Parameters:
name - the name of the DataQuery object. This name must be unique within this collection.
Throws:
F1Exception - if the parameter is invalid
See Also:
DataQuery, getDataSource()

get

public DataQuery[] get()
Returns a list of data queries in this DataQueryCollection. The returned list will be ordered according to the DataQuery refresh index.
Returns:
an integer array of the index numbers of all data queries linked with this workbook.
See Also:
DataQuery, DataQuery.setRefreshIndex(int)

delete

public void delete(DataQuery query)
Deletes a data query from the collection. Disconnects any data ranges listening to this query, but leaves the data ranges on the worksheet intact.
Parameters:
query - the data query object to delete.
See Also:
delete(String name)

delete

public void delete(java.lang.String name)
Deletes a data query from the collection. Disconnects any data ranges listening to this query, but leaves the data ranges on the worksheet intact.
Parameters:
name - the name of the data query to delete.
See Also:
delete(com.f1j.data.query.DataQuery query)

clear

public void clear()
Clears the current DataQueryCollection of all queries. Disconnects any data ranges listening to any of the queries in this collection, but leaves the data ranges on the worksheet intact.
See Also:
delete(com.f1j.data.query.DataQuery)

isEmpty

public boolean isEmpty()
Returns whether the current data query collection contains any queries.
Returns:
boolean. true = contains no queries. false = contains one or more queries.
See Also:
find(java.lang.String)

isParameterRequired

public boolean isParameterRequired(java.lang.String paramName)
Returns whether this query requires the specified report parameter.
Returns:
boolean true = collection requires the specified parameter.

isParameterUsed

public boolean isParameterUsed(java.lang.String paramName)
Returns whether this collection uses the specified report parameter.
Returns:
boolean true = collection uses the specified parameter.

find

public DataQuery find(java.lang.String name)
Returns the data query with the specified name in this collection.
Parameters:
name - the data query name as a text string.
Returns:
the specified DataQuery object, or null if a query with that name does not exist.
See Also:
find(com.f1j.data.DataRange range), isEmpty()

find

public DataQuery find(DataRange range)
Returns the data query in this collection which has the specified data range registered as listening to it.
Parameters:
range - a DataRange object specifying the range, or null if a query cannot be found which has the specified data range listening to it.
Returns:
a DataQuery object.
See Also:
find(String name), isEmpty()

getNames

public java.lang.String[] getNames()
Returns a list of the names of queries in this collection, ordered by the queries' refresh indexes.
Returns:
a string array of query names.
See Also:
find(java.lang.String), isEmpty()

generateName

public java.lang.String generateName()
Generates a unique (one that is not already contained in this collection) name for a new data query.
Returns:
String unique query name

isNameValid

public boolean isNameValid(java.lang.String name)
Returns whether or not the specified name is valid for a new query to be added to this collection.
Returns:
boolean true if the name is valid.