Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.1.0)

E10653-02

oracle.jbo.common.sdo
Class SDOValueStore

java.lang.Object
  extended by org.eclipse.persistence.sdo.DefaultValueStore
      extended by oracle.jbo.common.sdo.SDOValueStore
All Implemented Interfaces:
java.util.EventListener, RowNavigationListener, RowSetListener, org.eclipse.persistence.sdo.ValueStore

public class SDOValueStore
extends org.eclipse.persistence.sdo.DefaultValueStore
implements RowSetListener


Nested Class Summary
 class SDOValueStore.RowSetList
          Wrapper class for RowSet attribute (1toM property)
 
Field Summary
static long SERVICE_MONITOR_SLEEP_INTERVAL
          the default sleep interval for the service monitor thread to sleep.
static long SERVICE_SESSION_INACTIVE_AGE
          constant the default age (in miliseconds) for a service session to be considered inactive.
 
Constructor Summary
SDOValueStore(Row viewrow, commonj.sdo.DataObject dataobject)
          constructor
SDOValueStore(Row viewrow, commonj.sdo.DataObject dataobject, FindCriteria findCriteria)
          constructor
 
Method Summary
static boolean afterCompletion(java.lang.String transactionId)
          internal use during transaction synchronization's afterCompletion(); It will set serviceScope flag to false for all SDOValueStore of the transaction
 void deepLoad()
           
 void deepLoad(boolean afterPostChanges)
          method to load all children and grandchildren.
static void deepLoad(org.eclipse.persistence.sdo.SDODataObject sdoObject, boolean afterPostChanges)
          Helper method to materizlize the whole dataobject tree.
 boolean equals(java.lang.Object obj)
           
protected  void finalize()
          called by GC.
 java.lang.Object getDeclaredProperty(int propertyIndex)
          SDO ValueStore interface
 java.lang.String getReturnMode()
           
 Row getRowValue()
          Get the row value
 boolean isDeepLoaded()
          method to indicate if this SDOValueStore is deeploaded or not.
 boolean isDirty()
          the dirty flag (meaning the row value is detached from DBTransaction and there are updated properties)
 boolean isDisconnectMode()
           
 boolean isInitialState()
          getter method for initialState property
 boolean isReadOnlyProperty(commonj.sdo.Property property)
          Check if the property is a readonly property
 boolean isServiceScope()
           
 boolean isSetDeclaredProperty(int propertyIndex)
          SDO ValueStore interface isSet() method implementation
 boolean isToExpandAllChildren()
           
 boolean isToNavigateManyChild()
           
 void leaveService()
          called during afterCompletion() to clean up service scope related flags.
 void navigated(NavigationEvent event)
          Invoked when the current-row designation changes.
 void postProcess(commonj.sdo.Property property, java.lang.Object propertyValue, commonj.sdo.DataObject dataObject)
           
 boolean propertyValueComeFromViewRowImpl(commonj.sdo.Property property)
          Check whether a property value is different from the attribute value from the ViewRowImpl or not.
 void rangeRefreshed(RangeRefreshEvent event)
          Invoked when the range changes.
 void rangeScrolled(ScrollEvent event)
          Invoked when the range is scrolled.
static void recordSDOValueStore(java.lang.String sessionId, SDOValueStore store)
          add the SDOValueStore into sSDOValueStoreMap.
static void recycleSession()
          recycle all inactive service sessions.
static void refershAfterPostChanges(java.lang.String transactionId)
          deepload after postchanges()
 void refreshRefreshableAttributes()
          refresh the refreshable attributes from the view row.
static void registerADFConfig(oracle.adf.share.ADFConfig adfConfig)
          static weak referenced map to figure out all running applications within the same VM.
 void reJoinService(ServiceCookieHandler newCookieHandler, ApplicationModule appModule)
          Helper method to set SDOValueStore's appModel and cookieHandler matching current service's.
static void releaseSDOValueStore(commonj.sdo.DataObject source)
           
static void releaseSDOValueStore(java.lang.String sessionId, SDOValueStore store)
           
