com.f1j.ss
Interface DataBase

All Known Implementing Classes:
com.f1j.ss.filter.DatabaseImpl

public interface DataBase

This interface provides API for extracting data based on a set of selection criteria from one range and inserting it into another range of cells for display.

The interface uses three range types (Database, Criteria, and Extract):

Data is updated when the extract() method is called.

See Also:
com.f1j.data

Method Summary
 void extract()
          Applies the Criteria range to rows in the Database Range.
 int getCountLastRowsSelected()
          Returns the index number of the last row selected during the extract process.
 java.lang.String getCriteriaRange()
          Returns the last Criteria range successfully set.
 java.lang.String getDatabaseRange()
          Returns the last Database range successfully set.
 java.lang.String getExtractRange()
          Returns the last Extract range successfully set.
 void setCriteria(Sheet sheet, java.lang.String infix)
          Sets the Criteria range, in US English
 void setCriteriaLocal(Sheet sheet, java.lang.String infix)
          Sets the Criteria range, in the user's local language.
 void setDatabase(Sheet sheet, java.lang.String infix)
          Sets the Database range, in US English.
 void setDatabaseLocal(Sheet sheet, java.lang.String infix)
          Sets the Database range, in the user's local language.
 void setExtract(Sheet sheet, java.lang.String infix)
          Sets the Extract range, in US English.
 void setExtractLocal(Sheet sheet, java.lang.String infix)
          Sets the Extract range, in the user's local language.
 

Method Detail

extract

public void extract()
             throws F1Exception
Applies the Criteria range to rows in the Database Range. Copies selected rows to the Extract Range.
Throws:
F1Exception - in the event of any of the following:
  • label row entry is empty or not text in criteria or extract range.
  • criteria or extract label text does not match a label in Database range.
  • the Database, Criteria, or Extract range were not successfully set before this call.
  • there is insufficient room in the Extract range for copying all selected rows.
See Also:
setCriteria(com.f1j.ss.Sheet, java.lang.String), setDatabase(com.f1j.ss.Sheet, java.lang.String), setExtract(com.f1j.ss.Sheet, java.lang.String)

getCountLastRowsSelected

public int getCountLastRowsSelected()
Returns the index number of the last row selected during the extract process.
Returns:
an integer indicating the index number of the last row.
See Also:
setExtract(com.f1j.ss.Sheet, java.lang.String)

getCriteriaRange

public java.lang.String getCriteriaRange()
Returns the last Criteria range successfully set.
Returns:
a String containing the range.
See Also:
setCriteria(com.f1j.ss.Sheet, java.lang.String)

getDatabaseRange

public java.lang.String getDatabaseRange()
Returns the last Database range successfully set.
Returns:
a String containing the range.
See Also:
setDatabase(com.f1j.ss.Sheet, java.lang.String)

getExtractRange

public java.lang.String getExtractRange()
Returns the last Extract range successfully set.
Returns:
a String containing the range.
See Also:
setExtract(com.f1j.ss.Sheet, java.lang.String)

setCriteria

public void setCriteria(Sheet sheet,
                        java.lang.String infix)
                 throws F1Exception
Sets the Criteria range, in US English
Parameters:
sheet - Worksheet containing the range or in the same group as the worksheet containing the range.
infix - String containing text description of the range in the form "sheet!range", or "range" if in the same sheet.
Throws:
F1Exception - if infix does not contain exactly 1 valid range.
See Also:
getCriteriaRange()

setCriteriaLocal

public void setCriteriaLocal(Sheet sheet,
                             java.lang.String infix)
                      throws F1Exception
Sets the Criteria range, in the user's local language.
Parameters:
sheet - Worksheet containing the range or in the same group as the worksheet containing the range.
infix - String containing text description of the range in the form "sheet!range", or "range" if in the same sheet.
Throws:
F1Exception - if "infix" does not contain exactly 1 valid range.
See Also:
getCriteriaRange()

setDatabase

public void setDatabase(Sheet sheet,
                        java.lang.String infix)
                 throws F1Exception
Sets the Database range, in US English.
Parameters:
sheet - Worksheet containing the range or in the same group as the worksheet containing the range.
infix - String containing text description of the range in the form "sheet!range", or "range" if in the same sheet.
Throws:
F1Exception - if "infix" does not contain exactly 1 valid range.
See Also:
getDatabaseRange()

setDatabaseLocal

public void setDatabaseLocal(Sheet sheet,
                             java.lang.String infix)
                      throws F1Exception
Sets the Database range, in the user's local language.
Parameters:
sheet - Worksheet containing the range or in the same group as the worksheet containing the range.
infix - String containing text description of the range in the form "sheet!range", or "range" if in the same sheet.
Throws:
F1Exception - if "infix" does not contain exactly 1 valid range.
See Also:
getDatabaseRange()

setExtract

public void setExtract(Sheet sheet,
                       java.lang.String infix)
                throws F1Exception
Sets the Extract range, in US English.
Parameters:
sheet - Worksheet containing the range or in the same group as the worksheet containing the range.
infix - String containing text description of the range in the form "sheet!range", or "range" if in the same sheet.
Throws:
F1Exception - if "infix" does not contain exactly 1 valid range.
See Also:
getExtractRange()

setExtractLocal

public void setExtractLocal(Sheet sheet,
                            java.lang.String infix)
                     throws F1Exception
Sets the Extract range, in the user's local language.
Parameters:
sheet - Worksheet containing the range or in the same group as the worksheet containing the range.
infix - String containing text description of the range in the form "sheet!range", or "range" if in the same sheet.
Throws:
F1Exception - if "infix" does not contain exactly 1 valid range.
See Also:
getExtractRange()