SiteMinder
Java SDK r12.51


com.netegrity.sdk.dmsapi
Class SmDmsCursor

java.lang.Object
  extended by com.netegrity.sdk.dmsapi.SmDmsCursor

public class SmDmsCursor
extends java.lang.Object

Represents an SmDmsCursor object for result set sorting and paging operations.

The DMS API uses the sorting and paging capabilites of the target LDAP directory or ODBC database.

You can use this object to define sorting and paging behavior for one of the search... methods in the SmDmsOrganization class. In addition, the following methods support sorting and paging behavior:
For a complete list of the methods you can use with the SmDmsCursor object, see the Programming Guide for Java.

Note: Sorting and paging operations are not supported for Active Directories through the AD namespace. Sorting and paging are supported for Active Directories through the LDAP namespace. For more information, see the SmDmsCursor Constructor Detail.

Since:
SDK 2.2

Constructor Summary
SmDmsCursor(java.util.Vector sort, int blockSize, boolean bSortingCr, boolean bPagingCr)
          Constructs an SmDmsCursor object with a given sort order, block size, and preferences regarding sorting and paging requirements.
 
Method Summary
 int getBlockSize()
          Gets the block size to be returned from the result set.
 java.lang.String getErrorMessage()
          Gets the error message, if any, that resulted from an LDAP or ODBC query.
 int getOffset()
          Gets the starting offset of the block to be returned from the result set.
 int getResultSize()
          Gets the number of rows actually returned from a result set.
 java.util.Vector getSortOrder()
          Gets the sort order for the result set as a Vector of attribute names.
 int getTotalSize()
          Gets the total number of rows in the result set before paging.
 boolean isPaginated()
          Specifies whether the result set was successfully paginated.
 boolean isPagingCritical()
          Indicates whether paging features are critical for a result set.
 boolean isSorted()
          Specifies whether the result set was successfully sorted.
 boolean isSortingCritical()
          Indicates whether it is critical to sort a result set.
 void setBlockSize(int size)
          Sets the block size to be returned from the result set.
 void setOffset(int size)
          Sets the starting offset of the block to be returned from the result set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmDmsCursor

public SmDmsCursor(java.util.Vector sort,
                   int blockSize,
                   boolean bSortingCr,
                   boolean bPagingCr)

Constructs an SmDmsCursor object with a given sort order, block size, and preferences regarding sorting and paging requirements.

When communicating with an Active Directory through the AD namespace, SiteMinder responds to sorting and paging requests as follows:

Parameters:
sort - A Vector of attribute names that indicates the sort order. The attribute names are the items to be retrieved. For ODBC database user directories, these are column names. The result set is sorted by the first attriute in the Vector, and then the second, and so on. To indicate a reverse sorting order for an attribute, prefix the attribute with a dash character (-).
blockSize - The maximum number of rows in a single page of search results.
bSortingCr - If true, the server should not return any result set unless it can be sorted.
bPagingCr - If true, the server shoult not return any result set unless it can be paginated.
Method Detail

getSortOrder

public java.util.Vector getSortOrder()
Gets the sort order for the result set as a Vector of attribute names. The attribute names are the items to be retrieved, such as column names in an ODBC database or LDAP attributes in an LDAP directory.

The result set is sorted according to the first name in the Vector, and then the second, and so on.

A dash character (-) prefixed before an attribute name indicates reverse sorting order for that attribute.

When an SmDmsCursor object is passed to a method, the sort order is an input parameter.

Note: To set the sort order, use the sort parameter of the SmDmsCursor constructor. The sort order can't be changed once the object is constructed.

Returns:
The sort order as a Vector of attribute names.

getBlockSize

public int getBlockSize()
Gets the block size to be returned from the result set. The block size is the maximum number of rows that can appear in a single page of search results.

When an SmDmsCursor object is passed to a method, the block size is an input parameter.

Returns:
The block size.

setBlockSize

public void setBlockSize(int size)
Sets the block size to be returned from the result set. The block size is the maximum number of rows that can appear in a single page of search results.

Parameters:
size - The block size.

getOffset

public int getOffset()
Gets the starting offset of the block to be returned from the result set. The offset is the row number from the beginning of the result set.

When an SmDmsCursor object is passed to a method, the offset is an input parameter.

Returns:
The starting offset for the block.

setOffset

public void setOffset(int size)
Sets the starting offset of the block to be returned from the result set. The offset is the row number from the beginning of the result set.

Parameters:
size - The new starting offset for the block.

isSortingCritical

public boolean isSortingCritical()
Indicates whether it is critical to sort a result set. If this method returns true, a result set will only be returned if it can be sorted.

When an SmDmsCursor object is passed to a method, the is-sorting-critical value is an input parameter.

Returns:
true if sorting is critical, false otherwise.

isPagingCritical

public boolean isPagingCritical()
Indicates whether paging features are critical for a result set. If this method returns true, a result set will only be returned if it can be paginated.

When an SmDmsCursor object is passed to a method, the is-paginating-critical value is an input parameter.

Returns:
true if paging is critical, false otherwise.
See Also:
getBlockSize()

getResultSize

public int getResultSize()
Gets the number of rows actually returned from a result set. This number is not necessarily the same as the specified block size -- for example, if the end of the result set does not contain enough rows to fill an entire block.

When an SmDmsCursor object is passed to a method, the result set size is an output parameter.

Returns:
The number of rows actually returned from the result set.
See Also:
getTotalSize()

getTotalSize

public int getTotalSize()
Gets the total number of rows in the result set before paging. (May not always be available with some user directory implementations.)

When an SmDmsCursor object is passed to a method, the total size is an output parameter.

Returns:
The number of rows in the result set.
See Also:
getResultSize()

getErrorMessage

public java.lang.String getErrorMessage()
Gets the error message, if any, that resulted from an LDAP or ODBC query.

When an SmDmsCursor object is passed to a method, the error message is an output parameter.

Returns:
The error message for the LDAP or ODBC query.

isSorted

public boolean isSorted()
Specifies whether the result set was successfully sorted.

When an SmDmsCursor object is passed to a method, the is-sorted value is an output parameter.

Returns:
true if the result set was successfully sorted, or false otherwise.

isPaginated

public boolean isPaginated()
Specifies whether the result set was successfully paginated.

When an SmDmsCursor object is passed to a method, the is-paginated value is an output parameter.

Returns:
true if the result set was successfully paginated, or false otherwise.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

http://ca.com
Copyright (c) 2013 CA.