Business Components

oracle.jbo.server
Class DBTransactionImpl

java.lang.Object
  |
  +--oracle.jbo.server.DBTransactionImpl

public class DBTransactionImpl
extends java.lang.Object
implements DBTransaction

The superclass of classes representing connections of middle-tier objects to databases.

Instances encapsulate the JDBC connection, provide commit() and rollback() operations, and maintain various internal framework states, events and caches of entity data.

Advanced applications can provide custom subclass implementations using DatabaseTransactionFactory.

Since:
JDevloper 3.0

Field Summary
static int MAX_CURSORS_UNINITIALIZED
           
protected  ConnectionCredentials mConnectionCredentials
           
protected  SQLBuilder mSQLBuilder
          The SQLBuilder instance used to interact with JDBC in this transaction.
 
Fields inherited from interface oracle.jbo.Transaction
LOCK_NONE, LOCK_OPTIMISTIC, LOCK_PESSIMISTIC
 
Constructor Summary
DBTransactionImpl(java.sql.Connection connection)
          Creates an instance from an existing JDBC connection.
DBTransactionImpl(java.lang.String url)
          Attempts to establish a connection to a database through the given URL.
DBTransactionImpl(java.lang.String url, java.util.Properties info)
          Attempts to establish a connection to a database through the given URL.
DBTransactionImpl(java.lang.String url, java.lang.String user, java.lang.String password)
          Attempts to establish a connection to a database through the given URL.
DBTransactionImpl(java.lang.String url, java.lang.String user, java.lang.String password, java.util.Properties info)
          Internal: Attempts to establish a connection to the given database URL.
 
Method Summary
 void addToValidationListeners(ValidationListener entity)
          Adds a validation listener.
 void addTransactionListener(TransactionListener listener)
          Adds a listener to the transaction's list.
 void addTransactionListenerNoCheck(TransactionListener listener)
          Adds a listener to the transaction's list, without checking whether the listener was present.
 void addTransactionPostListener(TransactionPostListener listener)
          Adds a subscriber to the transaction's post-events list.
 void addTransactionPostListenerNoCheck(TransactionPostListener listener)
          Adds a subscriber to the transaction's post-events list, without checking if it is already present.
 void addWarning(JboWarning warn)
          Adds a warning to the root Application Module's current list of warnings.
 void closeTransaction()
          Closes this transaction's JDBC connection.
 void commit()
          Commits all changes in this transaction to the database, making them visible to other users and transactions.
 void connect(java.sql.Connection sqlConnection)
          Internal: Applications should not use this method.
 void connect(java.lang.String url)
          Internal: Applications should not use this method.
 void connect(java.lang.String url, java.util.Properties info)
          Internal: Applications should not use this method.
 void connect(java.lang.String url, java.lang.String user, java.lang.String password)
          Internal: Applications should not use this method.
 ApplicationModule createApplicationModule(java.lang.String defName)
          Creates an Application Module.
 java.sql.CallableStatement createCallableStatement(java.lang.String str, int noRowsPrefetch)
          Creates a JDBC CallableStatement instance.
 EntityImpl createEntityInstance(EntityDefImpl entityDef, AttributeList al)
          Creates an EntityImpl instance based on the given defintion.
 EntityImpl createEntityInstance(java.lang.String entityDefName, AttributeList al)
          Creates an EntityImpl instance based on the named defintion.
 java.sql.PreparedStatement createPreparedStatement(java.lang.String str, int noRowsPrefetch)
          Creates a JDBC PreparedStatement instance.
 java.lang.Object createRef(java.lang.String structName, byte[] data)
          Internal: Applications should not use this method.
 java.sql.Statement createStatement(int noRowsPrefetch)
          Creates a JDBC Statement instance.
 ViewLink createViewLink(java.lang.String viewLinkDefName, ViewObject master, ViewObject detail)
          Creates a View Link.
 ViewLink createViewLinkBetweenViewObjects(java.lang.String accessorName, ViewObject master, AttributeDef[] srcAttrs, ViewObject detail, AttributeDef[] destAttrs, java.lang.String assocClause)
          Creates a View Link.
 ViewLink createViewLinkFromEntityAssocName(java.lang.String entityAssocName, ViewObject master, ViewObject detail)
          Creates a View Link.
 ViewObject createViewObject(java.lang.String voDefName)
          Creates a ViewObject instance based on the named defintion.
 ViewObject createViewObjectFromQueryClauses(java.lang.String eoName, java.lang.String selectClause, java.lang.String fromClause, java.lang.String whereClause, java.lang.String orderByClause)
          Creates an updatable View Object.
 ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement)
          Creates a View Object from a SQL statement.
 void disconnect()
          Internal: Applications should not use this method.
