Class EabEntry
Reads and writes entries from the email address book. The class is also used when you want to synchronize the address book using DBI.
Examples
EabEntry e;
e.load(15);
print(e.getValue("sms"));
e.setValue("name", "test");
Constructors
EabEntry()
Initializes a new instance of the EabEntry class.
Declaration
EabEntry Methods
delete()
Deletes the current address book entry from the database.
Declaration
Void delete() Returns
| Type | Description |
| Void |
getValue(String)
Gets the value of the given field in the EabEntry instance.
Declaration
String getValue(String field) Examples
EabEntry eab;
Bool b = eab.load(15);
print(b.toString());
eab.setValue("name", "test");
Parameters
| Type | Name | Description |
| String | field | The name of the field. |
Returns
| Type | Description |
| String | The value of the field. |
load(Integer)
Loads an entry from the address book with the specified ID.
Declaration
Bool load(Integer id) Examples
EabEntry eab;
Bool b = eab.load(15);
print(b.toString());
Parameters
| Type | Name | Description |
| Integer | id | ID of the entry to load. |
Returns
| Type | Description |
| Bool | True if loading var successful; otherwise, false. |
loadFromAgentAndKey(Integer,String)
Used in conjunction with DBI. Load an entry with the specified key from the specified agent.
Declaration
Bool loadFromAgentAndKey(Integer id, String key) Parameters
| Type | Name | Description |
| Integer | id | ID of the agent this EAB entry belongs to |
| String | key | The external key for the EAB entry. |
Returns
| Type | Description |
| Bool | True if loading var successful; otherwise, false. |
save()
Saves the current address book entry. If you did not load an existing entry, a new entry will be created; otherwise, it will update the loaded entry.
Declaration
Integer save() Returns
| Type | Description |
| Integer | ID of the saved entry. |
setValue(String,String)
Sets the value of the given field in the EabEntry instance.
Declaration
Void setValue(String name, String value) Examples
EabEntry eab;
Bool b = eab.load(15);
print(b.toString());
eab.setValue("name", "test");
print(eab.getValue("name"));
Parameters
| Type | Name | Description |
| String | name | The name of the field. |
| String | value | The value to set. |
Returns
| Type | Description |
| Void |