com.businessobjects.rebean.wi
Interface Lov


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.

See Also:
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

getCurrentBatchIndex

int getCurrentBatchIndex()
Returns the index of the current batch or chunk.

Returns:
The index of the current chunk.

getCurrentBatchName

java.lang.String getCurrentBatchName()
Returns the name of the current batch or chunk.

Returns:
The name of the current chunk.

getMaxColumns

int getMaxColumns()
Returns the number of columns in the List Of Values.

Returns:
The number of columns in the List Of Values.

getAllValues

Values getAllValues()
Returns all the values in this List Of Values.

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.

Returns:
All Values in the List of Values.
See Also:
Values, Lov.setSearchMode(boolean), Lov.isSearchActive(), Lov.setSearchMatchCase(boolean)

getBatchNames

java.lang.String[] getBatchNames()
Returns the names of all the different batch contained in the List Of Values. Returns all the batch names as a String array.

Returns:
The names of all the different batch contained in the List Of Values.

getBatchName

java.lang.String getBatchName(int index)
Returns the name of the batch at a specified index.

Note: call Lov.getBatchNames() to retrieve than one batch name.

Returns:
The name of the batch at a specified index.

getValues

Values getValues(int batchIndex)
Returns all the values in a particular batch or chunk.

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.

Parameters:
batchIndex - The index of the batch to be retrieved.
Returns:
All Values in the chunk at index batchIndex.
See Also:
Lov.setBatchSize(int), Values

isSearchActive

boolean isSearchActive()
Returns true if search mode is active.

Returns:
Returns true if search mode is active.

setSearchMode

void setSearchMode(boolean active)
Set to true to activate search mode.

Note: this method must be called before setting a search pattern.

Parameters:
active - Set to true to activate search mode; false for search mode to be disabled.
Throws:
java.lang.IllegalArgumentException - while turn off search mode for delegated search.
See Also:
Lov.isSearchActive(), Lov.setSearchMatchCase(boolean)

getLovType

LovType getLovType()
Returns the 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.

Returns:
The LovType associated to this Lov instance.
See Also:
DocumentInstance.getLOV(String objID, LovType type), LovType

getSearchPattern

java.lang.String getSearchPattern()
Returns the search pattern.

Returns:
The search pattern.

setSearchPattern

void setSearchPattern(java.lang.String pattern)
Sets the search 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.

Parameters:
pattern - the pattern used to filter the results of getAllValues and getValues
See Also:
Lov.isSearchActive(), Lov.setSearchMode(boolean), Lov.getAllValues(), Lov.getValues(int)

isSorted

boolean isSorted()
Returns true if a sort is applied to any of the columns in the Lov.

Returns:
Returns true if a sort has been applied; false if their is no sort.
See Also:
Lov.setSortedColumnIndex(int), Lov.setSortedColumnIndex(int)

setSortType

void setSortType(SortType type,
                 int columnIndex)
Sets a sort on a specific column in the List Of Values.

Parameters:
type - The SortType to be applied.
columnIndex - The index of the column to be sorted.
See Also:
Lov.setSortType(SortType type), SortType

setSortType

void setSortType(SortType type)
Changes the 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).

Parameters:
type - The SortType to be applied to the Lov.
See Also:
Lov.setSortType(SortType type, int columnIndex), Lov.setSortedColumnIndex(int), SortType

getSortType

SortType getSortType()
Returns the SortType applied on a specific column.

Returns:
The SortType applied to the List Of Values.
See Also:
SortType

getSortedColumnIndex

int getSortedColumnIndex()
Returns the index of the column on which the sort is applied.

For single-column lists of values, this method returns 0.

Returns:
the index of the column to which the sort is applied
See Also:
Lov.getSortType()

setSortedColumnIndex

void setSortedColumnIndex(int columnIndex)
Sets the column to which the sort will be applied.

Once you have set the column that you want to sort, set the type of sort using Lov.setSortType(SortType).

Parameters:
columnIndex - The index of the column on which the sort is to be applied.
See Also:
Lov.setSortType(SortType, int)

refresh

void refresh()
Refreshes the List Of Values.

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.

See Also:
Lov.getValues(int), Lov.getAllValues()

getID

java.lang.String getID()
Returns the identifier for this Lov instance.

Returns:
The object identifier.
See Also:
DocumentInstance.getLOV(String, LovType, DataProvider)

getBatchSize

int getBatchSize()
Returns the number of Value objects (rows) in a Lov batch or chunk.

The default batch size is 1000.

Returns:
The number of values in a batch.
See Also:
Lov.setBatchSize(int)

setBatchSize

void setBatchSize(int size)
Sets the number of 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.

Parameters:
size - The size of the batches in which the Lov is to be divided.
See Also:
Lov.getBatchSize(), Lov.getValues(int)

mustFillNestedPrompts

boolean mustFillNestedPrompts()
Determines if there are unfilled nested prompts values. A List Of Values can have prompts assigned to it, and the List Of Values used to fill the prompt can also have their own prompts and List Of Values.

Returns:
Returns true if at least one prompt must be filled; false otherwise
See Also:
DocumentInstance.getMustFillPrompts()

getNestedPrompts

Prompts getNestedPrompts()
Returns the nested prompts for this List Of Values.

Returns:
The collection of nested prompts.
See Also:
Lov.mustFillNestedPrompts(), Prompts

setNestedPrompts

void setNestedPrompts()
Sets the nested prompts values for a Prompt on a List Of Values.

Use this method in the same way that you use DocumentInstance.setPrompts().

See Also:
DocumentInstance.setPrompts(), Prompt

setSearchMatchCase

void setSearchMatchCase(boolean matchCase)
Set to 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.

Parameters:
matchCase - Set to false to inactivate case-sensitive LOV searching, set to true so a search action executed on a LOV is case-sensitive.
Since:
11.5
See Also:
Lov.setSearchPattern(String)

getSearchMatchCase

boolean getSearchMatchCase()
Returns a 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.

Returns:
Returns true when LOV searching is case-sensitive, false when LOV searching is case insensitive.
Since:
11.5
See Also:
Lov.setSearchPattern(String)

getLovDisplayType

LovDisplayType getLovDisplayType()
Returns a LovDisplayType instance associated to this Lov.

Returns:
a assciated LovDisplayType instance.
Since:
11.5

isDelegated

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. Example:Check whether the LOVs are delegated
 Prompts prompts = wiDoc.getPrompts();
 Lov objLov = prompts.getItem(0).getLOV();
 out.println(objLov.isDelegated());
 

Returns:
true if the universe defines this Lov as delegate search, otherwise returns false.
Since:
12.0
See Also:
DataSourceObject#hasDelegatedLOV()

isPartialResult

boolean isPartialResult()
Checiks if 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).

Returns:
true or false.
Since:
12.0

close

void close()
Releases the Lov definition (Lov identifier, search pattern, chunk size etc) and all values. This object can not be used anymore. If you call again any method on this object, an IllegalStateException will be raised.

Since:
12.0

setAutoRefresh

void setAutoRefresh(boolean autoRefresh)
Controls whether the server automatically retrieves values from the database when calling Lov.getValues(int) or Lov.getAllValues().

Parameters:
autoRefresh - true to have the server automatically retrieve values from the database when needed, false to prevent it from doing so.
Since:
12.1.0

getDate

java.util.Date getDate()
Returns the last refresh date.

Returns:
the time data in this Lov was last refreshed.
Since:
12.1.0

getFormattedDate

java.lang.String getFormattedDate()
Returns the last refresh date formatted with the document's content locale.

Returns:
the formatted date.
Since:
12.1.0