static void requestRefreshAttribute(java.lang.String sessionId, SDOValueStore store)
          Add the source sdovaluestore to the request list that needs to refresh refreshable attributes at the end of transaction.
 void rowDeleted(DeleteEvent event)
          Invoked when a row has been deleted.
 void rowInserted(InsertEvent event)
          Invoked when a row has been inserted.
 void rowUpdated(UpdateEvent event)
          Invoked when an attribute of the row has been changed.
 void setDataTypeProperties(java.util.List<java.lang.String> propertyNameList, java.util.List propertyValues)
          Set attribute values by calling viewrow.setAttributeValues()
 void setDeclaredProperty(int propertyIndex, java.lang.Object value)
          SDO ValueStore public interface setDeclaredProperty() method implemenation
 void setDeclaredProperty(commonj.sdo.Property property, java.lang.Object value, boolean ignoreValueStore)
           
 void setDisconnectMode(boolean newdisconnectMode)
          accessors for disconnectMode
 void setFindCriteria(FindCriteria findCriteria)
           
 void setInitialState(boolean newinitialState)
          setter method for initialState property
 void setQueryParamValues(java.lang.Object[] paramValues)
           
 void setReturnMode(java.lang.String returnMode)
           
 void setServiceScope(boolean newserviceScope)
          setter method for service scope flag.
 void setToExpandAllChildren(boolean expand)
           
 void setToNavigateManyChild(boolean toNavigateManyChild)
           
 void setTypePropertyValues(java.lang.Object[] typePropertyValues)
          ValueStore public interface implementation
protected static boolean unremovableSessionCookie(java.lang.String sessionId)
          record how many applications that this SessionCookie already is not a valid SessionCookie.
 void unsetDeclaredProperty(int propertyIndex)
          ValueStore public interface implementation
 
Methods inherited from class org.eclipse.persistence.sdo.DefaultValueStore
copy, getOpenContentProperty, getOpenContentValues, getTypePropertiesIsSetStatus, getTypePropertyValues, initialize, isSetOpenContentProperty, setManyProperty, setOpenContentProperty, setOpenContentValues, setTypePropertiesIsSetStatus, unsetOpenContentProperty
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_SESSION_INACTIVE_AGE

public static final long SERVICE_SESSION_INACTIVE_AGE
constant the default age (in miliseconds) for a service session to be considered inactive. When a service session has not been update longer than this constant value, it is considered be an active session and will be recycled.

See Also:
Constant Field Values

SERVICE_MONITOR_SLEEP_INTERVAL

public static final long SERVICE_MONITOR_SLEEP_INTERVAL
the default sleep interval for the service monitor thread to sleep.

See Also:
Constant Field Values
Constructor Detail

SDOValueStore

public SDOValueStore(Row viewrow,
                     commonj.sdo.DataObject dataobject)
constructor

Parameters:
viewrow - Row instance that SDOValueStore bases on
dataobject - SDODataObject

SDOValueStore

public SDOValueStore(Row viewrow,
                     commonj.sdo.DataObject dataobject,
                     FindCriteria findCriteria)
constructor

Parameters:
viewrow -
dataobject -
findCriteria - FindCriteria
Method Detail

deepLoad

public void deepLoad()

deepLoad

public void deepLoad(boolean afterPostChanges)
method to load all children and grandchildren.


deepLoad

public static void deepLoad(org.eclipse.persistence.sdo.SDODataObject sdoObject,
                            boolean afterPostChanges)
Helper method to materizlize the whole dataobject tree.

Parameters:
sdoObject - materialized dataobject.
afterPostChanges - indicates whether deeploading occurs after postChanges

isDeepLoaded

public boolean isDeepLoaded()
method to indicate if this SDOValueStore is deeploaded or not.

Returns:
true if yes; otherwise, false.

setQueryParamValues

public void setQueryParamValues(java.lang.Object[] paramValues)

refreshRefreshableAttributes

public void refreshRefreshableAttributes()
refresh the refreshable attributes from the view row.


recordSDOValueStore

public static void recordSDOValueStore(java.lang.String sessionId,
                                       SDOValueStore store)
add the SDOValueStore into sSDOValueStoreMap. After JTA transaction completes, all SDOValueStore created within that JTA transaction will be marked as serviceScope=false.

