Business Components

oracle.jbo
Interface ApplicationModule

All Known Implementing Classes:
ApplicationModuleImpl

public interface ApplicationModule
extends ComponentObject

Defines containers for coordinated objects related to a particular task.

Since:
JDeveloper 3.0

Field Summary
static java.lang.String DEFAULT_DEF_FULL_NAME
          The metadata defintion of the default Application Module.
static java.lang.String DEFAULT_ROOT_APP_MOD_NAME
          The name of the default root Application Module.
static int SYNC_IMMEDIATE
          All operations on middle-tier objects are performed immediately.
static int SYNC_LAZY
          Operations to be performed on middle-tier objects are batched until an operation forces middle-tier synchronization.
 
Method Summary
 void addWarning(JboWarning warn)
          Adds a warning message to the warning stack.
 ApplicationModule createApplicationModule(java.lang.String amName, java.lang.String defName)
          Creates and names an Application Module.
 ComponentObject createComponentObject(java.lang.String coName, java.lang.String coDefName)
          Creates a Component Object from the name of a ComponentObject metadata definition.
 ViewLink createViewLink(java.lang.String viewLinkName, java.lang.String viewLinkDefName, ViewObject master, ViewObject detail)
          Creates a new View Link.
 ViewLink createViewLinkBetweenViewObjects(java.lang.String viewLinkName, java.lang.String accessorName, ViewObject master, AttributeDef[] srcAttrs, ViewObject detail, AttributeDef[] destAttrs, java.lang.String assocClause)
          Creates a new View Link.
 ViewLink createViewLinkFromEntityAssocName(java.lang.String viewLinkName, java.lang.String entityAssocName, ViewObject master, ViewObject detail)
          Creates a new View Link.
 ViewObject createViewObject(java.lang.String vuName, java.lang.String voName)
          Creates a View Object from the name of a ViewObject metadata definition.
 ViewObject createViewObjectFromQueryClauses(java.lang.String vuName, 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 vuName, java.lang.String sqlStatement)
          Creates a View Object definition from a SQL statement.
 ApplicationModule findApplicationModule(java.lang.String amName)
          Finds an Application Module by name.
 ComponentObject findComponentObject(java.lang.String coName)
          Finds a named Component Object.
 RowSetIterator findRSIForEntity(RowSetIterator[] rsis, int eRowHandle)
          Finds the appropriate RowSetIterator for an entity row handle.
 ViewLink findViewLink(java.lang.String viewLinkName)
          Finds a named View Link.
 ViewObject findViewObject(java.lang.String voName)
          Finds a named View Object.
 java.lang.String[] getApplicationModuleNames()
          Gets the names of all Application Modules.
 Session getSession()
          Gets the Application Module's current session.
 ClientDocument getStyles(java.lang.String name)
          Gets the Application Module's style definitions from the middle tier.
 int getSyncMode()
          Gets the current sync mode.
 Transaction getTransaction()
          Gets the Application Module's current database transaction.
 java.lang.String[] getViewLinkNames()
          Gets the names of the Application Module's View Links.
 java.lang.String[] getViewObjectNames()
          Constructs an array of the names of the View Object definitions, both static and dynamic, defined in this Application Module.
 void setExceptionHandler(JboExceptionHandler hndlr)
          Sets the exception handler for the Application Module.
 void setStyles(java.lang.String name, ClientDocument clientDocument)
          Saves the Application Module's style definitions to the middle tier.
 void setSyncMode(int mode)
          Sets the syncronization mode between the client and the middle tier.
 void sync()
          Synchronizes all the result sets defined in this Application Module with the server.
 
Methods inherited from interface oracle.jbo.ComponentObject
getDefFullName, getDefName, getFullName, getName, remove
 
Methods inherited from interface oracle.jbo.Properties
getProperties, getProperty
 

Field Detail

DEFAULT_ROOT_APP_MOD_NAME

public static final java.lang.String DEFAULT_ROOT_APP_MOD_NAME
The name of the default root Application Module.

DEFAULT_DEF_FULL_NAME

public static final java.lang.String DEFAULT_DEF_FULL_NAME
The metadata defintion of the default Application Module.

SYNC_LAZY

public static final int SYNC_LAZY
Operations to be performed on middle-tier objects are batched until an operation forces middle-tier synchronization.

SYNC_IMMEDIATE

public static final int SYNC_IMMEDIATE
All operations on middle-tier objects are performed immediately.
Method Detail

createApplicationModule

public ApplicationModule createApplicationModule(java.lang.String amName,
                                                 java.lang.String defName)
Creates and names an Application Module.

If DEFAULT_DEF_FULL_NAME is passed for defName, a generic Application Module is created.

Parameters:
amName - the name to be assigned to the Application Module. If null, a system generated name is assigned.
defName - the name of the definition from which the new Application Module is to be created.
Returns:
a new Application Module.

findApplicationModule

public ApplicationModule findApplicationModule(java.lang.String amName)
Finds an Application Module by name.

The Application Module found is a contained reference, within this Application Module, having the given name.

Parameters:
amName - the name of the Application Module.
Returns:
the named Application Module.

getApplicationModuleNames

public java.lang.String[] getApplicationModuleNames()
Gets the names of all Application Modules.
Returns:
an array of Application Module names.

sync

public void sync()
Synchronizes all the result sets defined in this Application Module with the server.

Any changes in the result sets are uploaded to the server and the server updates are downloaded to the client.


setSyncMode

public void setSyncMode(int mode)
Sets the syncronization mode between the client and the middle tier.
Parameters:
mode - the new syncronization mode:

If SYNC_LAZY, operations on middle-tier objects are batched until sync() is called, or until an operation causes new data to be fetched from the server.

If SYNC_IMMEDIATE, all operations on middle-tier objects are performed immediately.


