ETEntityDescription documentation

Authors

Eric Wasylishen (ewasylishen@gmail.com)

Copyright: (C) 2009 Eric Wasylishen


Contents -

  1. Software documentation for the ETCPrimitiveEntityDescription class
  2. Software documentation for the ETEntityDescription class
  3. Software documentation for the ETPrimitiveEntityDescription class

Software documentation for the ETCPrimitiveEntityDescription class

ETCPrimitiveEntityDescription : ETPrimitiveEntityDescription

Declared in:
ETEntityDescription.h

@group Model and Metamodel

Used to describe Model description C primitives: float, BOOL, etc. See -[ETEntityDescription isCPrimitive].

This class is used internally. You can possibly use it to support new primitives.

Software documentation for the ETEntityDescription class

ETEntityDescription : ETModelElementDescription

Declared in:
ETEntityDescription.h
Conforms to:
ETCollection
ETCollectionMutation

@group Model and Metamodel @abstract A description of an entity, which can either be a class or a prototype.

Method summary

newEntityDescription 

+ (ETEntityDescription*) newEntityDescription;

@taskunit Metamodel Description

Self-description (aka meta-metamodel).


rootEntityDescriptionName 

+ (NSString*) rootEntityDescriptionName;

The name of the entity description that should end the parent chain of every entity description.

This entity description is the Object primitive in the repository. See ETModelDescriptionRepository.

Will be used by -checkConstraints: .


addPropertyDescription: 

- (void) addPropertyDescription: (ETPropertyDescription*)propertyDescription;

Adds the given property description to this entity, the entity becomes its owner.


isKindOfEntity: 

- (BOOL) isKindOfEntity: (ETEntityDescription*)anEntityDesc;

Returns whether the given entity is a subentity of the receiver.


isValidValue: type: 

- (BOOL) isValidValue: (id)aValue type: (ETEntityDescription*)anEntityDesc;

Checks the given value and its type against the receiver type, and returns whether the value type is a subtype of the receiver.

This method doesn't execute any model validation as -validateValue:forKey: does.


propertyDescriptionForName: 

- (ETPropertyDescription*) propertyDescriptionForName: (NSString*)name;

Returns the property description which matches the given name.

See also -propertyDescriptionsForNames: and -[ETModelElementDescription name] which is inherited by ETPropertyDescription.


propertyDescriptionsForNames: 

- (NSArray*) propertyDescriptionsForNames: (NSArray*)names;

Returns the property descriptions which matches the given names. See also -propertyDescriptionForName: and -[ETModelElementDescription name] which is inherited by ETPropertyDescription.


removePropertyDescription: 

- (void) removePropertyDescription: (ETPropertyDescription*)propertyDescription;

Removes the given property description from this entity.


validateValue: forKey: 

- (ETValidationResult*) validateValue: (id)value forKey: (NSString*)key;

@taskunit Validation and Runtime Consistency Check

Tries to validate the value that corresponds to the given property name, by delegating the validation to the right property description, and returns a validation result object.


Software documentation for the ETPrimitiveEntityDescription class

ETPrimitiveEntityDescription : ETEntityDescription

Declared in:
ETEntityDescription.h

@group Model and Metamodel

Used to describe Model description primitives: object, string, boolean etc. See -[ETEntityDescription isPrimitive].

This class is used internally. You can possibly use it to support new primitives.