OSB_DB::PersCreditGw Class Reference

List of all members.

Detailed Description

Database-gateway class for PersCredit.

Definition at line 130 of file credit-gw.h.

Public Member Functions

Private Member Functions


Constructor & Destructor Documentation

OSB_DB::PersCreditGw::PersCreditGw ( const PersCreditGw rhs  )  [private]

Prevent copying: Copy constructor not implemented.

OSB_DB::PersCreditGw::PersCreditGw (  )  [inline]

Constructor.

Definition at line 139 of file credit-gw.h.


Member Function Documentation

bool OSB_DB::PersCreditGw::delPersCredit ( const Session session,
const OSB_LIB::PersCredit::Oid oid 
)

Delete a personalized credit.

Parameters:
session Database session to use.
oid Unique id of personalized credit.
Returns:
True if success.

bool OSB_DB::PersCreditGw::fetchPersCredit ( const Session session,
OSB_LIB::PersCredit persCredit 
)

Load the personalized credit.

This function will load the personalized credit based on a specific id which is in persCredit.

Parameters:
session Database session to use.
persCredit Personalized credit.
Returns:
True if populated.

bool OSB_DB::PersCreditGw::insPersCredit ( const Session session,
const OSB_LIB::PersCredit persCredit 
)

Insert a new personalized credit.

Parameters:
session Database session to use.
persCredit Personalized credit to be inserted.
Returns:
True if success.

bool OSB_DB::PersCreditGw::lock ( const Session session,
const OSB_LIB::PersCredit::Oid oid 
)

Lock the personalized credit.

The caller should commit or rollback after use this method.
This function doesn't have "nowait" argument. Because it will return true only if the lock is setted by itself, if the table has already been setted, call lock(...) with blocking will cause hang.
Note: This is not so nice because of the "not care" strategy. That means we don't care who lock the table and who unlock it.

Parameters:
session Database session to use.
oid Unique id of personalized credit.
Exceptions:
It throws OsbException(172) if id mismatch.
Returns:
True if the lock is acquired.
False for personalized credit has already been locked.

PersCreditGw& OSB_DB::PersCreditGw::operator= ( const PersCreditGw rhs  )  [private]

Prevent assignment: Assignment not implemented.

bool OSB_DB::PersCreditGw::unlock ( const Session session,
const OSB_LIB::PersCredit::Oid oid,
bool  nowait 
)

Unlock the personalized credit.

Unlock() does not commit. However, other sessions see the lock as released only after the transaction which unlocked it is completed.
Calling unlock() for a lock which is not held has no effect.
If unlock() is called in blocking mode from a session other than that which acquired the lock and before the locker commits, then unlock will block until the locker completes its transaction. If unlock() is called in non-blocking mode, it returns false in this case.

Parameters:
session Database session to use.
oid Unique id of personalized credit.
nowait If the argument is false (blocking mode) then unlock() waits for the database resource to be released if it is busy.
If it is true (non-blocking mode), unlock() immediately returns false if the lock could not be released because the database resource was busy.
Returns:
True if the lock was not set or was set and successfully released (or the credit does not exist in the database).
False if unlock() was called in non-blocking mode and the lock could not be released.

bool OSB_DB::PersCreditGw::updPersCredit ( const Session session,
const OSB_LIB::PersCredit persCredit 
)

Update the current personalized credit.

Parameters:
session Database session to use.
persCredit Personalized credit to be updated.
Exceptions:
OsbException(169) if currency code mismatch.
OsbException(172) if id mismatch.
Returns:
True if success.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:08:53 2006 for OSB Library by  doxygen 1.4.7