|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Lov
The Lov
interface exposes a List Of Values associated with a universe object.
In Web Intelligence, lists of values are used when handling Prompts
or when providing drill filters. In both situations, the Web Intelligence user can select
a particular value or values to focus the query or filter.
Lists of values are associated when a universe is created using Universe Designer. The values in the list can be either entered manually by the designer or generated directly from the database. A List Of Values can be refreshed to ensure it contains the latest values from the database.
The Lov
interface contains methods for dividing long lists of values into manageable
'chunks' or 'batches'. Rather than retrieve all the values for the object, which for objects
like customer_name could be thousands of entries long, you can retrieve just a portion of
them. By doing this, you can reduce the amount of time it takes to display the List Of Values.
For even better performance it is possible to restrict the number of values returned in a
List Of Values by using search mode. When search mode
is enabled
only those values that match a specific pattern (string) are returned with the List Of Values.
Another tool for managing a List of Values is the multi-column feature. Universe designers can
define a number of columns for each value, these extra columns are used to provide a context to
help users distinguish between entries. For example, the List Of Values for 'town' could
have a column added to indicate 'country' or 'state'. These extra columns are not used by the
List Of Values, but are stored there to help users find the correct value in the list.
Each value in a multi-column list is represented by the RowValue
class.
RowValue
,
DocumentInstance
,
Prompt
,
DrillBarObject
,
DrillDetail
,
DrillDimension
Method Summary | |
---|---|
void |
close()
Releases the Lov definition (Lov identifier, search pattern, chunk size etc) and all values. |
Values |
getAllValues()
Returns all the values in this List Of Values. |
java.lang.String |
getBatchName(int index)
Returns the name of the batch at a specified index. |
java.lang.String[] |
getBatchNames()
Returns the names of all the different batch contained in the List Of Values. |
int |
getBatchSize()
Returns the number of Value objects (rows) in a Lov
batch or chunk. |
int |
getCurrentBatchIndex()
Returns the index of the current batch or chunk. |
java.lang.String |
getCurrentBatchName()
Returns the name of the current batch or chunk. |
java.util.Date |
getDate()
Returns the last refresh date. |
java.lang.String |
getFormattedDate()
Returns the last refresh date formatted with the document's content locale. |
java.lang.String |
getID()
Returns the identifier for this Lov instance. |
LovDisplayType |
getLovDisplayType()
Returns a LovDisplayType instance associated to this Lov . |
LovType |
getLovType()
Returns the LovType associated to this Lov instance. |
int |
getMaxColumns()
Returns the number of columns in the List Of Values. |
Prompts |
getNestedPrompts()
Returns the nested prompts for this List Of Values. |
boolean |
getSearchMatchCase()
Returns a boolean value indicating whether case-sensitive LOV
searching is activated. |
java.lang.String |
getSearchPattern()
Returns the search pattern. |
int |
getSortedColumnIndex()
Returns the index of the column on which the sort is applied. |
SortType |
getSortType()
Returns the SortType applied on a specific
column. |
Values |
getValues(int batchIndex)
Returns all the values in a particular batch or chunk. |
boolean |
isDelegated()
Returns true if the universe defines this Lov as delegated
search, that means that the list of values is resolved by data
base with the given user input pattern. |
boolean |
isPartialResult()
Checiks if Lov.getAllValues() returns a partial
result. |
boolean |
isSearchActive()
Returns true if search mode is active. |
boolean |
isSorted()
Returns true if a sort is applied to any of the columns in
the Lov . |
boolean |
mustFillNestedPrompts()
Determines if there are unfilled nested prompts values. |
void |
refresh()
Refreshes the List Of Values. |
void |
setAutoRefresh(boolean autoRefresh)
Controls whether the server automatically retrieves values from the database when calling Lov.getValues(int) or Lov.getAllValues() . |
void |
setBatchSize(int size)
Sets the number of Value objects in a batch or chunk. |
void |
setNestedPrompts()
Sets the nested prompts values for a Prompt on a List Of Values. |
void |
setSearchMatchCase(boolean matchCase)
Set to false to inactivate case-sensitive LOV searching. |
void |
setSearchMode(boolean active)
Set to true to activate search mode. |
void |
setSearchPattern(java.lang.String pattern)
Sets the search pattern. |
void |
setSortedColumnIndex(int columnIndex)
Sets the column to which the sort will be applied. |
void |
setSortType(SortType type)
Changes the SortType applied on a column in the Lov . |
void |
setSortType(SortType type,
int columnIndex)
Sets a sort on a specific column in the List Of Values. |
Method Detail |
---|
int getCurrentBatchIndex()
java.lang.String getCurrentBatchName()
int getMaxColumns()
Values getAllValues()
You can use the search feature of Lov to filter the values returned. Note that you need to make sure the search feature is inactive to retrieve all the possible values in the list.
Values
in the List of Values.Values
,
Lov.setSearchMode(boolean)
,
Lov.isSearchActive()
,
Lov.setSearchMatchCase(boolean)
java.lang.String[] getBatchNames()
java.lang.String getBatchName(int index)
Note: call Lov.getBatchNames()
to retrieve than one batch name.
Values getValues(int batchIndex)
Use the Lov
interface search feature to filter the values returned.
Note: Make sure the search feature is inactive, to retrieve all
possible values contained in the chunk at index batchIndex
.
batchIndex
- The index of the batch to be retrieved.
Values
in the chunk at index batchIndex
.Lov.setBatchSize(int)
,
Values
boolean isSearchActive()
true
if search mode is active.
true
if search mode is active.void setSearchMode(boolean active)
true
to activate search mode.
Note: this method must be called before
setting a search pattern
.
active
- Set to true
to activate search mode;
false
for search mode to be disabled.
java.lang.IllegalArgumentException
- while turn off search mode for delegated search.Lov.isSearchActive()
,
Lov.setSearchMatchCase(boolean)
LovType getLovType()
LovType
associated to this Lov
instance.
A description of the different possible LovType
can be found
here
.
This method will always return LovType.LOV_OBJECT
if ReportEngine.getCanEditDocument()
returns false
. That is to say, the ReportEngine
instance
was opened to run Desktop Intelligence documents.
Lov
instance.DocumentInstance.getLOV(String objID, LovType type)
,
LovType
java.lang.String getSearchPattern()
void setSearchPattern(java.lang.String pattern)
To use the search facility you need to activate it with Lov.setSearchMode. Use Lov.getValues and Lov.getAllValues to get the values in the list that match the pattern.
You can use the following wild card characters in the pattern string:
? : 0 or 1 character * : 0 or n characters
For example, "M?Greggor"
finds the value McGreggor, and "M*Greggor"
finds
the values McGreggor and MacGreggor.
Note: Remember that the results of getValues
and getAllValues
will continue to be filtered using this search pattern until you disable search
mode using Lov.setSearchMode
.
pattern
- the pattern used to filter the results of getAllValues and getValuesLov.isSearchActive()
,
Lov.setSearchMode(boolean)
,
Lov.getAllValues()
,
Lov.getValues(int)
boolean isSorted()
true
if a sort is applied to any of the columns in
the Lov
.
true
if a sort has been applied; false
if their is
no sort.Lov.setSortedColumnIndex(int)
,
Lov.setSortedColumnIndex(int)
void setSortType(SortType type, int columnIndex)
type
- The SortType
to be applied.columnIndex
- The index of the column to be sorted.Lov.setSortType(SortType type)
,
SortType
void setSortType(SortType type)
SortType
applied on a column in the Lov
.
The column on which the sort is applied is set using Lov.setSortedColumnIndex(int)
or Lov.setSortType(SortType, int)
.
type
- The SortType
to be applied to the Lov
.Lov.setSortType(SortType type, int columnIndex)
,
Lov.setSortedColumnIndex(int)
,
SortType
SortType getSortType()
SortType
applied on a specific
column.
SortType
applied to the List Of Values.SortType
int getSortedColumnIndex()
For single-column lists of values, this method returns 0.
Lov.getSortType()
void setSortedColumnIndex(int columnIndex)
Once you have set the column that you want to sort, set the type of
sort using Lov.setSortType(SortType)
.
columnIndex
- The index of the column on which the sort is to be applied.Lov.setSortType(SortType, int)
void refresh()
This method sets a flag so that the next time you use Lov.getValues or Lov.getAllValues the values in the list are refreshed by default.
Lov.getValues(int)
,
Lov.getAllValues()
java.lang.String getID()
Lov
instance.
DocumentInstance.getLOV(String, LovType, DataProvider)
int getBatchSize()
Value
objects (rows) in a Lov
batch or chunk.
The default batch size is 1000.
Lov.setBatchSize(int)
void setBatchSize(int size)
Value
objects in a batch or chunk.
The default batch size is 1000.
The size of the Values
object to be returned by Lov.getValues is
determined by setting Lov.BatchSize. For example, for a Lov that has one hundred rows,
If Lov.setBatchSize
is set to 1O, a subsequent call of Lov.getValues(3)
will return a Values
object containing rows 30 to 39 from the
List Of Values.
Calling Lov.getAllValues
will retrieve a Values
object
containing all rows of data in the Lov
.
If you want to return all the values in the List Of Values, set the batch size to -1.
size
- The size of the batches in which the Lov
is to be divided.Lov.getBatchSize()
,
Lov.getValues(int)
boolean mustFillNestedPrompts()
true
if at least one prompt must be filled;
false otherwiseDocumentInstance.getMustFillPrompts()
Prompts getNestedPrompts()
Lov.mustFillNestedPrompts()
,
Prompts
void setNestedPrompts()
Prompt
on a List Of Values.
Use this method in the same way that you use
DocumentInstance.setPrompts()
.
DocumentInstance.setPrompts()
,
Prompt
void setSearchMatchCase(boolean matchCase)
false
to inactivate case-sensitive LOV searching.
By default, a search action executed on a LOV is case-sensitive.
This call has no effect for list of values defined as delegated search in the universe
(Lov.isDelegated()
returns true
), as they are always searched in a
case-sensitive manner.
matchCase
- Set to false
to inactivate case-sensitive LOV
searching, set to true
so a search action executed on a LOV is
case-sensitive.Lov.setSearchPattern(String)
boolean getSearchMatchCase()
boolean
value indicating whether case-sensitive LOV
searching is activated.
By default, a search action executed on a LOV is case-sensitive.
List of values defined as delegated search in the universe
(Lov.isDelegated()
returns true
) always get searched
in a case-sensitive manner.
true
when LOV searching is case-sensitive, false
when LOV searching is case insensitive.Lov.setSearchPattern(String)
LovDisplayType getLovDisplayType()
LovDisplayType
instance associated to this Lov
.
LovDisplayType
instance.boolean isDelegated()
true
if the universe defines this Lov as delegated
search, that means that the list of values is resolved by data
base with the given user input pattern.
Example:Check whether the LOVs are delegated
Prompts prompts = wiDoc.getPrompts();
Lov objLov = prompts.getItem(0).getLOV();
out.println(objLov.isDelegated());
true
if the universe defines this Lov as delegate search,
otherwise returns false
.DataSourceObject#hasDelegatedLOV()
boolean isPartialResult()
Lov.getAllValues()
returns a partial
result.
So you must always call Lov.getAllValues()
before.
You have partial result because returned Lov size is limited by the minimun of the couple (WebIReportServer's Lov Size, universe's query limit).
true
or false
.void close()
void setAutoRefresh(boolean autoRefresh)
Lov.getValues(int)
or Lov.getAllValues()
.
autoRefresh
- true
to have the server automatically retrieve values
from the database when needed, false
to prevent it from doing so.java.util.Date getDate()
Lov
was last refreshed.java.lang.String getFormattedDate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |