|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.common.BaseObject | +--oracle.jbo.server.NamedObjectImpl | +--oracle.jbo.server.ComponentObjectImpl | +--oracle.jbo.server.ContainerObjectImpl | +--oracle.jbo.server.ApplicationModuleImpl
The base class of Application Modules. An Application Module is a logical container for coordinated objects related to a particular task, with optional programming logic. Application Modules provide a simple runtime data connection model (one connection per Application Module) and a context for defining and executing transactions. The framework provides an AppRegistry class that clients can use to manage and share a pool of Application Modules. An Application Module provides the following functionality:
Clients can use a generic Application Module provided by the Business Component framework. Your Java code can customize the Application Module and the View Objects it contains.
Application Modules can be nested. That is, an Application Module can (logically) contain one or more other Application Modules as well as View Objects. When Application Modules are nested, the outer-most (top-level) Application Module provides the transaction context for the others.
oracle.jbo.common.appmgr.AppRegistry
Field Summary | |
static java.lang.String |
DEFAULT_DEF_NAME
|
Fields inherited from class oracle.jbo.server.ContainerObjectImpl |
mComponentList,
mComponents |
Fields inherited from class oracle.jbo.server.NamedObjectImpl |
mFullName,
mName,
mParent,
mProperties |
Fields inherited from class oracle.jbo.common.BaseObject |
TRACE_EVERY_ALLOC,
TRACE_NONE,
TRACE_OCCASIONAL,
TRACE_UNINITIALIZED |
Fields inherited from interface oracle.jbo.ApplicationModule |
DEFAULT_DEF_FULL_NAME,
DEFAULT_ROOT_APP_MOD_NAME,
SYNC_IMMEDIATE,
SYNC_LAZY |
Fields inherited from interface oracle.jbo.common.TransPostControl |
TRANS_POST_GET_ATTR_BY_INDEX,
TRANS_POST_GET_ATTR_BY_NAME,
TRANS_POST_GET_ATTR_COUNT,
TRANS_POST_GET_ATTR_INDEX_OF,
TRANS_POST_PUSHBACK,
TRANS_POST_REMOVE,
TRANS_POST_REVERT,
TRANS_POST_SET_ATTR_BY_INDEX,
TRANS_POST_SET_ATTR_BY_NAME |
Constructor Summary | |
protected |
ApplicationModuleImpl()
Constructs a new Application Module. |
Method Summary | |
protected void |
activate(Session session)
This method is called by the framweork when a root application module is created. |
protected void |
addChild(ComponentObjectImpl object)
Adds names to this Application Module's own list of child components. |
void |
addWarning(JboWarning warn)
Adds a warning handler. |
protected void |
create()
|
ApplicationModule |
createApplicationModule(java.lang.String amName,
java.lang.String defName)
Creates an Application Module. |
ComponentObject |
createComponentObject(java.lang.String coName,
java.lang.String comDefName)
Creates a Component Object from the name of a ComponentObject metadata definition. |
static ApplicationModuleImpl |
createRootApplicationModule(java.lang.String applicationModuleDefName,
Session sess)
A factory method for creating a root Application Module. |
static void |
createSharedDataHandle()
User of app module knows when the def objects are ready User calls this fucntion to register a shared data handle with MOM and later uses it |
ViewLink |
createViewLink(java.lang.String viewLinkName,
java.lang.String viewLinkDefName,
ViewObject master,
ViewObject detail)
Creates a 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 View Link. |
ViewLink |
createViewLinkFromEntityAssocName(java.lang.String viewLinkName,
java.lang.String entityAssocName,
ViewObject master,
ViewObject detail)
Creates a View Link. |
ViewObject |
createViewObject(java.lang.String voName,
java.lang.String vDefName)
Creates a View Object. |
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 updateable View Object. |
ViewObject |
createViewObjectFromQueryStmt(java.lang.String qName,
java.lang.String query)
Creates a View Object. |
static void |
createXMLSharedDataHandle()
User of app module knows when the JboElementImpl's are ready User calls this fucntion to register a shared data handle with MOM and later uses it |
java.lang.String |
dumpQueryResult(java.lang.String query,
java.lang.String dumpClassName,
java.lang.String[] data)
|
int |
executeCommand(java.lang.String command)
|
ApplicationModule |
findApplicationModule(java.lang.String amName)
Gets the named Application Module. |
ComponentObject |
findComponentObject(java.lang.String compName)
Find the component Object from the AppModule, This can be a generic component |
RowSetIterator |
findRSIForEntity(RowSetIterator[] rsis,
int eRowHandle)
Finds the appropriate RowSetIterator for an entity row handle. |
ViewLink |
findViewLink(java.lang.String vlName)
Finds a named View Link. |
ViewObject |
findViewObject(java.lang.String voName)
Finds a named View Object. |
protected ApplicationModuleDefImpl |
getApplicationModuleDef()
Returns the definition associated with this Application Module. |
ApplicationModuleImpl[] |
getApplicationModuleImpls()
Creates an array of Application Modules. |
java.lang.String[] |
getApplicationModuleNames()
Constructs an array of Application Module names. |
java.lang.String |
getClientProxyClassName()
Return the client proxy's class name for this Application Module. |
DBTransaction |
getDBTransaction()
Gets the root Application Module's database transaction. |
java.lang.String |
getDefFullName()
Gets the fully-qualified name of this Application Module's definition. |
java.lang.String |
getDefName()
Gets the name of this Application Module's definition. |
Row |
getEntityRowFromHandle(int eRowHandle)
|
oracle.jbo.common.remote.rAttributeDescription[] |
getQueryInfo(ViewObject vo)
Constructs an array of a View Object's attribute descriptors. |
Session |
getSession()
Gets the session information. |
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 transaction information. |
java.lang.String[] |
getViewLinkNames()
Construct an array of the names of the Application Module's View Links. |
ViewLinkImpl[] |
getViewLinks()
Construct an array of the Application Module's View Links. |
java.lang.String[] |
getViewObjectNames()
Construct an array of the names of the Application Module's View Objects. |
ViewObject[] |
getViewObjects()
Constructs an array of this Application Module's View Objects. |
boolean |
isRoot()
Determines if this is the root Application Module. |
void |
remove()
Deletes this Application Module. |
protected void |
removeChild(ComponentObjectImpl object)
Removes names from this Application Module's own list of child components. |
void |
setExceptionHandler(JboExceptionHandler hndlr)
Sets the exception handler. |
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. |
java.lang.Object |
transPostGetAttr(int op,
int hdl,
int index,
java.lang.String name)
|
void |
transPostPushback(int hdl)
Internal: Applications should not use this method. |
void |
transPostRemove(int hdl)
Internal: Applications should not use this method. |
void |
transPostRevert(int hdl)
Internal: Applications should not use this method. |
void |
transPostRowOp(int op,
int hdl)
|
void |
transPostSetAttr(int op,
int hdl,
int index,
java.lang.String name,
java.lang.Object value)
|
Methods inherited from class oracle.jbo.server.ContainerObjectImpl |
addContainerListener,
removeContainerListener |
Methods inherited from class oracle.jbo.server.ComponentObjectImpl |
addListener,
createRef,
getApplicationModule,
getCompListeners,
getProxyClassName,
getProxyClassName,
getRootApplicationModule,
isRegWithPiggyMan,
setProxyClassName |
Methods inherited from class oracle.jbo.server.NamedObjectImpl |
getFullName,
getName,
getParent,
getProperties,
getPropertiesAsStrings,
getProperty,
setFullName,
setProperty |
Methods inherited from class oracle.jbo.common.BaseObject |
dumpState,
setTraceLevel,
setTraceWriter |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String DEFAULT_DEF_NAME
Constructor Detail |
protected ApplicationModuleImpl()
Method Detail |
protected void create()
public static ApplicationModuleImpl createRootApplicationModule(java.lang.String applicationModuleDefName, Session sess)
applicationModuleDefName
- the name of an Application Module definition.sess
- the session.public static void createSharedDataHandle()
public static void createXMLSharedDataHandle()
protected void activate(Session session) throws java.lang.IllegalStateException
protected ApplicationModuleDefImpl getApplicationModuleDef()
public boolean isRoot()
true
if this is the root.protected void addChild(ComponentObjectImpl object)
object
- an object to add to the component listNamedObjectImpl
protected void removeChild(ComponentObjectImpl object)
object
- an object to add to the component listNamedObjectImpl
public java.lang.String getDefName()
public java.lang.String getDefFullName()
public ApplicationModule createApplicationModule(java.lang.String amName, java.lang.String defName)
amName
- the name to be given to the Application Module.
If amName
is empty a name is generated.defName
- the name of the Application Module definition to be used.
If null
a default definition is used.public ApplicationModule findApplicationModule(java.lang.String amName)
amName
- the name of the Application Module.
If amName
is empty the root Application Module is returned.public java.lang.String[] getApplicationModuleNames()
public void transPostPushback(int hdl)
public void transPostRemove(int hdl)
public void transPostRevert(int hdl)
public void transPostRowOp(int op, int hdl)
public java.lang.Object transPostGetAttr(int op, int hdl, int index, java.lang.String name)
public void transPostSetAttr(int op, int hdl, int index, java.lang.String name, java.lang.Object value)
public Row getEntityRowFromHandle(int eRowHandle)
public void sync()
Any changes in the result sets are uploaded to the server and the server updates are downloaded to the client.
public void setSyncMode(int mode)
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.
public int getSyncMode()
SYNC_LAZY
or SYNC_IMMEDIATE
.public java.lang.String[] getViewObjectNames()
public java.lang.String[] getViewLinkNames()
public ViewLinkImpl[] getViewLinks()
public ViewLink createViewLink(java.lang.String viewLinkName, java.lang.String viewLinkDefName, ViewObject master, ViewObject detail)
viewLinkName
- the name to be given to the View Link.
If empty a name is generated.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.master
or detail
are invalid.viewLinkName
is invalid.viewLinkName
already exists.public ViewLink createViewLinkFromEntityAssocName(java.lang.String viewLinkName, java.lang.String entityAssocName, ViewObject master, ViewObject detail)
viewLinkName
- the name to be given to the View Link.
If empty a name is generated.entityAssocName
- the entity association that the View Link will represent.master
- the link's source.detail
- the link's destination.master
,
detail
, or entityAssocName
are invalid.viewLinkName
is invalid.viewLinkName
already exists.public ViewLink createViewLinkBetweenViewObjects(java.lang.String viewLinkName, java.lang.String accessorName, ViewObject master, AttributeDef[] srcAttrs, ViewObject detail, AttributeDef[] destAttrs, java.lang.String assocClause)
viewLinkName
- the name to be given to the View Link.
If empty a name is generated.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
- master
or detail
are invalid.viewLinkName
or accessorName
are invalid.viewLinkName
or accessorName
already exist.public ViewObject findViewObject(java.lang.String voName)
voName
- a View Object name.public ComponentObject findComponentObject(java.lang.String compName)
coName
- a Component Object name.public ViewLink findViewLink(java.lang.String vlName)
viewLinkName
- a name.ViewLink
.public DBTransaction getDBTransaction()
public ViewObject[] getViewObjects()
public ViewObject createViewObjectFromQueryStmt(java.lang.String qName, java.lang.String query)
qName
- the name to be given to the View Object.
If empty a name is generated.query
- the SQL query that defines the View Object.qName
is invalid.qName
does not exist.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)
vuName
- the name to be given to the View Object.
If empty a name is generated.eoName
- the name of the EntityObject
from which the
View Object is to be derived.selectClause
- a SQL statement SELECT clause.fromClause
- a SQL statement FROM clause.whereClause
- a SQL statement WHERE clause.orderbyClause
- a SQL statement ORDERBY clause.vuName
is invalid.vuName
already exists.public int executeCommand(java.lang.String command)
public java.lang.String dumpQueryResult(java.lang.String query, java.lang.String dumpClassName, java.lang.String[] data)
public ViewObject createViewObject(java.lang.String voName, java.lang.String vDefName)
voName
- the name to be given to the View Object.
If empty a name is generated.vDefName
- the name of a view definition.voName
is invalid.voName
does not exist.public ComponentObject createComponentObject(java.lang.String coName, java.lang.String comDefName)
ComponentObject
metadata definition.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.public ApplicationModuleImpl[] getApplicationModuleImpls()
public oracle.jbo.common.remote.rAttributeDescription[] getQueryInfo(ViewObject vo)
vo
- a View Object.public void remove()
public java.lang.String getClientProxyClassName()
public void setExceptionHandler(JboExceptionHandler hndlr)
an
- exception handler.public void addWarning(JboWarning warn)
a
- warning.public void setStyles(java.lang.String name, ClientDocument clientDocument)
name
- a name under which the style definitions are to be stored.clientDocument
- the ClientDocument
to be saved.public ClientDocument getStyles(java.lang.String name)
name
- a name under which the style definitions are stored.public Session getSession()
Session
.public Transaction getTransaction()
Transaction
.public RowSetIterator findRSIForEntity(RowSetIterator[] rsis, int eRowHandle)
RowSetIterator
for an entity row handle.rsis
- an array of RowSetIterator
's to look through.eRowHandle
- the entity row handle.RowSetIterator
.
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |