com.f1j.ss.pivot
Interface DataSourceInfo


public interface DataSourceInfo
extends Lockable

This interface defines the API for identifying the type and location of the source data that is to be used in the PivotRange.

Since:
11.0

Inner Class Summary
static class DataSourceInfo.EType
          Enumeration class for defining data source types.
 
Method Summary
 DataQuery getDataQuery()
          Returns the e.Spreadsheet query that should be used for the PivotRange being defined.
 Range getList()
          Returns the Excel list that should be used for the PivotRange being defined.
 java.lang.String getListString()
          Returns the Excel list that should be used for the PivotRange being defined.
 java.lang.String getListStringLocal()
          Returns the Excel list that should be used for the PivotRange being defined.
 int getPivotRangeCount()
          Returns the number of PivotRanges in the current book.
 java.lang.String getPivotRangeDisplayName(PivotRange pivotRange)
          Returns a fully qualified name for the specified PivotRange.
 PivotRange[] getPivotRanges()
          Returns an array of the PivotRanges in the current book.
 PivotRange getSourcePivotRange()
          Returns the existing PivotRange that will be used as the data source for the PivotRange being defined.
 DataSourceInfo.EType getType()
          Returns the type of data source that will be used for PivotRange that is being defined.
 void setDataQuery(DataQuery query)
          Sets the e.Spreadsheet query that should be used for the PivotRange being defined.
 void setList(Range range)
          Sets the Excel list that should be used for the PivotRange being defined.
 void setList(Sheet sheet, int top, int left, int bottom, int right)
          Sets the Excel list that should be used for the PivotRange being defined.
 void setList(java.lang.String str)
          Sets the Excel list that should be used for the PivotRange being defined.
 void setListLocal(java.lang.String str)
          Sets the Excel list that should be used for the PivotRange being defined.
 void setSourcePivotRange(PivotRange pivotRange)
          Set the PivotRange that will be used as the data source for the PivotRange being defined.
 void setType(DataSourceInfo.EType type)
          Sets the type of data source that should be used for the PivotRange that is being defined.
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

getDataQuery

public DataQuery getDataQuery()
                       throws InvalidStateException,
                              F1Exception
Returns the e.Spreadsheet query that should be used for the PivotRange being defined. This is only valid when the type is set to EType.eF1ExternalData.
Returns:
The e.Spreadsheet query.
Throws:
InvalidStateException - if the source is not an e.Spreadsheet query.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataQuery, DataSourceInfo.EType.eF1ExternalData, PivotRange

getList

public Range getList()
              throws InvalidStateException,
                     F1Exception
Returns the Excel list that should be used for the PivotRange being defined. This is only valid when the type is set to EType.eList.
Returns:
A range identifying the Excel list.
Throws:
InvalidStateException - if the source is not a list.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.eList, PivotRange

getListString

public java.lang.String getListString()
                               throws InvalidStateException,
                                      F1Exception
Returns the Excel list that should be used for the PivotRange being defined. This is only valid when the type is set to EType.eList.
Returns:
A formula identifying the Excel list in US English.
Throws:
InvalidStateException - if the source is not a list.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.eList, PivotRange

getListStringLocal

public java.lang.String getListStringLocal()
                                    throws InvalidStateException,
                                           F1Exception
Returns the Excel list that should be used for the PivotRange being defined. This is only valid when the type is set to EType.eList.
Returns:
A formula identifying the Excel list in the user's language.
Throws:
InvalidStateException - if the source is not a list.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.eList, PivotRange

getPivotRangeCount

public int getPivotRangeCount()
Returns the number of PivotRanges in the current book.
Returns:
The number of PivotRanges in the current book.
Since:
11.0
See Also:
PivotRange

getPivotRangeDisplayName

public java.lang.String getPivotRangeDisplayName(PivotRange pivotRange)
Returns a fully qualified name for the specified PivotRange. This is for display purposes only. It cannot be used in a formula.
Returns:
A fully qualifed PivotRange name.
Since:
11.0
See Also:
PivotRange

getPivotRanges