protected  void doCommit()
           
protected  void doRollback()
           
 void dumpEntityCaches(java.io.Writer out)
          Internal: Applications should not use this method.
 java.lang.String dumpQueryResult(java.lang.String query, java.lang.String dumpClassName, java.lang.String[] data)
          Internal : Applications should not use this method.
 int executeCommand(java.lang.String command)
          Executes a SQL command using a JDBC Statement under the current transaction.
 EntityImpl findByPrimaryKey(EntityDefImpl entityDef, Key key)
          Finds an Entity Object in this transaction given a Primary Key.
 EntityImpl findByPrimaryKey(java.lang.String entityDefName, Key key)
          Finds an Entity Object in this transaction given a Primary Key.
protected  java.sql.Connection getJdbcConnection()
           
 int getLockingMode()
          Gets the preferred locking mode for this Transaction.
 int getPostThreshold()
          Gets the threshold value for the commit-cycle's post phase.
 Session getSession()
          Gets the session information.
 SQLBuilder getSQLBuilder()
           
 TransactionHandler getTransactionHandler()
          Internal: Applications should not use this method.
 int getValidationThreshold()
          Gets the threshold value for the commit-cycle's validation phase.
 boolean isConnected()
          Checks if the transaction is connected to the database.
 boolean isDirty()
          Checks if any data within this Application Module has been modified but not yet committed.
 void postChanges()
          Synchronizes the changes in the transaction-cache with the database.
protected  void postChanges(TransactionEvent te)
          Synchronizes all the changes in this transaction-cache with the database.
 void reconnect(boolean force)
          Reconnect the application module to the database, if necessary, using previously supplied database credentials.
 void removeTransactionListener(TransactionListener listener)
          Removes a subscriber from the transaction's events list.
 void removeTransactionPostListener(TransactionPostListener listener)
          Removes a subscriber from the transaction's post-events list.
 void rollback()
          Discards all modifications made in this transaction.
 void setLockingMode(int mode)
          Sets the preferred locking mode for this Transaction.
 void setPostThreshold(int count)
          Sets the threshold value for the commit-cycle's post phase.
 void setTransactionHandler(TransactionHandler txnHandler)
          Internal: Applications should not use this method.
 void setValidationThreshold(int count)
          Sets the threshold value for the commit-cycle's validation phase.
 void showCursorUsage(java.io.Writer out)
          Internal: Applications should not use this method.
 void validate()
          Validates all subscribers in the ValidationListener list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSQLBuilder

protected SQLBuilder mSQLBuilder
The SQLBuilder instance used to interact with JDBC in this transaction.

MAX_CURSORS_UNINITIALIZED

public static final int MAX_CURSORS_UNINITIALIZED

mConnectionCredentials

protected ConnectionCredentials mConnectionCredentials
Constructor Detail

DBTransactionImpl

public DBTransactionImpl(java.sql.Connection connection)
Creates an instance from an existing JDBC connection. This constructor is used when applications supply their own JDBC connection to an Application Module's transaction.
Parameters:
connection - an existing connection.

DBTransactionImpl

public DBTransactionImpl(java.lang.String url)
Attempts to establish a connection to a database through the given URL. The driver manager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database URL of the form JDBC:subprotocol:subname.

DBTransactionImpl

public DBTransactionImpl(java.lang.String url,
                         java.util.Properties info)
Attempts to establish a connection to a database through the given URL. The driver manager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database URL of the form JDBC:subprotocol:subname.
info - a list of arbitrary string tag/value pairs as connection arguments; normally at least "user" and "password" tags should be included.

DBTransactionImpl

public DBTransactionImpl(java.lang.String url,
                         java.lang.String user,
                         java.lang.String password)
Attempts to establish a connection to a database through the given URL. The driver manager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database URL of the form JDBC:subprotocol:subname.
user - the database user on whose behalf the connection is being made.
password - the user's password.

DBTransactionImpl

public DBTransactionImpl(java.lang.String url,
                         java.lang.String user,
                         java.lang.String password,
                         java.util.Properties info)
Internal: Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname
user - the database user on whose behalf the Connection is being made
password - the user's password
info - a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included
Method Detail

closeTransaction

public void closeTransaction()
Closes this transaction's JDBC connection.

Performs rollback on the current transaction to reset all the data in the cache to their initial states and then drops the JDBC connection. This method is invoked by ApplicationModule.disconnect() to terminate the JDBC connection. Applications should use this method to properly release JDBC resources.

Specified by:
closeTransaction in interface DBTransaction

getSQLBuilder

public SQLBuilder getSQLBuilder()
Specified by:
getSQLBuilder in interface DBTransaction

commit

public void commit()
            throws JboException
Commits all changes in this transaction to the database, making them visible to other users and transactions.

When the commit process begins multiple attempts are made to validate all objects in the list of validation listeners, depending on the setting of the validation threshold. After each attempt, top-level entities that are still invalid will remain in the list. If any remain after the last attempt, a failure exception is thrown.

Each listed TransactionPostListener is notified to post any changes to the database using the postChanges() method. Non-transient listeners are notified first, followed by transient listeners. The post phase is repeated, the number of repetitions depending on the setting of the validation threshold. If any invalid objects remain after the last repetition, a failure exception is thrown.

Following validation, no further changes to data should be made until the commit operation is completed.

Finally, beforeCommit events are posted to the listeners, the data is committed, afterCommit events are posted, and transient listeners are deleted from the transaction. For both beforeCommit and afterCommit events, non-transient listeners preceed transient listeners.

See Also:
DBTransaction

rollback

public void rollback()
Discards all modifications made in this transaction. When this method is invoked, beforeRollback events are posted to the listeners, the changes are discarded, afterRollback events are posted, and transient listeners are deleted from the transaction. For both events, non-transient listeners preceed transient listeners.
See Also:
DBTransaction

addTransactionListener

public void addTransactionListener(TransactionListener listener)
Adds a listener to the transaction's list.

Listeners are notified of the commit and rollback events generated by the commit() and rollback() methods. The framework adds modified top-level Entity Objects to this list.

Specified by:
addTransactionListener in interface DBTransaction
Parameters:
listener - the subscriber to be added.

addTransactionListenerNoCheck

public void addTransactionListenerNoCheck(TransactionListener listener)
Adds a listener to the transaction's list, without checking whether the listener was present.

Listeners are notified of the commit and rollback events generated by the commit() and rollback() methods. The framework adds modified top-level Entity Objects to this list.

Specified by:
addTransactionListenerNoCheck in interface DBTransaction
Parameters:
listener - the subscriber to be added.

removeTransactionListener

public void removeTransactionListener(TransactionListener listener)
Removes a subscriber from the transaction's events list.
Specified by:
removeTransactionListener in interface DBTransaction
Parameters:
listener - the subscriber to be removed.

addTransactionPostListener

public void addTransactionPostListener(TransactionPostListener listener)
Adds a subscriber to the transaction's post-events list.

When postChanges() is invoked Each listed TransactionPostListener is notified to post any changes to the database.

Specified by:
addTransactionPostListener in interface DBTransaction
Parameters:
listener - the subscriber to be added.

addTransactionPostListenerNoCheck

public void addTransactionPostListenerNoCheck(TransactionPostListener listener)
Adds a subscriber to the transaction's post-events list, without checking if it is already present.

When postChanges() is invoked Each listed TransactionPostListener is notified to post any changes to the database.

Specified by:
addTransactionPostListenerNoCheck in interface DBTransaction
Parameters:
listener - the subscriber to be added.

removeTransactionPostListener

public void removeTransactionPostListener(TransactionPostListener listener)
Removes a subscriber from the transaction's post-events list.
Specified by:
removeTransactionPostListener in interface DBTransaction
Parameters:
listener - the subscriber to be removed.

postChanges

public void postChanges()
Synchronizes the changes in the transaction-cache with the database.

This method bypasses the validation cycle and may allow invalid data to be posted to the database. However, invalid changes cannot be committed, as the commit() method validates all changes before committing them.

Typically, applications should call this method, if they must execute SQL operations or queries with the current cached-state of data, before validating the changes.


postChanges

protected void postChanges(TransactionEvent te)
Synchronizes all the changes in this transaction-cache with the database. These changes are still not visible to other users/transaction.

Executes a savepoint before starting to post any changes. Then, all non-transient and transient TransactionPostListeners are notified to post their changes, in that order. In case of any exception, rollsback the transaction to the savepoint. and throws DMLException.


createStatement

public java.sql.Statement createStatement(int noRowsPrefetch)
Description copied from interface: DBTransaction
Creates a JDBC Statement instance.

Applications may use this method to create a JDBC statement object to execute application specific SQL statements directly, so that the modifications are committed to the database in a single transaction through this object.

Specified by:
createStatement in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
noRowPrefetch - the number of rows to prefetch when executing this statement's query.
Returns:
a JDBC Statement instance.

createCallableStatement

public java.sql.CallableStatement createCallableStatement(java.lang.String str,
                                                          int noRowsPrefetch)
Description copied from interface: DBTransaction
Creates a JDBC CallableStatement instance.

Applications may use this method to create a JDBC callable statement object to execute application-specific SQL statements directly, so that the modifications are committed to the database in a single transaction through this object.

Specified by:
createCallableStatement in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
str - the CallableStatement instance's SQL statement.
noRowPrefetch - the number of rows to prefetch when executing this statement's query.
Returns:
a JDBC CallableStatement instance.

createPreparedStatement

public java.sql.PreparedStatement createPreparedStatement(java.lang.String str,
                                                          int noRowsPrefetch)
Description copied from interface: DBTransaction
Creates a JDBC PreparedStatement instance.

Applications may use this method to create a JDBC callable statement object to execute application specific SQL statements directly, so that the modifications are committed to the database in a single transaction through this object.

Specified by:
createPreparedStatement in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
str - the PreparedStatement instance's SQL statement.
noRowPrefetch - the number of rows to prefetch when executing this statement's query.
Returns:
a JDBC PreparedStatement instance.

executeCommand

public int executeCommand(java.lang.String command)
Executes a SQL command using a JDBC Statement under the current transaction. Applications should use this method to execute application-specific JDBC statements.
Parameters:
command - a SQL command.
Returns:
the number of rows affected.
Throws:
InvalidParamException - if command is empty.
SQLStmtException - if command fails.

dumpQueryResult

public java.lang.String dumpQueryResult(java.lang.String query,
                                        java.lang.String dumpClassName,
                                        java.lang.String[] data)
Internal : Applications should not use this method.

getLockingMode

public int getLockingMode()
Gets the preferred locking mode for this Transaction. The default is LOCK_PESSIMISTIC.
Returns:
the preferred locking mode.

setLockingMode

public void setLockingMode(int mode)
Sets the preferred locking mode for this Transaction. The default is LOCK_PESSIMISTIC. Current locks are not affected.
Parameters:
mode - one of LOCK_PESSIMISTIC, LOCK_OPTIMISTIC or LOCK_NONE.

addToValidationListeners

public void addToValidationListeners(ValidationListener entity)
Description copied from interface: ValidationManager
Adds a validation listener.

The listener will be notified to perform its own validation when this validation manager is validated.

Tags copied from interface: ValidationManager
Parameters:
w - a validation listener.

validate

public void validate()
Validates all subscribers in the ValidationListener list. Typically all top-level entities which were invalidated through the framework will be in this list. Listeners are removed as they are validated.
Tags copied from interface: ValidationManager
Throws:
JboException - if validation fails.

setValidationThreshold

public void setValidationThreshold(int count)
Description copied from interface: DBTransaction
Sets the threshold value for the commit-cycle's validation phase.

When commit() is invoked the framework attempts to validate the transaction's modifications, making count attempts before failing with an exception. This mechanism allows applications to update data in the cache within the validation phase, and validate them before they are posted.

Specified by:
setValidationThreshold in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
count - the new threshold value.

getValidationThreshold

public int getValidationThreshold()
Description copied from interface: DBTransaction
Gets the threshold value for the commit-cycle's validation phase.
Specified by:
getValidationThreshold in interface DBTransaction

setPostThreshold

public void setPostThreshold(int count)
Description copied from interface: DBTransaction
Sets the threshold value for the commit-cycle's post phase.

When commit() is invoked the framework attempts to post the transaction's modifications, making count attempts before failing with an exception. This mechanism allows applications to update data in the cache within the post phase, and commit all changes.

Specified by:
setPostThreshold in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
count - the new threshold value.

getPostThreshold

public int getPostThreshold()
Description copied from interface: DBTransaction
Gets the threshold value for the commit-cycle's post phase.
Specified by:
getPostThreshold in interface DBTransaction

isDirty

public boolean isDirty()
Description copied from interface: Transaction
Checks if any data within this Application Module has been modified but not yet committed.
Tags copied from interface: Transaction
Returns:
true if the local data and the database differ.

dumpEntityCaches

public void dumpEntityCaches(java.io.Writer out)
Internal: Applications should not use this method.

showCursorUsage

public void showCursorUsage(java.io.Writer out)
Internal: Applications should not use this method.

doCommit

protected void doCommit()

doRollback

protected void doRollback()

connect

public void connect(java.sql.Connection sqlConnection)
Internal: Applications should not use this method.
Specified by:
connect in interface DBTransaction

connect

public void connect(java.lang.String url)
Internal: Applications should not use this method.
Tags copied from interface: Transaction
Parameters:
url - a database url of the form jdbc:subprotocol:subname.

connect

public void connect(java.lang.String url,
                    java.util.Properties info)
Internal: Applications should not use this method.
Tags copied from interface: Transaction
Parameters:
url - a database url of the form jdbc:subprotocol:subname.
info - a list of arbitrary string tag/value pairs to be used as connection arguments. Normally, at least "user" and "password" properties should be included.

connect

public void connect(java.lang.String url,
                    java.lang.String user,
                    java.lang.String password)
Internal: Applications should not use this method.
Tags copied from interface: Transaction
Parameters:
url - a database url of the form jdbc:subprotocol:subname.
user - the database user on whose behalf the connection is being made.
password - the user's password.

isConnected

public boolean isConnected()
Checks if the transaction is connected to the database.
Returns:
true.

reconnect

public void reconnect(boolean force)
Reconnect the application module to the database, if necessary, using previously supplied database credentials. If the parameter is true, then a database disconnect and reconnect is performed, whatever the current connection state, if false, the connect is only performed if the connection has disappeared.
Parameters:
forced - force a reconnect, should usually be false

disconnect

public void disconnect()
Internal: Applications should not use this method.

getTransactionHandler

public TransactionHandler getTransactionHandler()
Internal: Applications should not use this method.
Specified by:
getTransactionHandler in interface DBTransaction

setTransactionHandler

public void setTransactionHandler(TransactionHandler txnHandler)
Internal: Applications should not use this method.
Specified by:
setTransactionHandler in interface DBTransaction

createEntityInstance

public EntityImpl createEntityInstance(EntityDefImpl entityDef,
                                       AttributeList al)
Description copied from interface: DBTransaction
Creates an EntityImpl instance based on the given defintion.

Specified by:
createEntityInstance in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
entityDef - the defintion to to be used to create the instance.
al - an attribute list to be passed to the new instance's create() method.
Returns:
the new EntityImpl instance.

createEntityInstance

public EntityImpl createEntityInstance(java.lang.String entityDefName,
                                       AttributeList al)
Description copied from interface: DBTransaction
Creates an EntityImpl instance based on the named defintion.

Specified by:
createEntityInstance in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
entityDefName - the name of the defintion to to be used to create the instance.
al - an attribute list to be passed to the new instance's create() method.
Returns:
the new EntityImpl instance.

findByPrimaryKey

public EntityImpl findByPrimaryKey(EntityDefImpl entityDef,
                                   Key key)
Finds an Entity Object in this transaction given a Primary Key.
Specified by:
findByPrimaryKey in interface DBTransaction
Parameters:
entityDef - the defintion to to be used to find the instance.
key - the Primary Key.
Returns:
the Entity Object matching Key, or null if not found.

findByPrimaryKey

public EntityImpl findByPrimaryKey(java.lang.String entityDefName,
                                   Key key)
Finds an Entity Object in this transaction given a Primary Key.
Specified by:
findByPrimaryKey in interface DBTransaction
Parameters:
entityDefName - the name of the defintion to to be used to find the instance.
key - the Primary Key.
Returns:
the Entity Object matching Key, or null if not found.

createViewObject

public ViewObject createViewObject(java.lang.String voDefName)
Description copied from interface: DBTransaction
Creates a ViewObject instance based on the named defintion.

The caller should invoke remove() to dispose of the instance.

Specified by:
createViewObject in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
voDefName - the name of the defintion to to be used to create the instance.
Returns:
the new ViewObject instance.

createViewObjectFromQueryClauses

public ViewObject createViewObjectFromQueryClauses(java.lang.String eoName,
                                                   java.lang.String selectClause,
                                                   java.lang.String fromClause,
                                                   java.lang.String whereClause,
                                                   java.lang.String orderByClause)
Description copied from interface: DBTransaction
Creates an updatable View Object.

The View Object is constructed from an Entity Object and parts of a SQL statement.

The caller should invoke remove() to dispose of the instance.

Specified by:
createViewObjectFromQueryClauses in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
eoName - the name of a EntityObject beaninfo class.
selectClause - an SQL statement SELECT clause.
fromClause - an SQL statement FROM clause.
whereClause - an SQL statement WHERE clause.
orderbyClause - an SQL statement ORDERBY clause.

createViewObjectFromQueryStmt

public ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement)
Description copied from interface: DBTransaction
Creates a View Object from a SQL statement.

The caller should invoke remove() to dispose of the instance.

Specified by:
createViewObjectFromQueryStmt in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
sqlStatement - a SQL statement.

createApplicationModule

public ApplicationModule createApplicationModule(java.lang.String defName)
Description copied from interface: DBTransaction
Creates an Application Module.

Specified by:
createApplicationModule in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
defName - the name of the Application Module definition to be used. If null a default definition is used.
Returns:
a new Application Module.

createViewLink

public ViewLink createViewLink(java.lang.String viewLinkDefName,
                               ViewObject master,
                               ViewObject detail)
Creates a View Link.
Specified by:
createViewLink in interface DBTransaction
Parameters:
viewLinkDefName - the name of the definition to be used to create the link. If empty a default definition will be used.
master - the link's source.
detail - the link's destination.
Throws:
InvalidParamException - if master or detail are invalid.
InvalidObjNameException - if viewLinkName is invalid.
NameClashException - if viewLinkName already exists.

createViewLinkFromEntityAssocName

public ViewLink createViewLinkFromEntityAssocName(java.lang.String entityAssocName,
                                                  ViewObject master,
                                                  ViewObject detail)
Creates a View Link.
Specified by:
createViewLinkFromEntityAssocName in interface DBTransaction
Parameters:
entityAssocName - the entity association that the View Link will represent.
master - the link's source.
detail - the link's destination.
Throws:
InvalidParamException - if master, detail, or entityAssocName are invalid.
InvalidObjNameException - if viewLinkName is invalid.
NameClashException - if viewLinkName already exists.

createViewLinkBetweenViewObjects

public ViewLink createViewLinkBetweenViewObjects(java.lang.String accessorName,
                                                 ViewObject master,
                                                 AttributeDef[] srcAttrs,
                                                 ViewObject detail,
                                                 AttributeDef[] destAttrs,
                                                 java.lang.String assocClause)
Creates a View Link.
Specified by:
createViewLinkBetweenViewObjects in interface DBTransaction
Parameters:
accessorName - the name to be given to the View Link's accessor.
master - the link's source.
srcAttrs - link attributes taken from the master View Object.
detail - the link's destination.
destAttrs - link attributes taken from the detail View Object.
assocClause -  
Throws:
InvalidParamException - if master or detail are invalid.
InvalidObjNameException - if viewLinkName or accessorName are invalid.
NameClashException - if viewLinkName or accessorName already exist.

addWarning

public void addWarning(JboWarning warn)
Description copied from interface: DBTransaction
Adds a warning to the root Application Module's current list of warnings.

These warnings may be used for diagnostic purposes and may contain application-specific messages.

Specified by:
addWarning in interface DBTransaction
Tags copied from interface: DBTransaction
Parameters:
a - warning.

getSession

public Session getSession()
Gets the session information.
Specified by:
getSession in interface DBTransaction

getJdbcConnection

protected java.sql.Connection getJdbcConnection()

createRef

public java.lang.Object createRef(java.lang.String structName,
                                  byte[] data)
Description copied from interface: Transaction
Internal: Applications should not use this method.

Business Components