ABSearchElement Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AddressBook.framework |
| Availability | Available in OS X v10.2 and later. |
| Companion guide | |
| Declared in | ABSearchElement.h ABTypedefs.h |
Overview
The ABSearchElement class is used to specify a search query for records in the Address Book database.
The ABSearchElement class is “toll-free bridged” with its procedural C opaque-type counterpart. This means that the ABSearchElementRef type is interchangeable in function or method calls with instances of the ABSearchElement class.
Class Methods
searchElementForConjunction:children:
Returns a compound search element, created by combining the search elements in an array with the given conjunction.
Parameters
- conjunction
The logical operator with which to combine the search elements.
- children
An array of search elements to be combined.
Return Value
A compound search element, created by combining the given search elements with the given conjunction
Discussion
The objects in the children array must be ABSearchElement objects. The conjunction can be kABSearchAnd or kABSearchOr. If children is nil or empty, this method raises an exception.
Availability
- Available in OS X v10.2 and later.
See Also
-
+ searchElementForProperty:label:key:value:comparison:(ABPerson) -
+ searchElementForProperty:label:key:value:comparison:(ABGroup) -
– recordsMatchingSearchElement:(ABAddressBook)
Declared In
ABSearchElement.hInstance Methods
matchesRecord:
Tests whether or not a record matches a search element.
Parameters
- record
The record to be tested against the search object.
Return Value
YES if the record argument satisfies the conditions in the search element; otherwise, NO.
Discussion
If record is nil, this method raises an exception.
Availability
- Available in OS X v10.2 and later.
See Also
Declared In
ABSearchElement.hConstants
Search Conjunctions
Logical operators used to combine search elements.
enum _ABSearchConjunction {
kABSearchAnd,
kABSearchOr
};
typedef CFIndex ABSearchConjunction;
Constants
kABSearchAndJoin the search elements together with the AND operand.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABSearchOrJoin the search elements together with the OR operand.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.
Discussion
These constants are used by the searchElementForConjunction:children: method.
Search Comparisons
Comparisons used to construct search elements.
enum _ABSearchComparison {
kABEqual,
kABNotEqual,
kABLessThan,
kABLessThanOrEqual,
kABGreaterThan,
kABGreaterThanOrEqual,
kABEqualCaseInsensitive,
kABContainsSubString,
kABContainsSubStringCaseInsensitive,
kABPrefixMatch,
kABPrefixMatchCaseInsensitive,
kABBitsInBitFieldMatch,
kABDoesNotContainSubString,
kABDoesNotContainSubStringCaseInsensitive,
kABNotEqualCaseInsensitive,
kABSuffixMatch,
kABSuffixMatchCaseInsensitive,
kABWithinIntervalAroundToday,
kABWithinIntervalAroundTodayYearless,
kABNotWithinIntervalAroundToday,
kABNotWithinIntervalAroundTodayYearless,
kABWithinIntervalFromToday,
kABWithinIntervalFromTodayYearless,
kABNotWithinIntervalFromToday,
kABNotWithinIntervalFromTodayYearless
};
typedef CFIndex ABSearchComparison;
Constants
kABEqualSearch for elements that are equal to the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABNotEqualSearch for elements that are not equal to the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABLessThanSearch for elements that are less than the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABLessThanOrEqualSearch for elements that are less than or equal to the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABGreaterThanSearch for elements that are greater than the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABGreaterThanOrEqualSearch for elements that are greater than or equal to the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABEqualCaseInsensitiveSearch for elements that are equal to the value, ignoring case.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABContainsSubStringSearch for elements that contain the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABContainsSubStringCaseInsensitiveSearch for elements that contain the value, ignoring case.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABPrefixMatchSearch for elements that begin with the value.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABPrefixMatchCaseInsensitiveSearch for elements that begin with the value, ignoring case.
Available in OS X v10.2 and later.
Declared in
ABTypedefs.h.kABBitsInBitFieldMatchSearch for elements that match the bits in ABPersonFlags.
Available in OS X v10.3 and later.
Declared in
ABTypedefs.h.kABDoesNotContainSubStringSearch for elements that do not contain the value.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABDoesNotContainSubStringCaseInsensitiveSearch for elements that do not contain the value, ignoring case.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABNotEqualCaseInsensitiveSearch for elements that are not equal to the value, ignoring case.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABSuffixMatchSearch for elements that end with the value.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABSuffixMatchCaseInsensitiveSearch for elements that end with the value, ignoring case.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABWithinIntervalAroundTodaySearch for elements that are within a time interval (in seconds) forward or backward from today.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABWithinIntervalAroundTodayYearlessSearch for elements that are within a time interval (in seconds) forward or backward from this day in any year.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABNotWithinIntervalAroundTodaySearch for elements that are not within a time interval (in seconds) forward or backward from today.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABNotWithinIntervalAroundTodayYearlessSearch for elements that are not within a time interval (in seconds) forward or backward from this day in any year.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABWithinIntervalFromTodaySearch for elements that are within a time interval (in seconds) forward from today.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABWithinIntervalFromTodayYearlessSearch for elements that are within a time interval (in seconds) forward from this day in any year.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABNotWithinIntervalFromTodaySearch for elements that are not within a time interval (in seconds) forward from today.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.kABNotWithinIntervalFromTodayYearlessSearch for elements that are not within a time interval (in seconds) forward from this day in any year.
Available in OS X v10.4 and later.
Declared in
ABTypedefs.h.
Discussion
These constants are used by the ABPerson method searchElementForProperty:label:key:value:comparison: and the ABGroup method searchElementForProperty:label:key:value:comparison:
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-07-24)