public PivotRange[] getPivotRanges()
                            throws InvalidStateException,
                                   F1Exception
Returns an array of the PivotRanges in the current book.
Returns:
Array of PivotRanges in current book.
Throws:
InvalidStateException - if trying to set source to PivotRange, but no PivotRanges exist.
F1Exception - if an error occurs.
Since:
11.0
See Also:
PivotRange

getSourcePivotRange

public PivotRange getSourcePivotRange()
                               throws InvalidStateException,
                                      F1Exception
Returns the existing PivotRange that will be used as the data source for the PivotRange being defined. This is only valid when the type is set to EType.ePivotRange.
Returns:
The existing PivotRange that is to be used as the data source.
Throws:
InvalidStateException - if trying to set source to PivotRange, but no PivotRanges exist.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.ePivotRange, PivotRange

getType

public DataSourceInfo.EType getType()
Returns the type of data source that will be used for PivotRange that is being defined.
Returns:
Enumeration indicating the data source type.
Since:
11.0
See Also:
PivotRange

setDataQuery

public void setDataQuery(DataQuery query)
                  throws InvalidArgumentException,
                         F1Exception
Sets the e.Spreadsheet query that should be used for the PivotRange being defined. The type will be set to EType.eF1ExternalData.
Parameters:
query - The e.Spreadsheet query.
Throws:
InvalidArgumentException - if the query is invalid.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataQuery, DataSourceInfo.EType.eF1ExternalData, PivotRange

setList

public void setList(Range range)
             throws SelectionException,
                    InvalidArgumentException,
                    F1Exception
Sets the Excel list that should be used for the PivotRange being defined. The type will be set to EType.eList.
Parameters:
range - The range identifying the Excel list.
Throws:
SelectionException - if list is not a single area on a single sheet.
InvalidArgumentException - if range is invalid.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.eList, PivotRange

setList

public void setList(Sheet sheet,
                    int top,
                    int left,
                    int bottom,
                    int right)
             throws SelectionException,
                    InvalidArgumentException,
                    F1Exception
Sets the Excel list that should be used for the PivotRange being defined. The type will be set to EType.eList.
Parameters:
sheet - The worksheet where the list resides.
top - The first row of the list.
left - The first column of the list.
bottom - The last row of the list.
right - The last column of the list.
Throws:
SelectionException - if list is not a single area on a single sheet.
InvalidArgumentException - if range is invalid.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.eList, PivotRange

setList

public void setList(java.lang.String str)
             throws SelectionException,
                    F1Exception
Sets the Excel list that should be used for the PivotRange being defined. The type will be set to EType.eList. The formula should be in US English.
Parameters:
str - A formula identifying the Excel list.
Throws:
SelectionException - if list is not a single area on a single sheet.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.eList, PivotRange

setListLocal

public void setListLocal(java.lang.String str)
                  throws SelectionException,
                         F1Exception
Sets the Excel list that should be used for the PivotRange being defined. The type will be set to EType.eList. The formula should be in the user's language.
Parameters:
str - A formula identifying the Excel list.
Throws:
SelectionException - if list is not a single area on a single sheet.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.eList, PivotRange

setSourcePivotRange

public void setSourcePivotRange(PivotRange pivotRange)
                         throws InvalidStateException,
                                F1Exception
Set the PivotRange that will be used as the data source for the PivotRange being defined. The type will be set to EType.ePivotRange.
Parameters:
pivotRange - The PivotRange that is to be used as the data source.
Throws:
InvalidStateException - if trying to set source to PivotRange, but no PivotRanges exist.
F1Exception - if an error occurs.
Since:
11.0
See Also:
DataSourceInfo.EType.ePivotRange, PivotRange

setType

public void setType(DataSourceInfo.EType type)
             throws InvalidStateException,
                    F1Exception
Sets the type of data source that should be used for the PivotRange that is being defined.
Parameters:
type - An enumeration indicating the data source type.
Throws:
InvalidStateException - if trying to set source to PivotRange, but no PivotRanges exist.
F1Exception - if an error occurs.
Since:
11.0
See Also:
PivotRange