Parameters:
sessionId - JTA transaction id, it is also the service session id
store - the SDOValueStore

releaseSDOValueStore

public static void releaseSDOValueStore(java.lang.String sessionId,
                                        SDOValueStore store)

releaseSDOValueStore

public static void releaseSDOValueStore(commonj.sdo.DataObject source)

requestRefreshAttribute

public static void requestRefreshAttribute(java.lang.String sessionId,
                                           SDOValueStore store)
Add the source sdovaluestore to the request list that needs to refresh refreshable attributes at the end of transaction.

Parameters:
sessionId - transaction id
store - sdo valuestore

leaveService

public void leaveService()
called during afterCompletion() to clean up service scope related flags.


registerADFConfig

public static void registerADFConfig(oracle.adf.share.ADFConfig adfConfig)
static weak referenced map to figure out all running applications within the same VM.


unremovableSessionCookie

protected static boolean unremovableSessionCookie(java.lang.String sessionId)
record how many applications that this SessionCookie already is not a valid SessionCookie. When it reaches the number of applications running currently, this sessionCookie will be removed from inactive session list.


recycleSession

public static void recycleSession()
recycle all inactive service sessions. It will be called from the service monitor thread.


refershAfterPostChanges

public static void refershAfterPostChanges(java.lang.String transactionId)
deepload after postchanges()


afterCompletion

public static boolean afterCompletion(java.lang.String transactionId)
internal use during transaction synchronization's afterCompletion(); It will set serviceScope flag to false for all SDOValueStore of the transaction

Parameters:
transactionId -
Returns:
true if the session cookie should be removed, otherwise false

setFindCriteria

public void setFindCriteria(FindCriteria findCriteria)

getRowValue

public Row getRowValue()
Get the row value

Returns:

isDirty

public boolean isDirty()
the dirty flag (meaning the row value is detached from DBTransaction and there are updated properties)

Returns:

getDeclaredProperty

public java.lang.Object getDeclaredProperty(int propertyIndex)
SDO ValueStore interface

Specified by:
getDeclaredProperty in interface org.eclipse.persistence.sdo.ValueStore
Overrides:
getDeclaredProperty in class org.eclipse.persistence.sdo.DefaultValueStore
Parameters:
propertyIndex -
Returns:
the property value

setDeclaredProperty

public void setDeclaredProperty(int propertyIndex,
                                java.lang.Object value)
SDO ValueStore public interface setDeclaredProperty() method implemenation

Specified by:
setDeclaredProperty in interface org.eclipse.persistence.sdo.ValueStore
Overrides:
setDeclaredProperty in class org.eclipse.persistence.sdo.DefaultValueStore
Parameters:
propertyIndex -
value -

setDeclaredProperty

public void setDeclaredProperty(commonj.sdo.Property property,
                                java.lang.Object value,
                                boolean ignoreValueStore)

isSetDeclaredProperty

public boolean isSetDeclaredProperty(int propertyIndex)
SDO ValueStore interface isSet() method implementation

Specified by:
isSetDeclaredProperty in interface org.eclipse.persistence.sdo.ValueStore
Overrides:
isSetDeclaredProperty in class org.eclipse.persistence.sdo.DefaultValueStore
Parameters:
propertyIndex -
Returns:

unsetDeclaredProperty

public void unsetDeclaredProperty(int propertyIndex)
ValueStore public interface implementation

Specified by:
unsetDeclaredProperty in interface org.eclipse.persistence.sdo.ValueStore
Overrides:
unsetDeclaredProperty in class org.eclipse.persistence.sdo.DefaultValueStore
Parameters:
propertyIndex -

setTypePropertyValues

public void setTypePropertyValues(java.lang.Object[] typePropertyValues)
ValueStore public interface implementation

Overrides:
setTypePropertyValues in class org.eclipse.persistence.sdo.DefaultValueStore
Parameters:
typePropertyValues -

finalize

protected void finalize()
                 throws java.lang.Throwable
called by GC. It registers "finished" service session to the inactive session list for recycling later by service monitor.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

reJoinService