getSyncMode

public int getSyncMode()
Gets the current sync mode.
Returns:
SYNC_LAZY or SYNC_IMMEDIATE.

getViewObjectNames

public java.lang.String[] getViewObjectNames()
Constructs an array of the names of the View Object definitions, both static and dynamic, defined in this Application Module.
Returns:
String[] an array of ViewObject names.

findViewObject

public ViewObject findViewObject(java.lang.String voName)
Finds a named View Object.
Parameters:
voName - a View Object name.
Returns:
a View Object.

findComponentObject

public ComponentObject findComponentObject(java.lang.String coName)
Finds a named Component Object.
Parameters:
coName - a Component Object name.
Returns:
a Component Object.

createViewObject

public ViewObject createViewObject(java.lang.String vuName,
                                   java.lang.String voName)
Creates a View Object from the name of a ViewObject metadata definition.
Parameters:
vuName - the name that will be given to the ViewObject. If null, a system-generated name is assigned.
voName - the name of the ViewObject metadata definition.
Returns:
a View Object.

createComponentObject

public ComponentObject createComponentObject(java.lang.String coName,
                                             java.lang.String coDefName)
Creates a Component Object from the name of a ComponentObject metadata definition.
Parameters:
coName - the name that will be given to the ComponentObject. If null, a system-generated name is assigned.
coName - the name of the ComponentObject metadata definition.
Returns:
a Component Object.

createViewObjectFromQueryClauses

public ViewObject createViewObjectFromQueryClauses(java.lang.String vuName,
                                                   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.

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

Parameters:
vuName - the name that will be given to the View Object. If null, a system generated name is assigned.
eoName - the name of a EntityObject class.
selectClause - a SQL statement SELECT clause.
fromClause - a SQL statement FROM clause.
whereClause - a SQL statement WHERE clause.
orderbyClause - a SQL statement ORDERBY clause.
Returns:
a View Object.

createViewObjectFromQueryStmt

public ViewObject createViewObjectFromQueryStmt(java.lang.String vuName,
                                                java.lang.String sqlStatement)
Creates a View Object definition from a SQL statement.
Parameters:
vuName - the name that will be given to the View Object. If null, a system generated name is assigned.
sqlStatement - a SQL statement.
Returns:
a View Object.

getViewLinkNames

public java.lang.String[] getViewLinkNames()
Gets the names of the Application Module's View Links.
Returns:
an array of View Link names.

findViewLink

public ViewLink findViewLink(java.lang.String viewLinkName)
Finds a named View Link.
Parameters:
viewLinkName - a name.
Returns:
a ViewLink.

createViewLink

public ViewLink createViewLink(java.lang.String viewLinkName,
                               java.lang.String viewLinkDefName,
                               ViewObject master,
                               ViewObject detail)
Creates a new View Link.
Parameters:
viewLinkName - the name for the new View Link. If null, a system generated name is assigned.
viewLinkDefName - the name of the link definition that defines the link.
master - the View Object that is the source of the link.
detail - the View Object that is the destination of the link.
Returns:
a new ViewLink.

createViewLinkFromEntityAssocName

public ViewLink createViewLinkFromEntityAssocName(java.lang.String viewLinkName,
                                                  java.lang.String entityAssocName,
                                                  ViewObject master,
                                                  ViewObject detail)
Creates a new View Link.
Parameters:
viewLinkName - the name for the new View Link. If null, a system generated name is assigned.
entityAssocName - the name of the entity association from which the link is derived.
master - the View Object that is the source of the link.
detail - the View Object that is the destination of the link.
Returns:
a new ViewLink.

createViewLinkBetweenViewObjects

public ViewLink createViewLinkBetweenViewObjects(java.lang.String viewLinkName,
                                                 java.lang.String accessorName,
                                                 ViewObject master,
                                                 AttributeDef[] srcAttrs,
                                                 ViewObject detail,
                                                 AttributeDef[] destAttrs,
                                                 java.lang.String assocClause)
Creates a new View Link.
Parameters:
viewLinkName - the name for the new View Link. If null, a system generated name is assigned.
accessorName -  
master - the View Object that is the source of the link.
srcAttrs - the attributes of master that comprise the source of the link.
detail - the View Object that is the destination of the link.
destAttrs - the attributes of detail that comprise the destination of the link.
Returns:
a new ViewLink.

findRSIForEntity

public RowSetIterator findRSIForEntity(RowSetIterator[] rsis,
                                       int eRowHandle)
Finds the appropriate RowSetIterator for an entity row handle.
Parameters:
rsis - an array of RowSetIterator's to look through.
eRowHandle - the entity row handle.
Returns:
the RowSetIterator.

setExceptionHandler

public void setExceptionHandler(JboExceptionHandler hndlr)
Sets the exception handler for the Application Module.

The exception handler catches exceptions thrown by the middle tier in response to transactions generated by the Application Module.

Parameters:
hndlr - an exception handler.

addWarning

public void addWarning(JboWarning warn)
Adds a warning message to the warning stack.

This stack is erased when the method call on the middle-tier returns to the client.

Parameters:
hndlr - an warning handler.

setStyles

public void setStyles(java.lang.String name,
                      ClientDocument clientDocument)
Saves the Application Module's style definitions to the middle tier.
Parameters:
name - a name under which the style definitions are to be stored.
clientDocument - the ClientDocument to be saved.

getStyles

public ClientDocument getStyles(java.lang.String name)
Gets the Application Module's style definitions from the middle tier.
Parameters:
name - a name under which the style definitions are stored.

getTransaction

public Transaction getTransaction()
Gets the Application Module's current database transaction.
Returns:
a Transaction.

getSession

public Session getSession()
Gets the Application Module's current session.
Returns:
a Session.

Business Components