com.sap.tc.mobile.cfs.wdbll
Class AbstractModelClass

java.lang.Object
  extended by com.sap.tc.mobile.cfs.pers.impl.spi.cache.AbstractPersistable
      extended by com.sap.tc.mobile.cfs.wdbll.AbstractModelClass
All Implemented Interfaces:
com.sap.tc.cmi.model.ICMIGenericModelClass, com.sap.tc.cmi.model.ICMIGenericModelClass02, com.sap.tc.cmi.model.ICMIModelClass, com.sap.tc.mobile.cfs.pers.impl.spi.cache.PersistableImpl, com.sap.tc.mobile.cfs.pers.spi.Persistable, com.sap.tc.mobile.cfs.pers.spi.PersistableSPI, GenericAccessCapable, com.sap.tc.mobile.cfs.type.spi.GenericAccessCapableSPI

public abstract class AbstractModelClass
extends com.sap.tc.mobile.cfs.pers.impl.spi.cache.AbstractPersistable
implements com.sap.tc.cmi.model.ICMIGenericModelClass02

Abstract ModelClass.

Author:
d039184

Field Summary
 
Fields inherited from class com.sap.tc.mobile.cfs.pers.impl.spi.cache.AbstractPersistable
mdCacheHandle, mdInvalid, mdReference
 
Constructor Summary
AbstractModelClass()
           
 
Method Summary
protected  boolean addRelatedModelObject(RelationDescriptor rdesc, com.sap.tc.mobile.cfs.pers.spi.PersistableSPI data)
           
 boolean addRelatedModelObject(java.lang.String name, com.sap.tc.cmi.model.ICMIModelClass data)
           
 com.sap.tc.cmi.model.ICMIModel associatedModel()
           
 com.sap.tc.cmi.metadata.ICMIModelClassInfo associatedModelClassInfo()
           
 void deleteAllChildRecords(java.lang.String aggregationName)
          Delete all child records of the given aggregation for this model class instance.
 void deleteAllChildren()
          Delete all child records from all aggregations on this model class instance.
 java.lang.Object getAttributeValue(java.lang.String name)
           
 com.sap.tc.cmi.model.ICMIModelObjectManager getMOManagerForRole(java.lang.String roleName)
           
protected  com.sap.tc.cmi.model.ICMIModelClass getRelatedModelObject(RelationDescriptor rdesc)
           
 com.sap.tc.cmi.model.ICMIModelClass getRelatedModelObject(java.lang.String name)
           
protected  java.util.Collection getRelatedModelObjects(RelationDescriptor rdesc)
           
 java.util.Collection getRelatedModelObjects(java.lang.String name)
           
 java.util.Collection getRelatedModelObjects(java.lang.String name, com.sap.tc.cmi.sorting.CMISortCriterion sortCriteria)
           
protected  void mdAddNewObject(com.sap.tc.mobile.cfs.type.spi.GenericAccessCapableSPI obj)
          Added new object, reflect it in .
protected  boolean mdCanChange(AttributeDescriptor attr, java.lang.Object value)
           
protected  void mdDisposeInstance(com.sap.tc.mobile.cfs.type.spi.GenericAccessCapableSPI obj)
          Remove an object, reflect it in .
 java.lang.Object mdGetField(AttributeDescriptor descriptor)
          Get persistent field value.
 void mdGetField(AttributeDescriptor descriptor, com.sap.tc.mobile.cfs.type.spi.ObjectDataOut accessor)
           
protected  java.util.Collection mdGetQueryWrapper(java.lang.String query, java.lang.Object params)
           
 void mdReadFields(com.sap.tc.mobile.cfs.type.spi.ObjectDataIn state)
           
 void mdSetField(AttributeDescriptor descriptor, java.lang.Object value)
          Set persistent field value.
 void mdSetField(AttributeDescriptor descriptor, com.sap.tc.mobile.cfs.type.spi.ObjectDataIn accessor)
           
 void mdWriteFields(com.sap.tc.mobile.cfs.type.spi.ObjectDataOut state)
           
protected  boolean removeRelatedModelObject(RelationDescriptor rdesc, com.sap.tc.mobile.cfs.pers.spi.PersistableSPI data)
           
 boolean removeRelatedModelObject(java.lang.String name, com.sap.tc.cmi.model.ICMIModelClass data)
           
 void setAttributeValue(java.lang.String name, java.lang.Object value)
           
protected  void setRelatedModelObject(RelationDescriptor rdesc, com.sap.tc.mobile.cfs.pers.spi.PersistableSPI data)
           
 void setRelatedModelObject(java.lang.String name, com.sap.tc.cmi.model.ICMIModelClass data)
           
protected  void setRelatedModelObjects(RelationDescriptor rdesc, java.util.Collection data)
           
 void setRelatedModelObjects(java.lang.String name, java.util.Collection data)
           
 
Methods inherited from class com.sap.tc.mobile.cfs.pers.impl.spi.cache.AbstractPersistable
mdDoModify, mdDoModify, mdExecuteQuery, mdGetCacheHandle, mdGetPersistenceManager, mdGetQuerySingleResult, mdGetReference, mdGetReferenceNoExc, mdInitNewInstance, mdIsDeleted, mdIsDirty, mdIsInvalid, mdIsNew, mdIsPersistent, mdPersistFields, mdSetCacheHandle, mdSetInvalidFlag, mdSetReference, mdValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sap.tc.mobile.cfs.type.api.GenericAccessCapable
mdGetClassDescriptor
 
Methods inherited from interface com.sap.tc.mobile.cfs.type.api.GenericAccessCapable
mdGetClassDescriptor
 

Constructor Detail

AbstractModelClass

public AbstractModelClass()
Method Detail

associatedModelClassInfo

public com.sap.tc.cmi.metadata.ICMIModelClassInfo associatedModelClassInfo()
Specified by:
associatedModelClassInfo in interface com.sap.tc.cmi.model.ICMIGenericModelClass
Specified by:
associatedModelClassInfo in interface com.sap.tc.cmi.model.ICMIModelClass

associatedModel

public com.sap.tc.cmi.model.ICMIModel associatedModel()
Specified by:
associatedModel in interface com.sap.tc.cmi.model.ICMIModelClass

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String name)
Specified by:
getAttributeValue in interface com.sap.tc.cmi.model.ICMIGenericModelClass

setAttributeValue

public void setAttributeValue(java.lang.String name,
                              java.lang.Object value)
Specified by:
setAttributeValue in interface com.sap.tc.cmi.model.ICMIGenericModelClass

getRelatedModelObject

public com.sap.tc.cmi.model.ICMIModelClass getRelatedModelObject(java.lang.String name)
Specified by:
getRelatedModelObject in interface com.sap.tc.cmi.model.ICMIGenericModelClass

addRelatedModelObject

public boolean addRelatedModelObject(java.lang.String name,
                                     com.sap.tc.cmi.model.ICMIModelClass data)
Specified by:
addRelatedModelObject in interface com.sap.tc.cmi.model.ICMIGenericModelClass

getRelatedModelObjects

public java.util.Collection getRelatedModelObjects(java.lang.String name)
Specified by:
getRelatedModelObjects in interface com.sap.tc.cmi.model.ICMIGenericModelClass

removeRelatedModelObject

public boolean removeRelatedModelObject(java.lang.String name,
                                        com.sap.tc.cmi.model.ICMIModelClass data)
Specified by:
removeRelatedModelObject in interface com.sap.tc.cmi.model.ICMIGenericModelClass

setRelatedModelObject

public void setRelatedModelObject(java.lang.String name,
                                  com.sap.tc.cmi.model.ICMIModelClass data)
Specified by:
setRelatedModelObject in interface com.sap.tc.cmi.model.ICMIGenericModelClass

setRelatedModelObjects

public void setRelatedModelObjects(java.lang.String name,
                                   java.util.Collection data)
Specified by:
setRelatedModelObjects in interface com.sap.tc.cmi.model.ICMIGenericModelClass

getMOManagerForRole

public com.sap.tc.cmi.model.ICMIModelObjectManager getMOManagerForRole(java.lang.String roleName)
Specified by:
getMOManagerForRole in interface com.sap.tc.cmi.model.ICMIGenericModelClass02

getRelatedModelObjects

public java.util.Collection getRelatedModelObjects(java.lang.String name,
                                                   com.sap.tc.cmi.sorting.CMISortCriterion sortCriteria)
                                            throws com.sap.tc.cmi.sorting.CMIIllegalSortCriterionException
Specified by:
getRelatedModelObjects in interface com.sap.tc.cmi.model.ICMIGenericModelClass02
Throws:
com.sap.tc.cmi.sorting.CMIIllegalSortCriterionException

mdGetQueryWrapper

protected java.util.Collection mdGetQueryWrapper(java.lang.String query,
                                                 java.lang.Object params)
Overrides:
mdGetQueryWrapper in class com.sap.tc.mobile.cfs.pers.impl.spi.cache.AbstractPersistable

mdCanChange

protected boolean mdCanChange(AttributeDescriptor attr,
                              java.lang.Object value)
Parameters:
attr - The descriptor of the attribute to be changed.
value - The value to set.
Returns:
true if the attribute can be changed to the given value.

mdAddNewObject

protected void mdAddNewObject(com.sap.tc.mobile.cfs.type.spi.GenericAccessCapableSPI obj)
Added new object, reflect it in .

Parameters:
obj - object added.

mdDisposeInstance

protected void mdDisposeInstance(com.sap.tc.mobile.cfs.type.spi.GenericAccessCapableSPI obj)
Remove an object, reflect it in .

Parameters:
obj - object removed.

addRelatedModelObject

protected boolean addRelatedModelObject(RelationDescriptor rdesc,
                                        com.sap.tc.mobile.cfs.pers.spi.PersistableSPI data)

getRelatedModelObject

protected com.sap.tc.cmi.model.ICMIModelClass getRelatedModelObject(RelationDescriptor rdesc)

getRelatedModelObjects

protected java.util.Collection getRelatedModelObjects(RelationDescriptor rdesc)

removeRelatedModelObject

protected boolean removeRelatedModelObject(RelationDescriptor rdesc,
                                           com.sap.tc.mobile.cfs.pers.spi.PersistableSPI data)

setRelatedModelObject

protected void setRelatedModelObject(RelationDescriptor rdesc,
                                     com.sap.tc.mobile.cfs.pers.spi.PersistableSPI data)

setRelatedModelObjects

protected void setRelatedModelObjects(RelationDescriptor rdesc,
                                      java.util.Collection data)

mdReadFields

public void mdReadFields(com.sap.tc.mobile.cfs.type.spi.ObjectDataIn state)
Specified by:
mdReadFields in interface com.sap.tc.mobile.cfs.pers.impl.spi.cache.PersistableImpl

mdWriteFields

public void mdWriteFields(com.sap.tc.mobile.cfs.type.spi.ObjectDataOut state)
Specified by:
mdWriteFields in interface com.sap.tc.mobile.cfs.pers.impl.spi.cache.PersistableImpl

mdGetField

public void mdGetField(AttributeDescriptor descriptor,
                       com.sap.tc.mobile.cfs.type.spi.ObjectDataOut accessor)
Specified by:
mdGetField in interface com.sap.tc.mobile.cfs.type.spi.GenericAccessCapableSPI

mdSetField

public void mdSetField(AttributeDescriptor descriptor,
                       com.sap.tc.mobile.cfs.type.spi.ObjectDataIn accessor)
Specified by:
mdSetField in interface com.sap.tc.mobile.cfs.type.spi.GenericAccessCapableSPI

mdGetField

public java.lang.Object mdGetField(AttributeDescriptor descriptor)
Description copied from interface: GenericAccessCapable
Get persistent field value. This is used to read fields of classes created at runtime, but can be used to read fields of normal classes created at design-time as well (primitive types will be wrapped, which creates overhead, however). PersistentReference fields will be also automatically handled. This method calls appropriate getter implementation (i.e., it works for computed fields as well).

Specified by:
mdGetField in interface GenericAccessCapable
Parameters:
descriptor - field descriptor.
Returns:
value of the specified field, as an object.

mdSetField

public void mdSetField(AttributeDescriptor descriptor,
                       java.lang.Object value)
Description copied from interface: GenericAccessCapable
Set persistent field value. This is used to write fields of classes created at runtime, but can be used to write fields of normal classes created at design-time as well (primitive types will be unwrapped). PersistentReference fields will be also automatically handled. This method calls appropriate setter implementation (i.e., it works for computed fields as well).

Specified by:
mdSetField in interface GenericAccessCapable
Parameters:
descriptor - field descriptor.
value - new value of the specified field, as an object.

deleteAllChildRecords

public void deleteAllChildRecords(java.lang.String aggregationName)
Delete all child records of the given aggregation for this model class instance.

Parameters:
aggregationName - The name of the aggregation.

deleteAllChildren

public void deleteAllChildren()
Delete all child records from all aggregations on this model class instance.