Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::UPN::UpnDbCompanyRecord Class Reference
+ Inheritance diagram for SoftwareAndServices::Library::UPN::UpnDbCompanyRecord:
+ Collaboration diagram for SoftwareAndServices::Library::UPN::UpnDbCompanyRecord:

Public Member Functions

 UpnDbCompanyRecord ()
 UpnDbCompanyRecord() - Default constructor. More...
 
virtual ~UpnDbCompanyRecord ()
 ~UpnDbCompanyRecord() - Destructor. More...
 
bool Add (UpnDbAuthHandle_t Auth, UpnDbUpnId_t CompanyUpnId)
 Add a new UpnDbCompany. More...
 
bool Add (UpnDbAuthHandle_t Auth)
 Add this object as a new record. More...
 
bool GetActive () const
 true when this record is active. More...
 
time_t GetCreated () const
 
UpnDbUpnId_t GetCreatedByUpnId () const
 
bool GetHasChanged () const
 
bool Load (UpnDbAuthHandle_t Auth, const char *CompanyUpn)
 Load company record. More...
 
bool Remove (UpnDbAuthHandle_t Auth)
 Remove this object. More...
 
void SetActive (bool IsActive)
 Indicate if this record is active. More...
 
bool SetCreated (String &TimeOut)
 
void SetCreatedByUpnId (UpnDbUpnId_t Creator)
 Set the created by UPN ID. More...
 
bool Update (UpnDbAuthHandle_t Auth) const
 Update this record. More...
 

Static Public Member Functions

static UpnDbCompanyDbId_t Find (UpnDbAuthHandle_t Auth, const char *WildCard, std::list< const char *> &Results)
 Find matching company, matching wild card. More...
 
static UpnDbUpnId_t GetSiteId ()
 
static void SetSiteId (UpnDbAuthHandle_t Auth, UpnDbUpnId_t SiteUpnId)
 Set the applications SITE ID. More...
 

Protected Member Functions

void SetCreated (time_t When)
 Set the created time. More...
 
void SetHasChanged (bool ItChanged)
 Set change state. More...
 

Detailed Description

Definition at line 68 of file UpnDbCompanyRecord.hpp.

Constructor & Destructor Documentation

◆ UpnDbCompanyRecord()

SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::UpnDbCompanyRecord ( )

UpnDbCompanyRecord() - Default constructor.

◆ ~UpnDbCompanyRecord()

virtual SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::~UpnDbCompanyRecord ( )
virtual

~UpnDbCompanyRecord() - Destructor.

Member Function Documentation

◆ Add() [1/2]

bool SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::Add ( UpnDbAuthHandle_t  Auth,
UpnDbUpnId_t  CompanyUpnId 
)

Add a new UpnDbCompany.

Parameters
AuthAn authentiation handle.
CompanyUpnIdThe UPN ID of the company.
Returns
The true when added, and CompanyUpnId is a company UPN.

◆ Add() [2/2]

bool SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::Add ( UpnDbAuthHandle_t  Auth)
virtual

Add this object as a new record.

Parameters
AuthThe authentication handle to use.
Returns
true if added.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

◆ Find()

static UpnDbCompanyDbId_t SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::Find ( UpnDbAuthHandle_t  Auth,
const char *  WildCard,
std::list< const char *> &  Results 
)
static

Find matching company, matching wild card.

Parameters
AuthAn authentiation handle.

Some of the characters of the company name. Example "abc" will find: "Abc Company", "Super abcd inc", and so one.

Matches any location of WildCard in any company name.

Parameters
ResultsA reference to a std::list<const char*> that will be cleared, any contents freed, and then filled up with the results of matching company names.
Returns
The number found.
Note
Caller must free each (const char*) entry in Results, when no longer needed.
Your can repeatedly call Find() with the same Results, without clearing Results first, as Find() will clear free the contents of Results before processing.
For SQL aware users, this calls for a select on the UPN table something like:

SELECT upn from upns WHERE upn ILIKE 'WildCard'

◆ GetActive()

bool SoftwareAndServices::Library::UPN::Change::GetActive ( ) const
inherited

true when this record is active.

◆ GetCreated()

time_t SoftwareAndServices::Library::UPN::Change::GetCreated ( ) const
inherited
Returns
The time created, as a time_t.

◆ GetCreatedByUpnId()

UpnDbUpnId_t SoftwareAndServices::Library::UPN::Change::GetCreatedByUpnId ( ) const
inherited
Returns
the UPN ID of the creator of the record.

◆ GetHasChanged()

bool SoftwareAndServices::Library::UPN::Change::GetHasChanged ( ) const
inherited
Returns
true when this record has been updated and needs changed.

◆ GetSiteId()

static UpnDbUpnId_t SoftwareAndServices::Library::UPN::Change::GetSiteId ( )
staticinherited
Returns
the applications site UPN ID, or ZERO (0) if not set.

◆ Load()

bool SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::Load ( UpnDbAuthHandle_t  Auth,
const char *  CompanyUpn 
)

Load company record.

Parameters
AuthAn authentiation handle.
CompanyUpnThe company UPN to load.
Returns
True when found and loaded.

◆ Remove()

bool SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::Remove ( UpnDbAuthHandle_t  Auth)
virtual

Remove this object.

Parameters
AuthThe authentication handle to use.
Returns
true if removed.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

◆ SetActive()

void SoftwareAndServices::Library::UPN::Change::SetActive ( bool  IsActive)
inherited

Indicate if this record is active.

Parameters
IsActiveWhen true, this record is marked active.

◆ SetCreated() [1/2]

bool SoftwareAndServices::Library::UPN::Change::SetCreated ( String TimeOut)
inherited
Returns
The time created as a string YYYY-MM-DDTHH:MM:SS format
Parameters
TimeOutThe results of this method.
Returns
true when the time is not zero.

◆ SetCreated() [2/2]

void SoftwareAndServices::Library::UPN::Change::SetCreated ( time_t  When)
protectedinherited

Set the created time.

Parameters
WhenThe time_t of creation.

◆ SetCreatedByUpnId()

void SoftwareAndServices::Library::UPN::Change::SetCreatedByUpnId ( UpnDbUpnId_t  Creator)
inherited

Set the created by UPN ID.

Parameters
CreatorThe UPN ID of the creator of the record.

◆ SetHasChanged()

void SoftwareAndServices::Library::UPN::Change::SetHasChanged ( bool  ItChanged)
protectedinherited

Set change state.

Parameters
ItChangedWhen true, indicate this record has changed.

◆ SetSiteId()

static void SoftwareAndServices::Library::UPN::Change::SetSiteId ( UpnDbAuthHandle_t  Auth,
UpnDbUpnId_t  SiteUpnId 
)
staticinherited

Set the applications SITE ID.

Must me a memember of the authentication credentials realm, or the authentication credentials are an administrator for that realm.

Parameters
AuthThe authentication handle.
SiteUpnIdThe site's UPN ID.

◆ Update()

bool SoftwareAndServices::Library::UPN::UpnDbCompanyRecord::Update ( UpnDbAuthHandle_t  Auth) const
virtual

Update this record.

Parameters
AuthThe authentication handle to use.
Returns
true if updated.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.


The documentation for this class was generated from the following file: