Class UserProperty
#include <UserProperty.h >
Interface to DB table for application-specific properties specific to Users.
Variables are grouped into sections; if a varaible is not in a section, it is considered a global variable.
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable, e.g. task.getName() |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
const string& defaultValue |
if blank, the default value for the variable Default value: "" |
Given an application, a section, and a variable, return the value (or default value) as string for a specific user.
Return value: the value requested or if blank, the defaultValue
DbRecNum user_id |
the User id |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
Given an application, a section, and a variable, return the value as string for a specific user.
The current application's name is the appname for the lookup, , e.g. task.getName().
Return value: the value requested or if blank, the defaultValue
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable, e.g. task.getName() |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
int defaultValue |
if blank, the default value for the variable Default value: 0 |
Given an application, a section, and a variable, return the value (or default value) as long int for a specific user.
Return value: the value requested or if blank, the defaultValue
DbRecNum user_id |
the User id |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
Given an application, a section, and a variable, return the value as long int for a specific user.
The current application's name is the appname for the lookup, e.g. task.getName().
Return value: the value requested or if blank, the defaultValue
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable, e.g. task.getName() |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
bool defaultValue |
if blank, the default value for the variable Default value: false |
Given an application, a section, and a variable, return the value (or default value) as bool for a specific user.
Return value: the value requested or if blank, the defaultValue
DbRecNum user_id |
the User id |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
Given an application, a section, and a variable, return the value as bool for a specific user.
The current application's name is the appname for the lookup, e.g. task.getName().
Return value: the value requested or if blank, the defaultValue
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable |
const string& section |
the section (application defined) for the variable |
Given a section and app name, return the list of variables and values for a specific user.
Return value: the key/value pairs of the variables and values in a HashArray
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable, e.g. task.getName() |
const string& variable |
the name of the variable |
const string& defaultValue |
if blank, the default value for the variable Default value: "" |
Given an application and a variable, return the value (or default value) as string for a specific user from that app's global section (not a named section).
Return value: the value requested or if blank, the defaultValue
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable, e.g. task.getName() |
const string& variable |
the name of the variable |
int defaultValue |
if blank, the default value for the variable Default value: 0 |
Given an application and a variable, return the value (or default value) as long int for a specific user from that app's global section (not a named section).
Return value: the value requested or if 0, the defaultValue
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable, e.g. task.getName() |
const string& variable |
the name of the variable |
bool defaultValue |
if blank, the default value for the variable Default value: false |
Given an application and a variable, return the value (or default value) as bool for a specific user from that app's global section (not a named section).
Return value: the value requested or if 0, the defaultValue
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable |
Given an app name, return the list of gobal variables and values for a specific user.
Return value: the key/value pairs of the variables and values in a HashArray
DbRecNum user_id |
the User id |
const string& appname |
the application-specific variable, e.g. task.getName() |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
const string& value |
the value to set |
Set a string value for an application variable in a section for a specific user.
Return value: true if value to to variable successfully
DbRecNum user_id |
the User id |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
const string& value |
the value to set |
Set a string value for an application variable in a section for a specific user.
The current application's name is the appname for the lookup, , e.g. task.getName().
Return value: true if value to to variable successfully
DbRecNum user_id |
the User id |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
long value |
the value to set |
Set a long int value for an application variable in a section for a specific user.
The current application's name is the appname for the lookup, , e.g. task.getName().
Return value: true if value to to variable successfully
DbRecNum user_id |
the User id |
const string& section |
the section (application defined) for the variable |
const string& variable |
the name of the variable |
bool value |
the value to set |
Set a bool value for an application variable in a section for a specific user.
The current application's name is the appname for the lookup, , e.g. task.getName().
Return value: true if value to to variable successfully
DbRecNum id |
Table record number/id |
DbRecNum user_id |
DB record id from User table |
string appName |
Application's name |
const string& section |
Section/Block with variables |
const string& variable |
Variable name with a value |
string value |
Value of variable |
static Datastore db |
Our connection to DB table data |
Make sure we're connected to our table in the Datastore
Return value: true upon success, false upon failure