OSB_DB::RecordStreamGw Struct Reference

List of all members.

Detailed Description

This will perform all the database operation for RecordStream.

Definition at line 125 of file recordstream-gw.h.

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::RecordStreamGw::checkObjVs ( const Session session,
const OSB_LIB::RecordStreamInfo rs 
) [private]

Check if a record stream was modified since read from the database.

Parameters:
session Database session to use.
rs Record stream to verify.
Returns:
The object status of the stream.

bool OSB_DB::RecordStreamGw::fetch ( const Session session,
OSB_LIB::RecordStreamInfo rs 
)

Read the record stream from the database.

This will fetch the record stream info from the database. Before calling this function the object identifier should be set. It also reads the record source informations for this record stream.

Parameters:
session Database session to use.
rs Record stream info object to be fetched.
Returns:
True if object read successfully else false.

void OSB_DB::RecordStreamGw::fetchFiltered ( const Session session,
OSB_LIB::RecordStreams dest,
const OSB_LIB::RecordStreamFilter filter 
)

Read matched record streams from the database.

Parameters:
session Database session to use.
dest List of record streams to populate.
filter Record stream filter to use.

void OSB_DB::RecordStreamGw::fetchOthers ( const Session session,
OSB_LIB::RecordStreams dest 
)

Read parents and children of record streams from the database.

Parameters:
session Database session to use.
dest List of record streams to populate, it should contain the streams matched by the filter (see fetchFiltered()).

bool OSB_DB::RecordStreamGw::getNext ( const OSB_DB::Session session,
OSB_LIB::RecordStreamInfo dest,
const std::string &  format,
OSB_LIB::ModuleId  processor,
OSB_LIB::RecordStream::Status  status 
)

Read the next record stream based on record source format.

This will read the next record stream from the database based on record source format, module and record stream status. If there is no records it will return as false.

Parameters:
session Database session to use.
dest Record stream info object to be filled.
format Record source format to use.
processor Module which is going to process the record stream.
status Status for the record stream requested.
Returns:
True if there is any record stream read else false.

bool OSB_DB::RecordStreamGw::getNext ( const OSB_DB::Session session,
OSB_LIB::RecordStreamInfo dest,
OSB_LIB::ModuleId  processor,
const OSB_LIB::RecordSource::Oid srcId,
OSB_LIB::RecordStream::Status  status 
)

Read the next record stream based on record source id and the record stream status.

This will read the next record stream from the database based on record source id and record stream status. If there is no records it will return as false.

Parameters:
session Database session to use.
dest Record stream info object to be filled.
processor Module which is going to process the record stream.
srcId Record source id.
status Status of the record stream requested.
Returns:
True if there is any record stream read else false.

bool OSB_DB::RecordStreamGw::getNext ( const OSB_DB::Session session,
OSB_LIB::RecordStreamInfo dest,
OSB_LIB::ModuleId  processor,
OSB_LIB::RecordStream::Status  status 
)

Read the next record stream based on record source processor module and record stream status.

This will read the next record stream from the database based on the processor module and record stream status. If there is no record stream it will return as false.

Parameters:
session Database session to use.
dest Record stream info object to be filled.
processor Module which is going to process the record stream.
status Status of the record stream requested.
Returns:
True if there is any record stream read else false.

bool OSB_DB::RecordStreamGw::insert ( const Session session,
OSB_LIB::RecordStreamInfo rs 
) [private]

Insert the record stream into the database.

Parameters:
session Database session to use.
rs Record stream to insert.
Exceptions:
DbException in case of
  • an unknown unique constraint violation.
Returns:
True if successful, else false.
If successful the function sets the object id, sequence number and -if empty- the filename of rs.

OSB_LIB::ObjectStatus OSB_DB::RecordStreamGw::lock ( const Session session,
OSB_LIB::RecordStreamInfo rs 
) [private]

Lock a record stream in the database.

Parameters:
session Database session to use.
rs Record stream to lock, it's object version is incremented by 1 if the function returns OSB_LIB::objUnchanged.
Returns:
The object status of the stream.

bool OSB_DB::RecordStreamGw::remove ( const Session session,
OSB_LIB::RecordStreamInfo rs 
) [private]

Remove the record stream from the database.

Delete a record stream in the database, unset its object id if successful.

Parameters:
session Database session to use.
rs Record stream object to delete.
Returns:
True if object deleted successfully else false.

bool OSB_DB::RecordStreamGw::setProcessing ( const Session session,
const OSB_LIB::RecordStreamInfo::Oid rsId 
) [private]

Mark a record stream as being processed.

Parameters:
session Database session to use.
rsId Record stream to update.
Returns:
true in case of success, else false.
The function returns true only if the status of the stream in the database is rsReady.

bool OSB_DB::RecordStreamGw::setStatus ( const Session session,
const OSB_LIB::RecordStreamInfo rs,
OSB_LIB::RecordStream::Status  status 
) [private]

Set the status for the given record stream info.

Parameters:
session Database session to use.
rs Record stream to update.
status The new status of the stream.
Returns:
true if the new status is set else false.

bool OSB_DB::RecordStreamGw::update ( const Session session,
OSB_LIB::RecordStreamInfo rs 
) [private]

Update the record stream in the database.

This will update the record stream in the database. Before calling this function all the attributes should be updated in the record stream object. Object identifier is used to identify the object in the database.

Parameters:
session Database session to use.
rs Record stream object to update.
Returns:
True if rs updated successfully else false.


Friends And Related Function Documentation

friend class OSB_LIB::RecordStreamInfo [friend]

On reading the record stream info from the database this will fill all the private attributes.

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


The documentation for this struct was generated from the following file:
Generated on Sat Sep 2 14:09:02 2006 for OSB Library by  doxygen 1.4.7