com.sap.tc.cmi.model

Interface ICMIGenericModelClass02

All Superinterfaces:
ICMIGenericModelClass, ICMIModelClass

public interface ICMIGenericModelClass02
extends ICMIGenericModelClass

Extended version of ICMIGenericModelClass that provides sorted access to relations and access to relation role specific model object managers.

Implementing this interface is optional for a model class. If design time metadata exists for a class implementing this interface, then its model class setting "sap.cmi.genericModelClassVersion" should have a value of "02".

This type can be called, extended or implemented by applications or frameworks using CMI.

Since:
NW05 MS2

Type Classification Type Classification:

This interface is part of the Common Model Interface and is intended to be implemented by applications.


Method Summary
 ICMIModelObjectManager getMOManagerForRole(String targetRoleName)
          Returns a model object manager for the given target role or null, if a model object manager is not supported for that role.
 Collection getRelatedModelObjects(String targetRoleName, CMISortCriterion sortCriterion)
          Returns the objects associated via the given relation, sorted by the given criteria.
 
Methods inherited from interface com.sap.tc.cmi.model.ICMIGenericModelClass
addRelatedModelObject, associatedModelClassInfo, getAttributeValue, getRelatedModelObject, getRelatedModelObjects, removeRelatedModelObject, setAttributeValue, setRelatedModelObject, setRelatedModelObjects
 
Methods inherited from interface com.sap.tc.cmi.model.ICMIModelClass
associatedModel
 

Method Detail

getRelatedModelObjects

Collection getRelatedModelObjects(String targetRoleName,
                                  CMISortCriterion sortCriterion)
                                  throws CMIIllegalSortCriterionException
Returns the objects associated via the given relation, sorted by the given criteria. If the returned collection implements ICMISortable, then the result can be resorted at any later time.

Throws:
IllegalArgumentException - if the specified role is not part of this class or if it is not navigable
CMIIllegalSortCriterionException - if the given sortCriterion can not be supported

getMOManagerForRole

ICMIModelObjectManager getMOManagerForRole(String targetRoleName)
Returns a model object manager for the given target role or null, if a model object manager is not supported for that role.

If a model object manager is returned, objects created via that manager are automatically added to the given role of this model object. If objects are deleted via that manager, they are also automatically removed from the corresponding role.

Throws:
IllegalArgumentException - if the specified role is not part of this class or if it is not navigable.
Access Rights

This class can be accessed from:


SC DC
[sap.com] FRAMEWORK [sap.com] tc/cmi
[sap.com] FRAMEWORK [sap.com] tc/cm/ejb/api


Copyright 2010 SAP AG Complete Copyright Notice