All Categories Class Hierarchy This Category Previous Next Indexes
Product Class CATDMUsrConnection
CATDMUsrConnection
public class CATDMUsrConnection
BOM database connection management class.
Role: this class provides services for the BOM (build of material)
database, such as connection management, commit and rollback.
Note on Commit and
Rollback : these methods should be used carefully, especially if called during standard VPM operations that alter
the database themselves; if the legacy code performs an intermediate commit,
for example, and the operation, whatever it is, happens to fail, VPM will
perform a rollback is perfomed, which will not cancel all the changes since
a part of them were actually commited.
Method Index
- o
Commit(int)
- Commits changes in the database.
- o
Open()
- Opens a connection to the BOM database.
- o
Rollback(int)
- Rollbacks changes in the database.
Methods
o Commit
| public static Error Commit( | const int | iCallUserExit | =1) |
-
Commits changes in the database.
Role: Use this method to commit changes made to the BOM database
instance through other dedicated APIs.
A rollback is automatically performed on failure.
- Parameters:
-
- iCallUserExit
- If true, method will last invoke user-exit CATDMUsrMethod::AfterCommitUserAction()
or CATDMUsrMethod::AfterRollbackUserAction() on failure.
- Returns:
- Error structure.
The short and long messages are valuated, their de-allocation (using
the delete[] operator) is the responsibility of the calling
method.
- See also:
- CATDMUsrMethod
o Open
| public static Error Open( | ) |
-
Opens a connection to the BOM database.
Role: This method should be called prior to any other BOM-related
API, such as CATDMUsrEnvironment or CATDMUsrInstance.
Precondition: the implementation assumes a valid VPM session
is already opened.
- See also:
- CATVpmSCUsrLogin
- Returns:
- Error structure.
The short and long messages are valuated, their de-allocation (using
the delete[] operator) is the responsibility of the calling
method.
- See also:
- CATDMUsrMethod
o Rollback
| public static void Rollback( | const int | iCallUserExit | =1) |
-
Rollbacks changes in the database.
Role: Use this method to rollback changes made to the BOM database
instance through other dedicated APIs.
- Parameters:
-
- iCallUserExit
- If true, method will last invoke user-exit CATDMUsrMethod::AfterRollbackUserAction().
This object is included in the file: CATDMUsrConnection.h
If needed, your Imakefile.mk should include the module: LV003DBA