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

java.lang.Object
  extended by com.sap.tc.mobile.cfs.wdbll.AbstractInfo
      extended by com.sap.tc.mobile.cfs.wdbll.AbstractModelClassInfo
All Implemented Interfaces:
com.sap.tc.cmi.metadata.ICMIAbstractInfo, com.sap.tc.cmi.metadata.ICMIModelClassInfo, UserDescriptor

public abstract class AbstractModelClassInfo
extends AbstractInfo
implements com.sap.tc.cmi.metadata.ICMIModelClassInfo

A base for both metadata based and generated model class info.

Author:
I032295

Nested Class Summary
 class AbstractModelClassInfo.AbstractModelClassPropertyInfo
          A base for both metadata based and generated model class property info.
 
Constructor Summary
AbstractModelClassInfo(com.sap.tc.cmi.metadata.ICMIModelInfo modelInfo)
           
 
Method Summary
protected abstract  java.util.Collection createPropertyInfos()
          A hook for the sub-classes to initialize the property info objects.
protected abstract  java.util.Collection createSourceRoleInfos()
          A hook for the sub-classes to initialize the relation role info objects.
protected  java.lang.ClassLoader getClassLoader()
          Get the ClassLoaderfor this model class.
protected  com.sap.dictionary.runtime.IBroker getDDICBroker()
           
 com.sap.tc.cmi.metadata.ICMIModelInfo getModelInfo()
           
 com.sap.tc.cmi.metadata.ICMIModelClassPropertyInfo getPropertyInfo(java.lang.String name)
           
 java.util.Collection getPropertyInfos()
           
 com.sap.tc.cmi.metadata.ICMIModelClassInfo getRelatedModelClassInfo(java.lang.String targetRoleName)
           
 java.util.Collection getSourceRoleInfos()
           
 com.sap.dictionary.runtime.IStructure getStructureType()
           
 com.sap.tc.cmi.metadata.ICMIRelationRoleInfo getTargetRoleInfo(java.lang.String targetRoleName)
           
 boolean isGeneric()
          Default assumption is generic.
 java.util.Iterator iteratePropertyInfos()
           
 java.util.Iterator iterateSourceRoleInfos()
           
 java.lang.String toString()
           
 
Methods inherited from class com.sap.tc.mobile.cfs.wdbll.AbstractInfo
addSupportedOption, getSetting, getSettings, metaGetNext, metaSetNext, setSetting, supportedOptions, supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sap.tc.cmi.metadata.ICMIModelClassInfo
getName
 
Methods inherited from interface com.sap.tc.cmi.metadata.ICMIAbstractInfo
addSupportedOption, getSetting, getSettings, setSetting, supportedOptions, supports
 

Constructor Detail

AbstractModelClassInfo

public AbstractModelClassInfo(com.sap.tc.cmi.metadata.ICMIModelInfo modelInfo)
Parameters:
modelInfo - The owning model's info.
Method Detail

getModelInfo

public com.sap.tc.cmi.metadata.ICMIModelInfo getModelInfo()
Specified by:
getModelInfo in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

createPropertyInfos

protected abstract java.util.Collection createPropertyInfos()
A hook for the sub-classes to initialize the property info objects.

Returns:
A Collectionof ICMIModelClassPropertyInfo.

getPropertyInfos

public java.util.Collection getPropertyInfos()
Specified by:
getPropertyInfos in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

iteratePropertyInfos

public java.util.Iterator iteratePropertyInfos()
Specified by:
iteratePropertyInfos in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

getPropertyInfo

public com.sap.tc.cmi.metadata.ICMIModelClassPropertyInfo getPropertyInfo(java.lang.String name)
Specified by:
getPropertyInfo in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

getStructureType

public com.sap.dictionary.runtime.IStructure getStructureType()
Specified by:
getStructureType in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

createSourceRoleInfos

protected abstract java.util.Collection createSourceRoleInfos()
A hook for the sub-classes to initialize the relation role info objects. Though only source role info objects are expected from this method, target role info objects are inferred (and initialized) from them using ICMIRelationRoleInfo.getOtherRoleInfo().

Returns:
A Collectionof ICMIRelationRoleInfofor source roles.

getSourceRoleInfos

public java.util.Collection getSourceRoleInfos()
Specified by:
getSourceRoleInfos in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

iterateSourceRoleInfos

public java.util.Iterator iterateSourceRoleInfos()
Specified by:
iterateSourceRoleInfos in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

getTargetRoleInfo

public com.sap.tc.cmi.metadata.ICMIRelationRoleInfo getTargetRoleInfo(java.lang.String targetRoleName)
Specified by:
getTargetRoleInfo in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

getRelatedModelClassInfo

public com.sap.tc.cmi.metadata.ICMIModelClassInfo getRelatedModelClassInfo(java.lang.String targetRoleName)
Specified by:
getRelatedModelClassInfo in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo

isGeneric

public boolean isGeneric()
Default assumption is generic. The sub-class must override otherwise.

Specified by:
isGeneric in interface com.sap.tc.cmi.metadata.ICMIModelClassInfo
See Also:
ICMIModelClassInfo.isGeneric()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getClassLoader

protected java.lang.ClassLoader getClassLoader()
Get the ClassLoaderfor this model class. The default implementation returns the default class loader. Sub-classes must override to supply the correct class loader.

Returns:
The ClassLoaderfor this model class.

getDDICBroker

protected com.sap.dictionary.runtime.IBroker getDDICBroker()
Returns:
The IBrokerfor this model.