com.sap.netweaver.bc.uwl

Class QueryProperties

java.lang.Object
  extended bycom.sap.netweaver.bc.uwl.QueryProperties

public final class QueryProperties
extends Object

The QueryProperties class provides getters and setters for various properties of the queries primarily used in getItems() method of the IUWLItemManager.

See Also:
QueryResult

Constructor Summary
QueryProperties()
           
 
Method Summary
 void enableSubstitutionCount(boolean enable)
          If substituioncount is enabled, then getItems() method call on the IUWLItemManager returns QueryResult with valid getSubstitutingUsers values.
 String getConfigurationGroup()
          Configuration group could be set by the caller to limit the provider systems that UWL needs to connect.
 Date getFromDate()
          Returns the fromDate.
 int getMaxNumberOfItemsToFetch()
          Returns the maximum number of records to fetch.
 boolean[] getSortAscending()
          Returns the sorting order of the records.
 String[] getSortBy()
          Returns the array of strings which contain column names used to sort the records by.
 int getStartingItemNumber()
          Returns the starting record number.
 String getSubstitutedUser()
          Returns the filter set for the substituting user.
 boolean isSubstitutionCountNeeded()
          Indicates if substitution count needs to be returned.
 void setConfigurationGroup(String configurationGroup)
          Configuration group could be set by the caller to limit the provider systems that UWL needs to connect.
 void setFromDate(Date fromDate)
          Sets the date from which items need to be retrieved.
 void setMaxNumberOfItemsToFetch(int maxNumberOfRecordsToFetch)
          Sets the maximum number of records to fetch.
 void setSortAscending(boolean[] sortAscending)
          Sets the whether the sort fields set in setSortBy() method need to be correspondingly ascending or descending sorted.
 void setSortBy(String[] sortBy)
          Sets the sorting fields.
 void setStartingItemNumber(int startingItemPosition)
          Sets the starting item number.
 void setSubstitutedUser(String usr)
          Provides a means to filter the items based on the user to whom current users is substituting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProperties

public QueryProperties()
Method Detail

getFromDate

public Date getFromDate()
Returns the fromDate.

Returns:
Date the time since the query is valid.

getConfigurationGroup

public String getConfigurationGroup()
Configuration group could be set by the caller to limit the provider systems that UWL needs to connect. Typically this value comes from the portal iview property for the corresponding role.

Returns:
the configuration group.

setConfigurationGroup

public void setConfigurationGroup(String configurationGroup)
Configuration group could be set by the caller to limit the provider systems that UWL needs to connect. Typically this value comes from the portal iview property for the corresponding role.

Parameters:
configurationGroup - the configuration group.

getMaxNumberOfItemsToFetch

public int getMaxNumberOfItemsToFetch()
Returns the maximum number of records to fetch.

Returns:
int the maximum number of records that the query can contain.

getSortAscending

public boolean[] getSortAscending()
Returns the sorting order of the records.

Returns:
Boolean true if the records are sorted in an ascending order and false if descending.

getSortBy

public String[] getSortBy()
Returns the array of strings which contain column names used to sort the records by.

Returns:
String[] the names of columns that are used to sort the records.

getStartingItemNumber

public int getStartingItemNumber()
Returns the starting record number.

Returns:
int the starting index of the record. By default, it is equal to 0.

setFromDate

public void setFromDate(Date fromDate)
Sets the date from which items need to be retrieved. This makes sense only for history items such as uwl.completedtask, uwl.completedrequest etc.

Parameters:
fromDate - The fromDate to set

setMaxNumberOfItemsToFetch

public void setMaxNumberOfItemsToFetch(int maxNumberOfRecordsToFetch)
Sets the maximum number of records to fetch.

Parameters:
maxNumberOfRecordsToFetch - The maxNumberOfRecordsToFetch to set

setSortAscending

public void setSortAscending(boolean[] sortAscending)
Sets the whether the sort fields set in setSortBy() method need to be correspondingly ascending or descending sorted.

Parameters:
sortAscending - boolean array of true or false with corresponding sort fields

setSortBy

public void setSortBy(String[] sortBy)
Sets the sorting fields. These should be Item's attributes such as createDate,priority etc.

Parameters:
sortBy - The sortBy to set

setStartingItemNumber

public void setStartingItemNumber(int startingItemPosition)
Sets the starting item number. In case of too many items, this method could be used to get only a block of items for example items from 41 to 50 in the sorted order specified.

Parameters:
startingItemPosition - starting number

getSubstitutedUser

public String getSubstitutedUser()
Returns the filter set for the substituting user.

Returns:
user id of the user to whom substituted for, could be null

setSubstitutedUser

public void setSubstitutedUser(String usr)
Provides a means to filter the items based on the user to whom current users is substituting.

Parameters:
usr - specifies the filtering on the items. If not null specifies only from the user specified, items are requested. This parameter should be the com.sap.security.api.IUser.getUniqueId(). For example setSubstitutedUser("USER.PRIVATE_DATASOURCE.un:testuser1" asks for items only for the user testUser1 whom the current user is substituting.
If this parameter is null, all items exclusively users as well as substitued ones are returned.
If this parameter is set to current users id, then items belonging exclusively to the current user are returned. for example setSubstitutedUser(context.getUserId()) returns items which were not substituted.

isSubstitutionCountNeeded

public boolean isSubstitutionCountNeeded()
Indicates if substitution count needs to be returned.

Returns:
true if substition user, and count needs to be returned. If it is false, QueryResult doesnt contain Substitution item count.
See Also:
QueryResult.getSubstitutingUsers(), SubstitutedItemCount

enableSubstitutionCount

public void enableSubstitutionCount(boolean enable)
If substituioncount is enabled, then getItems() method call on the IUWLItemManager returns QueryResult with valid getSubstitutingUsers values.

Parameters:
enable - sets if substution user, item count is needed.
See Also:
QueryResult.getSubstitutingUsers(), SubstitutedItemCount


Copyright 2006 SAP AG Complete Copyright Notice