In normal operation an existing address must not be changed, instead a new address should be created (and subsequently stored in the database). The only business case where the above is not true is the situation where an address is corrected (typo or missunder standing).
Definition at line 102 of file address.h.
typedef Id<Associate> OSB_LIB::Address::OwnerId |
typedef std::set<AddressType> OSB_LIB::Address::TypeList |
Constructor only with owner id and type.
const std::string & OSB_LIB::Address::addressee | ( | ) | const [inline] |
bool OSB_LIB::Address::addType | ( | const OSB_DB::Session & | session, | |
AddressType | type | |||
) | [private] |
Add a new type for this address.
This will duplicate the address with different type. That is the two or more types will share the same address.
session | Database session to use. | |
type | The new type to be added. |
const std::string & OSB_LIB::Address::city | ( | ) | const [inline] |
bool OSB_LIB::Address::contains | ( | AddressType | type | ) | const [private] |
Find whether the given type exists in this address.
type | The type to search for. |
const std::string & OSB_LIB::Address::country | ( | ) | const [inline] |
bool OSB_LIB::Address::delType | ( | const OSB_DB::Session & | session, | |
AddressType | type | |||
) | [private] |
Delete a type from this address.
This will delete the type from the shared address. If this type of address is the separate one return false.
session | Database session to use. | |
type | The new type to be added. |
OsbException |
|
const std::string & OSB_LIB::Address::email | ( | ) | const [inline] |
const std::string & OSB_LIB::Address::faxNum | ( | ) | const [inline] |
const std::string & OSB_LIB::Address::function | ( | ) | const [inline] |
bool OSB_LIB::Address::insert | ( | const OSB_DB::Session & | session | ) | const [private] |
Insert an address to the database.
session | Database session to use, transactions are not commited. |
OsbException |
|
const Address::OwnerId & OSB_LIB::Address::ownerId | ( | ) | const [inline] |
bool OSB_LIB::Address::remove | ( | const OSB_DB::Session & | session | ) | const [private] |
Delete an address from the database.
session | Database session to use, transactions are not commited. |
OsbException |
|
void OSB_LIB::Address::setAddressee | ( | const std::string & | addressee | ) |
void OSB_LIB::Address::setCity | ( | const std::string & | city | ) |
void OSB_LIB::Address::setCountry | ( | const std::string & | country | ) |
void OSB_LIB::Address::setEmail | ( | const std::string & | ) |
void OSB_LIB::Address::setFaxNum | ( | const std::string & | fax | ) |
void OSB_LIB::Address::setFunction | ( | const std::string & | function | ) |
void OSB_LIB::Address::setState | ( | const std::string & | state | ) |
void OSB_LIB::Address::setStreet | ( | const std::string & | street | ) |
void OSB_LIB::Address::setTelNum | ( | const std::string & | tel | ) |
void OSB_LIB::Address::setZipcode | ( | const std::string & | zip | ) |
const std::string & OSB_LIB::Address::state | ( | ) | const [inline] |
const std::string & OSB_LIB::Address::street | ( | ) | const [inline] |
const std::string & OSB_LIB::Address::telNum | ( | ) | const [inline] |
const Address::TypeList & OSB_LIB::Address::types | ( | ) | const [inline] |
bool OSB_LIB::Address::update | ( | const OSB_DB::Session & | session | ) | const [private] |
Update an address to the database.
session | Database session to use, transactions are not commited. |
OsbException |
|
const std::string & OSB_LIB::Address::zipcode | ( | ) | const [inline] |
friend class Associate [friend] |
friend class OSB_DB::AddressGw [friend] |
std::string OSB_LIB::Address::addressee_ [private] |
std::string OSB_LIB::Address::city_ [private] |
std::string OSB_LIB::Address::country_ [private] |
std::string OSB_LIB::Address::email_ [private] |
std::string OSB_LIB::Address::faxNum_ [private] |
std::string OSB_LIB::Address::function_ [private] |
OwnerId OSB_LIB::Address::ownerId_ [private] |
std::string OSB_LIB::Address::state_ [private] |
std::string OSB_LIB::Address::street_ [private] |
std::string OSB_LIB::Address::telNum_ [private] |
TypeList OSB_LIB::Address::types_ [private] |
std::string OSB_LIB::Address::zipcode_ [private] |