oracle.jbo.server
Class ViewLinkImpl
java.lang.Object
|
+--oracle.jbo.common.NamedObjectImpl
|
+--oracle.jbo.server.NamedObjectImpl
|
+--oracle.jbo.server.ComponentObjectImpl
|
+--oracle.jbo.server.ViewLinkImpl
- All Implemented Interfaces:
- ComponentObject, Properties, ViewLink
- public class ViewLinkImpl
- extends ComponentObjectImpl
- implements ViewLink
Implements the
ViewLink
interface, the middle-tier class that manages
a master-detail relationship between two View Objects.
A View Link models the master-detail
relationship between two View Objects. The actual relationship
is implemented between a row set iterator derived from the master View Object, and
a row set derived from the detail View Object.
The presence of a View Link causes the detail View Object to be refreshed when
master View Object's current row designation changes. Whenever the master
row set iterator designates a new current row, the detail row set is
notified to refresh itself. The RowSetListener
objects
listening for the detail row set's events will receive the
rangeRefreshed()
event.
A View Link also affects initialization of the "foreign key" attribute
of a detail row. When a new detail row is created its foreign key attribute
is taken from the master row set iterator's current row.
A View Link can be defined in three different ways:
-
From an Entity Association. If an Entity Association joins two Entity Objects,
then an application can define View Objects to represent the Entity Objects, and
a View Link to represent the Entity Association.
-
From a View Link Definition.
A View Link Definition can be created at designtime to
define a relationship between two View Object Definitions.
The View Link Definition may be based on an Entity Association, or on a
query statement relating the two View Object Definitions.
-
From attribute sets. A View Link may be defined dynamically at runtime from
two sets of attributes,
describing the master and detail sides of the link, respectively.
- Since:
- JDeveloper 3.0
- See Also:
ViewObject
,
RowSet
,
RowSetIterator
,
RowSetListener
Methods inherited from class oracle.jbo.server.ComponentObjectImpl |
addListener, create, createRef, getApplicationModule, getCompListeners, getCompListenersList,
getProxyClassName, getProxyClassName, getRootApplicationModule,
isRegWithPiggyMan, remove, setName,
setParent, setProxyClassName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
qoAssoc
protected oracle.jbo.server.ViewLinkDefImpl qoAssoc
source
protected ViewObjectImpl source
destination
protected ViewObjectImpl destination
mReversedUsage
protected boolean mReversedUsage
ViewLinkImpl
public ViewLinkImpl()
- Constructs a new View Link.
getDef
public oracle.jbo.server.DefObject getDef()
- Internal: Applications should not use this method.
Gets the definition object from which this View Link
was created.
- Returns:
- the definition object.
getDefName
public java.lang.String getDefName()
- Gets the name of the View Link definition from which this view
link was created.
- Specified by:
getDefName
in interface ComponentObject
- Overrides:
getDefName
in class ComponentObjectImpl
- Returns:
- the View Link definition name, without its package name.
getDefFullName
public java.lang.String getDefFullName()
- Gets the full name of the View Link definition from which this view
link ws created.
The name returned by this method is full qualified, that is, it
starts with the package name.
If this View Link is created dynamically, rather than from a View Link
definition,
the fully qualified definition name does not contain a package name.
- Specified by:
getDefFullName
in interface ComponentObject
- Overrides:
getDefFullName
in class ComponentObjectImpl
- Returns:
- s fully qualified View Link definition name.
getViewLinkDef
public oracle.jbo.server.ViewLinkDefImpl getViewLinkDef()
- Internal: Applications should not use this method.
Gets the View Link definition object from which this View Link
was created.
- Returns:
- the View Link definition.
getSource
public ViewObject getSource()
- Gets the master (source side) View Object.
- Specified by:
getSource
in interface ViewLink
- Returns:
- the master View Object.
setSource
public void setSource(ViewObject source)
- Sets the master (source side) View Object.
- Parameters:
source
- the master View Object.- Throws:
InvalidParamException
- if the master and detail
are the same View Object, or if the View Object Definitions
for source
and the View Link definition's
master do not match.
getDestination
public ViewObject getDestination()
- Gets the detail (destination side) View Object.
- Specified by:
getDestination
in interface ViewLink
- Returns:
- the detail View Object.
setDestination
public void setDestination(ViewObject destination)
- Sets the detail (destination side) View Object.
- Parameters:
destination
- the detail View Object.- Throws:
InvalidParamException
- if the master and detail
are the same View Object, or if the View Object Definitions
for destination
and the View Link definition's
detail do not match.
isReversedUsage
public boolean isReversedUsage()
getSourceAccessor
public AttributeDef getSourceAccessor()