com.sap.tc.cmi.annotations

Interface ICMIAnnotationInfo


public interface ICMIAnnotationInfo

Metadata for an annotation. Mainly provides name and type information and whether the information is static or if it depends on the model class instance.

Predefined Annotations

Name Type Static Description
ENABLED boolean false Whether or not the annotated entity is enabled (visible) in the current context.
MANDATORY boolean false Whether or not the annotated entity is mandatory in the current context.
READ_ONLY boolean false Whether or not the annotated entity can be modified or not in the current context.

Since:
NY AP6

Type Classification Type Classification:

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


Field Summary
static String COLLECTION_HAS_BEEN_TRUNCATED
          Predefined annotation name.
static String ENABLED
          Predefined annotation name.
static String MANDATORY
          Predefined annotation name.
static ICMIAnnotationInfo[] NONE
          Empty array of annotation infos.
static String ORIGINAL_COLLECTION_SIZE
          Predefined annotation name.
static String READ_ONLY
          Predefined annotation name.
static String VIRTUAL
          Predefined annotation name.
static String WRITE_VALID_DATA_ONLY
          Predefined annotation name.
 
Method Summary
 String getName()
          Retuns the name of this annotation.
 com.sap.dictionary.runtime.IDataType getType()
          Returns the type of this annotation.
 boolean isStatic()
          Whether the annotation is static (equal for all instances) or not (value depends on time and model class instance).
 

Field Detail

NONE

static final ICMIAnnotationInfo[] NONE
Empty array of annotation infos. Useful as a default value for model implementations.


ENABLED

static final String ENABLED
Predefined annotation name. Annotation must have a simple type with builtintype boolean.

See Also:
Constant Field Values

READ_ONLY

static final String READ_ONLY
Predefined annotation name. Annotation must have a simple type with builtintype boolean.

See Also:
Constant Field Values

MANDATORY

static final String MANDATORY
Predefined annotation name. Annotation must have a simple type with builtintype boolean.

See Also:
Constant Field Values

WRITE_VALID_DATA_ONLY

static final String WRITE_VALID_DATA_ONLY
Predefined annotation name. Annotation must have a simple type with builtintype boolean. This is a class level annotation (not yet defined for attribute or relation)

See Also:
Constant Field Values

COLLECTION_HAS_BEEN_TRUNCATED

static final String COLLECTION_HAS_BEEN_TRUNCATED
Predefined annotation name. Annotation must have a simple type with builtintype boolean. This is an object level annotation and should be used for collection objects only.

See Also:
Constant Field Values

ORIGINAL_COLLECTION_SIZE

static final String ORIGINAL_COLLECTION_SIZE
Predefined annotation name. Annotation must have a simple type with builtintype long. This is an object level annotation and should be used for collection objects only.

See Also:
Constant Field Values

VIRTUAL

static final String VIRTUAL
Predefined annotation name. Annotation must have a simple type with builtintype boolean. This is an object level annotation (for simple annotation provider). Indicates whether the object is somehow "artifical" and should be handled differently (e.g. excluded from sorting and filtering in collections, not to be deleted or saved etc.) The exact behavior of "virtual" objects is not defined by CMI and is up to the model implementations. See ESF documentation for an example of virtual objects.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Retuns the name of this annotation. Model implementations should either use one of the predefined names or chose a qualified name on their own. Names must represent valid (qualified) java class names and the set of characters must be restricted to A-Za-z_ ([a-z_][a-z_0-9]*\.)*[a-zA-Z_][a-zA-Z_0-9]*

Returns:
(non empty) name of this annotation.

getType

com.sap.dictionary.runtime.IDataType getType()
Returns the type of this annotation.

Returns:
(type of this annotation, must not be null).

isStatic

boolean isStatic()
Whether the annotation is static (equal for all instances) or not (value depends on time and model class instance).

If any of the annotations for an annotated class is not static (this method returns false), then the class must implement ICMIAnnotatedClass and must answer calls for this annotation.

No matter whether an annotation is static or not, a class info always must answer calls for all their annotations. So a non static annotation can be queried on the class info (but then will only reflect some "default" value, not a value for any specific instance).

Note:

Returns:
false if any of the annotations for an annotated class is not static, otherwise true
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] FRAMEWORK [sap.com] tc/cm/ejb/api api BC-JAS-EJB
[sap.com] FRAMEWORK [sap.com] tc/cmi default BC-WD-JAV-RUN


Copyright 2014 SAP AG Complete Copyright Notice