addListener, addManagementListener, createAndInitRow, createKey, createRow, enumerateRowsInRange, findByEntity, findByKey, first, getAllRowsInRange, getCurrentRow, getCurrentRowIndex, getCurrentRowSlot, getEstimatedRangePageCount, getFetchedRowCount, getName, getNextRangeSet, getPreviousRangeSet, getRangeIndexOf, getRow, getRowAtRangeIndex, getRowCount, getRowCountInRange, hasNext, hasPrevious, insertRow, insertRowAtRangeIndex, isConnected, isNameGenerated, isRangeAtBottom, isRangeAtTop, last, next, previous, removeCurrentRow, removeCurrentRowFromCollection,
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jbo.RowIterator |
createAndInitRow, createKey, createRow, enumerateRowsInRange, findByEntity, findByKey, first, getAllRowsInRange, getCurrentRow, getCurrentRowIndex, getCurrentRowSlot, getFetchedRowCount, getRangeIndexOf, getRow, getRowAtRangeIndex, getRowCount, getRowCountInRange, hasNext, hasPrevious, insertRow, insertRowAtRangeIndex, isRangeAtBottom, isRangeAtTop, last, next, previous, removeCurrentRow, removeCurrentRowFromCollection, reset, setCurrentRow, setCurrentRowAtRangeIndex |
isOnLine
public boolean isOnLine()
getParent
public WSObject getParent()
-
- Specified by:
getParent in class WSObject
getImplObject
public java.lang.Object getImplObject()
-
- Specified by:
getImplObject in class WSObject
setImplObject
public void setImplObject(java.lang.Object o)
-
- Specified by:
setImplObject in class WSObject
addDynamicAttribute
public AttributeDef addDynamicAttribute(java.lang.String attrName)
- Description copied from interface:
ViewObject
- Adds a dynamic attribute (an AttributeDefImpl) to this View Object's row set.
Dynamic attributes are typeless, in that the application can set the attribute value to any object. You can use a dynamic attribute to store information created at runtime that you want to store with the row data. It is used only by the View Object that created it. Attributes can be any Serializable object.
This method should not be overridden.
-
- Specified by:
addDynamicAttribute in interface ViewObject
-
- Parameters:
attrName - the name of the dynamic attribute.
- Returns:
- the attribute definition the newly added dynamic attribute.
setWhereClause
public void setWhereClause(java.lang.String cond)
- Description copied from interface:
ViewObject
- Sets a WHERE clause bind value of the View Object's query statement.
Bind variables can be specified using '?' as a place-holder for the value.
The new WHERE clause does not take effect until ViewObjectImpl.executeQuery() is called. For an example usage of this method, see ViewObjectImpl.setWhereClauseParam(int, Object) .
Note that calling setWhereClause() does not clear the previous settings of WHERE clause parameters. To reset WHERE clause parameters in the middle tier, call ViewObjectImpl.setWhereClauseParams(Object[]) explicitly with a null value. For example:
vo.setWhereClauseParams(null);
This method should not be overridden.
-
- Specified by:
setWhereClause in interface ViewObject
-
- Parameters:
cond - a WHERE clause, but excluding the 'WHERE' keyword.
getWhereClause
public java.lang.String getWhereClause()
- Description copied from interface:
ViewObject
- Gets the query's WHERE clause. If the query does not have a WHERE clause, this method returns null.
This WHERE clause is obtained from the View Object instance. In the middle tier, to get the WHERE clauses built from the View Object instance, the View definition, and the detail View Objects, use ViewObjectImpl.buildWhereClause(java.lang.StringBuffer, int)
-
- Specified by:
getWhereClause in interface ViewObject
-
- Returns:
- the WHERE clause, excluding the WHERE keyword; null if no WHERE clause exists.
setOrderByClause
public void setOrderByClause(java.lang.String expr)
- Description copied from interface:
ViewObject
- Sets the ORDER BY clause of the View Object's query statement. Bind variables can be specified using '?' as a place-holder for the value. The new ORDER BY clause does not take effect until
ViewObjectImpl.executeQuery() is called.
This method should not be overridden.
-
- Specified by:
setOrderByClause in interface ViewObject
getOrderByClause
public java.lang.String getOrderByClause()
- Description copied from interface:
ViewObject
- Returns the query's ORDER BY clause. If the query does not have an ORDER BY clause, this method returns null.
This method should not be overridden.
-
- Specified by:
getOrderByClause in interface ViewObject
-
- Returns:
- a ORDER BY clause, but excluding the 'ORDER BY' keyword. null if the SQL statement has no ORDER BY clause.
getQuery
public java.lang.String getQuery()
- Description copied from interface:
ViewObject
- Returns the query statement. Unlike
ViewObjectImpl.getUserDefinedQuery() this method will return a SQL statement regardless of whether the query was created in Expert or non-Expert Mode.
-
- Specified by:
getQuery in interface ViewObject
-
- Returns:
- the user-defined SQL query if one exists, otherwise, a query statement is assembled from defined FROM, WHERE, and ORDER BY clauses.
isReadOnly
public boolean isReadOnly()
- Description copied from interface:
ViewObject
- Tests if the View Object is read-only.
A view is read-only if it does not have Primary Keys or if all its entity references are reference-only.
This method should not be overridden.
-
- Specified by:
isReadOnly in interface ViewObject
-
- Returns:
true if this View Object is read-only; false if it is updateable.
createRowSet
public RowSet createRowSet(java.lang.String name)
- Description copied from interface:
ViewObject
- Creates and returns a new (secondary) Row Ret for this View Object.
-
- Specified by:
createRowSet in interface ViewObject
-
- Parameters:
name - the name for the new RowSet .
- Returns:
- the new Row Set.
getRowSets
public RowSet[] getRowSets()
- Description copied from interface:
ViewObject
- Gets all Row Sets that belong to this View Object.
-
- Specified by:
getRowSets in interface ViewObject
-
- Returns:
- the array of Row Sets.
findRowSet
public RowSet findRowSet(java.lang.String name)
- Description copied from interface:
ViewObject
- Gets the named Row Set that was created at runtime for this View Object.
-
- Specified by:
findRowSet in interface ViewObject
-
- Parameters:
name - a Row Set name. If null , it returns the the View Object.
- Returns:
- the Row Set.
null if the named Row Set is not not found.
findWSRowSet
public WSRowSetImpl findWSRowSet(java.lang.String name)
getViewLinkNames
public java.lang.String[] getViewLinkNames()
- Description copied from interface:
ViewObject
- Constructs an array of names of View Links that involve this View Object.
A View Link may use this View Object as either its source or destination. This method should not be overridden.
-
- Specified by:
getViewLinkNames in interface ViewObject
-
- Returns:
- the array of View Link names.
createViewCriteria
public ViewCriteria createViewCriteria()
- Description copied from interface:
ViewObject
- Creates a new view criteria (that is, "Query by Example") object for this View Object. A view criteria object is an alternative to using an arbitrary SQL statement. A view criteria is a list of row criteria for a View Object's WHERE clause, where a row criteria is an array containing criteria for the individual attributes.
A view criteria is a more structured way of creating a SQL query WHERE clause. After setting various conditions for the view criteria object, the application can call applyViewCriteria
This method should not be overridden.
-
- Specified by:
createViewCriteria in interface ViewObject
-
- Returns:
- the new view criteria object.
- See Also:
ViewCriteria , ViewObject.applyViewCriteria(ViewCriteria)
applyViewCriteria
public void applyViewCriteria(ViewCriteria criteria)
- Description copied from interface:
ViewObject
- Applies the view criteria to this View Object.
View criteria rows are ORed together, while entries in the same row are ANDed together.
This method should not be overridden.
-
- Specified by:
applyViewCriteria in interface ViewObject
-
- Parameters:
criteria - a view criteria object.
getViewCriteria
public ViewCriteria getViewCriteria()
- Description copied from interface:
ViewObject
- Gets the view criteria for this View Object.
This method should not be overridden.
-
- Specified by:
getViewCriteria in interface ViewObject
-
- Returns:
- the view criteria, or
null if none is specified.
findViewLinkAccessor
public AttributeDef findViewLinkAccessor(ViewLink vl)
- Description copied from interface:
ViewObject
- Finds the view link accessor attribute.
-
- Specified by:
findViewLinkAccessor in interface ViewObject
-
- Parameters:
vl - the view link whose accessor is being sought.
- Returns:
- the attribute definition if one is found.
null if not.
getKeyAttributeDefs
public AttributeDef[] getKeyAttributeDefs()
- Description copied from interface:
ViewObject
- Returns the attribute definitions that make up the constituents of the Key object for Rows returned from this View Object.
This method is used to pass AttributeDef[] to the Key.Key(String, AttributeDef[]) constructor to parse the constituent-bytes and convert them into value-objects that make up the Key.
Use this method to find out how the key is composed for the View Row. The View Object's key is a composite key, consisting of view attributes mapped to the primary keys of its Entity Objects.
-
- Specified by:
getKeyAttributeDefs in interface ViewObject
-
- Returns:
- the array of attribute definitions.
getAttrDefsForEntityAttr
public AttributeDef[] getAttrDefsForEntityAttr(java.lang.String eoName,
java.lang.String eoAttrName)
- Description copied from interface:
ViewObject
- Returns the definitions of view attributes that are mapped to the entity attribute identified by the entity name (the
eoName parameter) and the entity attribute name (the eoAttrName ).
Note that it returns an array because more than one View Object attribute may be mapped to one entity attribute.
This method can be used to identify view attributes that map into a particular entity object attribute. In particular, if a validation error fails on an entity attribute, this method can be used to find view attributes that map into that entity attribute.
-
- Specified by:
getAttrDefsForEntityAttr in interface ViewObject
-
- Parameters:
eoName - fully qualified name of the entity object.
eoAttrName - entity object attribute name.
- Returns:
- the array of attribute definitions.
clearCache
public void clearCache()
- Description copied from interface:
ViewObject
- Clears the View Object cache. This method can be called for resource conservation. Calling this method marks the View Object and all its Row Sets as "needing to refresh its data". If another method that requires the result set is called (e.g., executeQuery(), next(), previous()) after this method, the query will be executed and the View Object/Row Set's cache refreshed from the database.
-
- Specified by:
clearCache in interface ViewObject
getMaxFetchSize
public int getMaxFetchSize()
- Description copied from interface:
ViewObject
- Maximum number of rows to fetch for this View Object. This number takes effect in when the query for this ViewObject is executed the next time.
-
- Specified by:
getMaxFetchSize in interface ViewObject
setMaxFetchSize
public void setMaxFetchSize(int max)
- Description copied from interface:
ViewObject
- Maximum number of rows to fetch for this View Object. This number takes effect the next time the query for this View Object is executed.
Passing -1 to this method will retrieve an unlimited number of rows. This is the default.
Passing 0 to this method will cause the database query not to be executed. The View Object will initially work with an empty row set. If you want to execute query later, call setMaxFetchSize again with a non-zero argument, then call executeQuery().
-
- Specified by:
setMaxFetchSize in interface ViewObject
setQueryOptimizerHint
public void setQueryOptimizerHint(java.lang.String hintText)
- Description copied from interface:
ViewObject
- If this ViewObject does not have an expert mode query, then this hint is added to the select clause of the SQL for this ViewObject before the columns are listed e.g., SELECT \/*+ <hintText> *\/ columns... For expert mode queries, this hint is appended in the outer Select like: SELECT \/*+ <hintText> *\/ * FROM (<expert-query>)
-
- Specified by:
setQueryOptimizerHint in interface ViewObject
getQueryOptimizerHint
public java.lang.String getQueryOptimizerHint()
- Description copied from interface:
ViewObject
- Returns Query Optimizer Hint set for this ViewObject or for its definition object.
-
- Specified by:
getQueryOptimizerHint in interface ViewObject
isInternal
public boolean isInternal()
- Description copied from interface:
ViewObject
- Returns whether this View Object was created internally by BC4J or by an explicit user request.
-
- Specified by:
isInternal in interface ViewObject
readRowXML
public void readRowXML(Element elem,
int depthCount)
- Description copied from interface:
ViewObject
- Reads the data in XML form (in the format as generated by writeXML()) by finding a row that matches the key in the given XML and then reading in that row. If the row is not found, it tries to insert that row into this ViewObject with the attribute values from XML.
The depthcount parameter represents to what level the rendering should recurse. A depthcount of zero (0) means do not traverse any View Links while rendering. One (1) means traverse the View Links on this object but no View Links thereafter, and so on.
-
- Specified by:
readRowXML in interface ViewObject
readRowXML
public void readRowXML(Element elem,
int depthCount,
XSLStylesheet xslt)
-
- Specified by:
readRowXML in interface ViewObject
getAttributeDefs
public AttributeDef[] getAttributeDefs()
- Description copied from interface:
StructureDef
- Gets the defined attributes.
-
- Specified by:
getAttributeDefs in interface StructureDef
-
- Returns:
- an array of attribute definitions.
getAttributeCount
public int getAttributeCount()
- Description copied from interface:
StructureDef
- Returns the number of defined attributes.
-
- Specified by:
getAttributeCount in interface StructureDef
-
- Returns:
- the number of attributes.
findAttributeDef
public AttributeDef findAttributeDef(java.lang.String name)
- Description copied from interface:
StructureDef
- Gets an attribute definition, given its name.
-
- Specified by:
findAttributeDef in interface StructureDef
-
- Parameters:
name - the name of an AttributeDef .
- Returns:
- an attribute definition
lookupAttributeDef
public AttributeDef lookupAttributeDef(java.lang.String name)
- Description copied from interface:
StructureDef
- Gets an attribute definition, given its name.
-
- Specified by:
lookupAttributeDef in interface StructureDef
-
- Parameters:
name - the name of an AttributeDef .
- Returns:
- an attribute definition if found, null otherwise
getAttributeDef
public AttributeDef getAttributeDef(int index)
- Description copied from interface:
StructureDef
- Gets an attribute definition, given its index.
-
- Specified by:
getAttributeDef in interface StructureDef
-
- Parameters:
index - the index of an AttributeDef , where the leftmost attribute has index zero.
- Returns:
- an attribute definition.
getDefName
public java.lang.String getDefName()
- Description copied from interface:
ComponentObject
- Retrieves the name of the component's definition.
-
- Specified by:
getDefName in interface ComponentObject
-
- Returns:
- a class name.
getDefFullName
public java.lang.String getDefFullName()
- Description copied from interface:
ComponentObject
- Retrieves the fully-qualified name of the component's definition.
-
- Specified by:
getDefFullName in interface ComponentObject
-
- Returns:
- a class name.
getFullName
public java.lang.String getFullName()
- Description copied from interface:
ComponentObject
- Retrieves the fully-qualified name of this component.
-
- Specified by:
getFullName in interface ComponentObject
- Overrides:
getFullName in class WSObject
-
- Returns:
- the name of the object.
remove
public void remove()
- Description copied from interface:
ComponentObject
- Deletes this component.
-
- Specified by:
remove in interface ComponentObject
setMasterRowSetIterator
public boolean setMasterRowSetIterator(RowSetIterator masterRS)
- Description copied from interface:
RowSet
- Sets the master iterator.
-
- Specified by:
setMasterRowSetIterator in interface RowSet
-
- Parameters:
masterRS - a master row set iterator.
- Returns:
true if the operation succeeded.
getViewObject
public ViewObject getViewObject()
- Description copied from interface:
RowSet
- Gets the View Object that contains this Row Set.
-
- Specified by:
getViewObject in interface RowSet
-
- Returns:
- the parent View Object.
setWhereClauseParams
public void setWhereClauseParams(java.lang.Object[] values)
- Description copied from interface:
RowSet
- Specifies the bind variable values to use with the View Object's where-clause.
Setting the where-clause bind values through this method does not automatically execute the query. You must call RowSet.executeQuery() to apply the new bind values.
-
- Specified by:
setWhereClauseParams in interface RowSet
-
- Parameters:
values - an array of bind values. If the View Object is using the JDBC style bindings ("?" for bind variable), values[n] is bound to the bind variable that appears in the n-th order (0 based indexing). If the View Object is using the Oracle style bindings (":1", ":2", etc. for bind variable), values[n] is bound to the bind variable :(n+1) , i.e., values[0] is bound to :1 , values[1] is bound to :2 , etc.
setWhereClauseParam
public void setWhereClauseParam(int index,
java.lang.Object value)
- Description copied from interface:
RowSet
- Specifies a single bind variable value to use with the View Object's where-clause.
Setting the where-clause bind values through this method does not automatically execute the query. You must call RowSet.executeQuery() to apply the new bind values.
-
- Specified by:
setWhereClauseParam in interface RowSet
-
- Parameters:
index - the index identifying the bind variable. If the View Object is using the JDBC style bindings ("?" for bind variable), value is bound to the bind variable that appears in the index-th order (0 based indexing). If the View Object is using the Oracle style bindings (":1", ":2", etc. for bind variable), value is bound to the bind variable :(index+1) . If index is 0, value is bound to :1 . If index is 1, value is bound to :2 .
value - the bind variable value.
getWhereClauseParams
public java.lang.Object[] getWhereClauseParams()
- Description copied from interface:
RowSet
- Gets the bind variable values to be used with the View Object's where-clause.
-
- Specified by:
getWhereClauseParams in interface RowSet
-
- Returns:
- an array of bind-variable values.
executeQuery
public void executeQuery()
- Description copied from interface:
RowSet
- Executes the View Object's query.
-
- Specified by:
executeQuery in interface RowSet
refreshDataModel
public void refreshDataModel()
isExecuted
public boolean isExecuted()
- Description copied from interface:
RowSet
- Returns true if the current ViewObject's query has been executed for this Row Set.
-
- Specified by:
isExecuted in interface RowSet
-
- Returns:
true if query has been executed.
createRowSetIterator
public RowSetIterator createRowSetIterator(java.lang.String name)
- Description copied from interface:
RowSet
- Creates an iterator for the row set.
-
- Specified by:
createRowSetIterator in interface RowSet
-
- Parameters:
name - the name to be given to the iterator.
- Returns:
- an iterator for
this .
getRowSetIterators
public RowSetIterator[] getRowSetIterators()
- Description copied from interface:
RowSet
- Gets all Row Set Iterators that belong to this row set.
-
- Specified by:
getRowSetIterators in interface RowSet
-
- Returns:
- the array of Row Set Iterators.
findRowSetIterator
public RowSetIterator findRowSetIterator(java.lang.String name)
- Description copied from interface:
RowSet
- Gets the named Row Set Iterator that was created at runtime for this Row Set.
-
- Specified by:
findRowSetIterator in interface RowSet
-
- Parameters:
name - a Row Set Iterator name. If null , it returns the the Row Set.
- Returns:
- the Row Set Iterator.
null if the named Row Set Iterator is not not found.
removeMasterRowSetIterator
public boolean removeMasterRowSetIterator(RowSetIterator masterRS)
- Description copied from interface:
RowSet
- Removes a master row set iterator.
-
- Specified by:
removeMasterRowSetIterator in interface RowSet
-
- Returns:
true if masterRS was found, false otherwise.
getMasterRowSetIterators
public RowSetIterator[] getMasterRowSetIterators()
- Description copied from interface:
RowSet
- Return all controlling masters of this row set.
-
- Specified by:
getMasterRowSetIterators in interface RowSet
-
- Returns:
- An array of master iterators.
getApplicationModule
public ApplicationModule getApplicationModule()
- Description copied from interface:
RowSet
- Gets the row set's Application Module.
-
- Specified by:
getApplicationModule in interface RowSet
-
- Returns:
- the
ApplicationModule to which this belongs.
getEstimatedRowCount
public long getEstimatedRowCount()
- Description copied from interface:
RowSet
- Counts the number of rows in the collection defined by the View Object's query.
This number may fluxuate when the View Object is syncronized with its Entity Object.
-
- Specified by:
getEstimatedRowCount in interface RowSet
-
- Returns:
- the number of rows.
isForwardOnly
public boolean isForwardOnly()
- Description copied from interface:
RowSet
- Tests if the row set is constrained to sequential access.
-
- Specified by:
isForwardOnly in interface RowSet
-
- Returns:
true if the row set is restricted to forward-only processing.
- See Also:
RowSet.setForwardOnly(boolean)
setForwardOnly
public void setForwardOnly(boolean isForwardOnly)
- Description copied from interface:
RowSet
- Constrains the row set to sequential access.
When set to true , a row preceeding the current row cannot be designated as the new current row. This restriction allows performance to be optimized.
-
- Specified by:
setForwardOnly in interface RowSet
-
- Parameters:
isForwardOnly - true restricts the row set to forward-only processing, false otherwise.
getAccessMode
public byte getAccessMode()
-
- Specified by:
getAccessMode in interface RowSet
-
- Returns:
- Returns the current access mode for this RowSet.
- See Also:
RowSet.setAccessMode(byte)
setAccessMode
public void setAccessMode(byte accessMode)
- Description copied from interface:
RowSet
- Constrains the row access based on the following settings:
Switching access modes for a rowset will not take effect until the next explicit call to executeQuery.
-
- Specified by:
setAccessMode in interface RowSet
-
- Parameters:
accessMode - One of the three enumerated values SCROLLABLE , FORWARD_ONLY , RANGE_PAGING
setAssociationConsistent
public void setAssociationConsistent(boolean isAssociationConsistent)
- Description copied from interface:
RowSet
- Sets the association-consistent flag for this row set.
Association-consistent mode allows the user to see data that includes changes not yet posted to database, but at the cost of degraded performance.
When association-consistency is on the row set will reflect rows with modified foreign keys, newly created rows, and removed (deleted) rows. When association-consistency is off the user must post pending changes to database to make them visible.
This method is relevant only if this row set was one returned from a call to an entity association accessor.
-
- Specified by:
setAssociationConsistent in interface RowSet
isAssociationConsistent
public boolean isAssociationConsistent()
- Description copied from interface:
RowSet
- Tests if association-consistent mode is on.
-
- Specified by:
isAssociationConsistent in interface RowSet
-
- Returns:
true if un-posted changes are visible, false otherwise.
- See Also:
RowSet.setAssociationConsistent(boolean)
closeRowSet
public void closeRowSet()
- Description copied from interface:
RowSet
- Closes the row set. It closes all row set iterators that belong to this row set. If this row set is a detail row set in a master-detail relationship,
closeRowSet removes this row set from the master row set iterator.
-
- Specified by:
closeRowSet in interface RowSet
isFetchComplete
public boolean isFetchComplete()
- Description copied from interface:
RowSet
- Tests if the query result set has been fetched to the end.
-
- Specified by:
isFetchComplete in interface RowSet
-
- Returns:
true if the result set has been fetched to the end.
isMaxFetchSizeExceeded
public boolean isMaxFetchSizeExceeded()
- Description copied from interface:
RowSet
- Tests if the query result has been fetched to the end and the end was reached due to hitting the maxFetchSize limit
-
- Specified by:
isMaxFetchSizeExceeded in interface RowSet
-
- Returns:
true if the result set has been fetched to the maxFetchSize limit and there are still more rows in the database.
getProperty
public java.lang.Object getProperty(java.lang.String hintName)
- Description copied from interface:
Properties
- Retrieves the specified property, if it exists.
-
- Specified by:
getProperty in interface Properties
-
- Parameters:
hintName - Property name.
- Returns:
- the value of the property, if any, otherwise
null .
refreshProperty
public java.lang.Object refreshProperty(java.lang.String hintName)
- Description copied from interface:
Properties
- Retrieves the specified property, if it exists. If the application running in a 3 tier environment, it retrieves the property from the middle-tier server, refreshing the value on the client side. If the application is running in a 2 tier environment, it is equivalent to
getProperty .
-
- Specified by:
refreshProperty in interface Properties
-
- Parameters:
hintName - Property name.
- Returns:
- the value of the property, if any, otherwise
null .
getProperties
public java.util.Hashtable getProperties()
- Description copied from interface:
Properties
- Gets the table of properties.
-
- Specified by:
getProperties in interface Properties
-
- Returns:
- a hashtable of properties.
writeXML
public Node writeXML(int depthCount,
long options)
- Description copied from interface:
XMLInterface
- Renders data in a canonical XML-format. The classes
ViewObjectImpl and ViewRowImpl implement this method to render data in XML.
Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.
The depthcount parameter represents to what level the rendering should recurse. A depthcount of zero (0) means do not traverse any View Links while rendering. One (1) means traverse the View Links on this object but no View Links thereafter, and so on.
The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:
- public static long XML_OPT_LIMIT_RANGE = 0x00000001 - Controls whether writeXML will only write rows in the range. If this flag is off, all rows in the row set will be written. If this flag is on, only rows in the current range will be written.
- public static long XML_OPT_CHANGES_ONLY = 0x00000002 - Controls whether only changed attribute values of an entity row is written. If this is on, only the attributes whose value has been marked as "changed" will be written. If this is off, all attributes (regardless of whether the attribute value has been changed or not) will be written. This flag is relevant only when writing
EntityImpl .
-
- Specified by:
writeXML in interface XMLInterface
-
- Parameters:
depthCount - represents to what level the rendering should recurse.
options - a set of bit flags that will control the writeXML behavior.
writeXML
public Node writeXML(int depthCount,
long options,
XSLStylesheet xslt)
-
- Specified by:
writeXML in interface XMLInterface
readXML
public void readXML(Element elem,
int depthCount)
-
- Specified by:
readXML in interface XMLInterface
readXML
public void readXML(Element elem,
int depthCount,
XSLStylesheet xslt)
-
- Specified by:
readXML in interface XMLInterface
writeXML
public Node writeXML(long options,
com.sun.java.util.collections.HashMap voAttrMap)
- Description copied from interface:
XMLInterface
- Renders data in a canonical XML-format. The classes
ViewObjectImpl and ViewRowImpl implement this method to render data in XML.
Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.
The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:
- public static long XML_OPT_LIMIT_RANGE = 0x00000001 - Controls whether writeXML will only write rows in the range. If this flag is off, all rows in the row set will be written. If this flag is on, only rows in the current range will be written.
- public static long XML_OPT_CHANGES_ONLY = 0x00000002 - Controls whether only changed attribute values of an entity row is written. If this is on, only the attributes whose value has been marked as "changed" will be written. If this is off, all attributes (regardless of whether the attribute value has been changed or not) will be written. This flag is relevant only when writing
EntityImpl .
The voAttrMap parameter represents in a hashmap, the mapping between a given ViewObject's definition type and the corresponding Attributes/accessors to render. A null entry in the hashmap means, render all attributes and accessors of that viewobject type.
-
- Specified by:
writeXML in interface XMLInterface
-
- Parameters:
options - a set of bit flags that will control the writeXML
voAttrMap - HashMap containing Definition names of ViewObjects and an array of AttributeDef to render for a ViewObject of that definition type.
writeXML
public Node writeXML(long options,
com.sun.java.util.collections.HashMap voAttrMap,
XSLStylesheet xslt)
-
- Specified by:
writeXML in interface XMLInterface
getRowSet
public RowSet getRowSet()
- Description copied from interface:
RowSetIterator
- Gets the Row Set that this Iterator belongs to.
-
- Specified by:
getRowSet in interface RowSetIterator
- Specified by:
getRowSet in class WSRowSetIteratorBase
-
- Returns:
- the owning Row Set.
getDetailRowSets
public RowSet[] getDetailRowSets()
- Description copied from interface:
RowSetIterator
- Gets an array of detail Row Sets for which this Iterator is the master.
In a master-detail relationship in an Application Module, the master in reality is a Row Set Iterator. (Though we often speak of master View Object, in reality, it is the Iterator behind the View Object which is playing the role of the master). Whenever the currency of this master Iterator moves, the detail Row Sets are re-executed to show related Rows.
Calling this method returns an array of Row Sets that are related to this Iterator as detail Row Sets.
-
- Specified by:
getDetailRowSets in interface RowSetIterator
- Specified by:
getDetailRowSets in class WSRowSetIteratorBase
-
- Returns:
- an array of detail
RowSet .
createDetailRowSet
public RowSet createDetailRowSet(java.lang.String rsName,
java.lang.String linkDefName)
- Description copied from interface:
RowSetIterator
- Creates a detail Row Set. See
RowSetIterator.getDetailRowSets() for explanation of detail Row Sets.
This method creates a new detail Row Set for this Iterator.
-
- Specified by:
createDetailRowSet in interface RowSetIterator
- Specified by:
createDetailRowSet in class WSRowSetIteratorBase
-
- Parameters:
rsName - the name of the new detail Row Set.
linkDefName - the name of a View Link definition. This View Link chooses the relationship in which this Iterator is the master and the new Row Set is the detail. It must be a fully qualified name (including the package name).
- Returns:
- the new detail Row Set.
closeRowSetIterator
public void closeRowSetIterator()
- Description copied from interface:
RowSetIterator
- Closes this row set iterator. If this row set iterator is a master in a master-detail relationship,
closeRowSetIterator closes all detail row sets.
After that, it fires a RowSetManagementListener.iteratorClosed() event to its RowSetManagementListener's .
Then, it deregisters this row set iterator from the owning row set, and deregisters all its listeners.
-
- Specified by:
closeRowSetIterator in interface RowSetIterator
- Specified by:
closeRowSetIterator in class WSRowSetIteratorBase
getSyncLock
public java.lang.Object getSyncLock()
- Description copied from interface:
RowSetIterator
- Gets the locking object for this Row Set Iterator. Actually, this method locks the Application Module to which this Row Set Iterator belongs. See
ApplicationModule.getSyncLock() for details.
-
- Specified by:
getSyncLock in interface RowSetIterator
- Specified by:
getSyncLock in class WSRowSetIteratorBase
-
- Returns:
- the locking object.
setRangeSize
public int setRangeSize(int size)
- Description copied from interface:
RowIterator
- Modifies the size of the row set range.
This method takes effect when the next set of data is fetched. For an example usage of setRangeSize, see setRangeStart.
-
- Specified by:
setRangeSize in interface RowIterator
- Specified by:
setRangeSize in class WSRowSetIteratorBase
-
- Parameters:
size - the new number of rows in the row set range. Size of 0 is treated same as 1. Size < -1 is treated same as -1.
- Returns:
- the new size of the range.
- See Also:
RowIterator.setRangeStart(int)
getRangeSize
public int getRangeSize()
- Description copied from interface:
RowIterator
- Gets the size of the row set range.
-
- Specified by:
getRangeSize in interface RowIterator
- Specified by:
getRangeSize in class WSRowSetIteratorBase
-
- Returns:
- the number of rows in the range.
getRangeStart
public int getRangeStart()
- Description copied from interface:
RowIterator
- Gets the absolute index of the first row in the row set range.
The absolute index is 0-based, and is the row's index relative to the entire result set.
-
- Specified by:
getRangeStart in interface RowIterator
- Specified by:
getRangeStart in class WSRowSetIteratorBase
-
- Returns:
- an index.
setRangeStart
public int setRangeStart(int start)
- Description copied from interface:
RowIterator
- Moves the row set range.
Note that the index is 0-based. When you call setRangeStart(1), the range start will be positioned at the second table row.
Another behavior of setRangeStart (and also setRangeSize) is that it tries to position the range, so as to fill up the range as much as possible. For example, assume you have View Object vo focused on a table with four rows (A, B, C, D), and you execute the following code:
vo.setRangeStart(4);
vo.setRangeSize(3);
Row[] rows = vo.getAllRowsInRange();
In this case, rows contains the last 3 rows (B, C, D). When you call setRangeStart(4), it will try to position you at row 4. Since the index is 0-based, it finds that there is no row. Since the default range size is 1, it will position you to the last row (row index 3).
Then, when you call getRangeSize(3), it tries to fill up the range from the bottom. This is why you get (B, C, D).
-
- Specified by:
setRangeStart in interface RowIterator
- Specified by:
setRangeStart in class WSRowSetIteratorBase
-
- Parameters:
start - the absolute index of the new first row in the row set range.
scrollRange
public int scrollRange(int amount)
- Description copied from interface:
RowIterator
- Moves the row set range up or down a given number of rows.
-
- Specified by:
scrollRange in interface RowIterator
- Specified by:
scrollRange in class WSRowSetIteratorBase
-
- Parameters:
amount - the number of rows to scroll. A negative value scrolls upward.
- Returns:
- the number of rows actually scrolled.
scrollToRangePage
public int scrollToRangePage(int amount)
- Description copied from interface:
RowSetIterator
- Moves the row set range start to the given page index where every page consists of RangeSize number of rows. PageIndex should start at page number 1. This method calculates the rowIndex that should start at that page and then scrolls the iterator to start at that row by using the following calculation:
(rangeSize * (pageSize-1)) - getRangeStart();
-
- Specified by:
scrollToRangePage in interface RowSetIterator
- Overrides:
scrollToRangePage in class WSRowSetIteratorBase
-
- Parameters:
amount - the page number to go to in the result set.
- Returns:
- the number of rows actually scrolled.
scrollRangeTo
public int scrollRangeTo(Row row,
int index)
- Description copied from interface:
RowIterator
- Scrolls the range to place a given row at a given row set index.
-
- Specified by:
scrollRangeTo in interface RowIterator
- Specified by:
scrollRangeTo in class WSRowSetIteratorBase
-
- Parameters:
row - the row.
index - the row's new index.
- Returns:
- the actual number of rows scrolled. A negative number indicates that the scroll was scrolled upward.
setRowValidation
public void setRowValidation(boolean flag)
- Description copied from interface:
RowIterator
- Sets the validation flag on this iterator. By default a RowIterator validates the current row when navigating to another row. This method can be used to turn this row-validation off by passing 'false' as parameter.
-
- Specified by:
setRowValidation in interface RowIterator
- Specified by:
setRowValidation in class WSRowSetIteratorBase
-
- Parameters:
flag - Whether to turn row validation off or not.
getIterMode
public int getIterMode()
- Description copied from interface:
RowIterator
- Gets the current iteration mode. See Iteration Modes above for details on iteration mode which controls how the range behaves when it reaches the end of the Row Set.
-
- Specified by:
getIterMode in interface RowIterator
- Specified by:
getIterMode in class WSRowSetIteratorBase
-
- Returns:
- ITER_MODE_LAST_PAGE_PARTIAL if the iteration mode is "partial-last-page", ITER_MODE_LAST_PAGE_FULL if it is "full-last-page".
setIterMode
public void setIterMode(int mode)
- Description copied from interface:
RowIterator
- Sets the iteration mode for this Row Iterator. See Iteration Modes above for details on iteration mode which controls how the range behaves when it reaches the end of the Row Set.
-
- Specified by:
setIterMode in interface RowIterator
- Specified by:
setIterMode in class WSRowSetIteratorBase
-
- Parameters:
mode - should be ITER_MODE_LAST_PAGE_PARTIAL if the iteration mode is to be "partial-last-page", ITER_MODE_LAST_PAGE_FULL if it is to be "full-last-page".
Copyright © 1997, 2003, Oracle. All rights reserved.
|