Retrieving accountsAdded by IBM on October 5, 2011 | Version 1 (Original)
|You can retrieve an existing account using methods provided by the AccountsManager class.
You can retrieve an existing account using methods provided by the AccountsManager
To retrieve an existing account, perform the following steps:
- Use the AccountsManagerFactory to access a singleton instance of the platform implementation of the AccountsManager interface.
- Retrieve a single account by calling one of the following methods:
Retrieve multiple accounts, in a java.util.List object, using one of the following methods:
- getAccount(java.lang.String uid) – Returns an Account object with the given UID from persistent store.
- getAccountByName(java.lang.String name) – Retrieves the account with the given name or returns null if no such account exists.
Parent topic: Accounts framework
- getAccounts(java.lang.String field, java.lang.String value) – Returns all accounts that have the property field and value that matches property value for that account.
- getAccountsByServer(java.lang.String server) – This method does a partial match on HTTP(s) Web addresses. It first searches for the exact string, and if one or more accounts are found, it returns those. If no accounts are found, then it breaks down the path of the Web address and tries each directory separately. For example, if an account has a server name of http://www.ibm.com, a query String of http://www.ibm.com/lotusnotes returns that account. If you only want exact matches, call getAccounts(Account.SERVER, <server_name>).
- getAllAccounts() – Returns all of the accounts in the data store, or an empty List if no accounts have been added.