An AddressBook is a Repository which can have linked contact records. The contact records provide a search optimised view of the CARDDAV data held in the repository

Group: Database Entities

Extends: Repository


Properties

PropertyReturnsDescription
contactsList<Contact>The search optimised contact records linked to this address book. May be null when no contacts have been loaded or created. Each entry is a summary of a contact whose full record lives as CardDAV text in this repository, and deleting the address book deletes them all.
repoTypeStringThe repository type code, always AB for an address book. Use it to tell address books apart from other kinds of repository without a type check. Not persisted.

Inherited from Repository

Properties

PropertyReturnsDescription
baseEntityBaseEntityThe entity that contains this repository. The entity might be a user, organisation, etc The repository name must be unique within its parent entity
branchesList<Branch>
categoryRepositoryCategory
createdDateDate
deletedBooleanTo support soft deletes
idlong
liveBranchString
nameString
notesString
publicContentboolean
publishedByProfile
publishedDateDate
titleString
trunkBranch
typeString

Methods

getRepoType()

Returns: String

The repository type code, always AB for an address book. Use it to tell address books apart from other kinds of repository without a type check. Not persisted.

getContacts()

Returns: List<Contact>

The search optimised contact records linked to this address book. May be null when no contacts have been loaded or created. Each entry is a summary of a contact whose full record lives as CardDAV text in this repository, and deleting the address book deletes them all.

contact(String name)

Returns: Contact

Finds the contact in this address book with the given resource name by scanning the loaded contact list, so the cost grows with the number of contacts. Matching is exact and case sensitive.

ParameterDescription
namethe resource name of the contact to find, as returned by the contact's getName

add(String name)

Returns: Contact

Builds a new contact pointing at this address book with the given resource name and returns it. The contact is not added to the contacts list and is not saved, so the caller has to persist it and is responsible for keeping the name unique.

ParameterDescription
namethe resource name to give the new contact
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.