public void reJoinService(ServiceCookieHandler newCookieHandler,
                          ApplicationModule appModule)
Helper method to set SDOValueStore's appModel and cookieHandler matching current service's. So the SDOValueStore created from previous service call can participate in the current service transaction.

Parameters:
newCookieHandler - current service cookie handler
appModule - the current new application module

isReadOnlyProperty

public boolean isReadOnlyProperty(commonj.sdo.Property property)
Check if the property is a readonly property

Parameters:
property -
Returns:
true if it is a readonly property. Otherwise, false

propertyValueComeFromViewRowImpl

public boolean propertyValueComeFromViewRowImpl(commonj.sdo.Property property)
Check whether a property value is different from the attribute value from the ViewRowImpl or not.

Parameters:
property -
Returns:
true if the property value is the same as the attribute value of the ViewRowImpl. Otherwise, false

setDataTypeProperties

public void setDataTypeProperties(java.util.List<java.lang.String> propertyNameList,
                                  java.util.List propertyValues)
Set attribute values by calling viewrow.setAttributeValues()

Parameters:
propertyStringList - List of String types that contains the names of target properties
propertyValues - the values of the properties to set to.

setInitialState

public void setInitialState(boolean newinitialState)
setter method for initialState property


isInitialState

public boolean isInitialState()
getter method for initialState property


setDisconnectMode

public void setDisconnectMode(boolean newdisconnectMode)
accessors for disconnectMode


isDisconnectMode

public boolean isDisconnectMode()

setServiceScope

public void setServiceScope(boolean newserviceScope)
setter method for service scope flag. When a SDOValueStore created inside service scope (JTA transaction) it needs to be record in the SDOValueStoreMap. After JTA transaction completes, all SDOValueStore for that session will be marked as serviceScope=false.

Parameters:
newserviceScope - the new value of service scope flag: true/false

isServiceScope

public boolean isServiceScope()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class org.eclipse.persistence.sdo.DefaultValueStore

rangeRefreshed

public void rangeRefreshed(RangeRefreshEvent event)
Description copied from interface: RowSetListener
Invoked when the range changes.

Specified by:
rangeRefreshed in interface RowSetListener
Parameters:
event - a description of the new ranges.

rangeScrolled

public void rangeScrolled(ScrollEvent event)
Description copied from interface: RowSetListener
Invoked when the range is scrolled.

Specified by:
rangeScrolled in interface RowSetListener
Parameters:
event - a description of the new range.

rowInserted

public void rowInserted(InsertEvent event)
Description copied from interface: RowSetListener
Invoked when a row has been inserted.

Specified by:
rowInserted in interface RowSetListener
Parameters:
event - a description of the new Row object.

rowDeleted

public void rowDeleted(DeleteEvent event)
Description copied from interface: RowSetListener
Invoked when a row has been deleted.

Specified by:
rowDeleted in interface RowSetListener
Parameters:
event - a description of the deleted Row object.

rowUpdated

public void rowUpdated(UpdateEvent event)
Description copied from interface: RowSetListener
Invoked when an attribute of the row has been changed.

Specified by:
rowUpdated in interface RowSetListener
Parameters:
event - a description of the modified Row object.

postProcess

public void postProcess(commonj.sdo.Property property,
                        java.lang.Object propertyValue,
                        commonj.sdo.DataObject dataObject)

navigated

public void navigated(NavigationEvent event)
Description copied from interface: RowSetListener
Invoked when the current-row designation changes.

Specified by:
navigated in interface RowNavigationListener
Specified by:
navigated in interface RowSetListener
Parameters:
event - a description of the new and previous current rows.

setToExpandAllChildren

public void setToExpandAllChildren(boolean expand)

isToExpandAllChildren

public boolean isToExpandAllChildren()

setToNavigateManyChild

public void setToNavigateManyChild(boolean toNavigateManyChild)

isToNavigateManyChild

public boolean isToNavigateManyChild()

setReturnMode

public void setReturnMode(java.lang.String returnMode)

getReturnMode

public java.lang.String getReturnMode()

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.1.0)

E10653-02

Copyright © 1997, 2009, Oracle. All rights reserved.