MetaDone
metadone.metabusiness.impl.MetaObject_impl Class Reference
Inheritance diagram for metadone.metabusiness.impl.MetaObject_impl:
Collaboration diagram for metadone.metabusiness.impl.MetaObject_impl:

List of all members.

Public Member Functions

final K_ObjectType getTarget ()
String getIdentifier ()
 MetaObject_impl (K_ObjectType x, Workspace_impl workspace) throws BadPreCondition
MetaPropertyExt<?> createMetaProperty (String name, int cardinality, K_ObjectType type, MetaModel metamodel, boolean bootstrap) throws BadPreCondition
boolean isGhost ()
boolean delete () throws BadPreCondition
boolean isOnlyAMetaObject ()
String getName (MetaModel metamodel) throws BadPreCondition
final String getName () throws BadPreCondition
String[] getNamePath () throws BadPreCondition
Set< MetaObjectgetAllSupertypes () throws BadPreCondition
Set< MetaObjectgetAllSubtypes () throws BadPreCondition
Set< MetaObjectgetDirectSubtypes () throws BadPreCondition
Set< MetaObjectgetDirectSupertypes () throws BadPreCondition
Set< MetaPropertyExt<?> > getAllMetaProperties () throws BadPreCondition
Set< MetaPropertyExt<?> > getDirectMetaProperties () throws BadPreCondition
Set< MetaRolegetAllMetaRolesDomain () throws BadPreCondition
Set< MetaRolegetAllMetaRolesRange () throws BadPreCondition
Set< MetaRolegetDirectMetaRolesDomain () throws BadPreCondition
Set< MetaRolegetDirectMetaRolesRange () throws BadPreCondition
Set< ConcreteObjectgetInstances () throws BadPreCondition
boolean detachMetaProperty (MetaProperty<?> mp) throws BadPreCondition
Set< MetaModelgetAllMetaModels () throws BadPreCondition
MetaPropertyExt<?> getMetaProperty (String name, MetaModel metamodel) throws BadPreCondition
int hashCode ()
boolean equals (Object obj)
String toString ()
int compareTo (MetaObject arg)
String getDisplayName (MetaModel mm)
MetaPropertyExt<?> getMetaPropertyAnywhere (String name, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Character > createMetaPropertyEnumeratedChar (String name, int cardinality, MetaModel metamodel, char[] values, boolean restricted) throws BadPreCondition
MetaPropertyExt< Double > createMetaPropertyEnumeratedFloat (String name, int cardinality, MetaModel metamodel, double[] values, boolean restricted) throws BadPreCondition
MetaPropertyExt< Long > createMetaPropertyEnumeratedInteger (String name, int cardinality, MetaModel metamodel, long[] values, boolean restricted) throws BadPreCondition
MetaPropertyExt< String > createMetaPropertyEnumeratedString (String name, int cardinality, MetaModel metamodel, String[] values, boolean restricted) throws BadPreCondition
MetaPropertyExt< Boolean > createMetaPropertyBoolean (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Character > createMetaPropertyChar (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Double > createMetaPropertyFloat (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Long > createMetaPropertyInteger (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< String > createMetaPropertyString (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
boolean hasAtLeastOneInstance ()
MetaObject addSuperType (MetaObject supertype) throws BadPreCondition
void setDisplayNameFormula (String formula, MetaModel metamodel) throws BadPreCondition
String getDisplayNameFormula (MetaModel metamodel) throws BadPreCondition
String getDisplayNameFormula () throws BadPreCondition
ConcreteModel narrow2ConcreteModel () throws BadPreCondition
String findDisplayNameFormula (MetaModel mm) throws BadPreCondition

Protected Member Functions

void precondition_createMetaObject (MetaModel metamodel, String name, MetaObject[] supertypes) throws BadPreCondition

Package Functions

public< T > MetaPropertyExt< T > createMetaProperty (Class< T > type, String name, int cardinality, MetaModel metamodel) throws BadPreCondition
public< T > MetaPropertyExt< T > createMetaPropertyEnumerated (Class< T > type, String name, int cardinality, MetaModel metamodel, boolean restricted, T...values) throws BadPreCondition
public< T > MetaPropertyExt< T > produceMetaProperty (Class< T > type, String name, int cardinality, MetaModel metamodel) throws BadPreCondition
public< T > MetaPropertyExt< T > produceMetaPropertyEnumerated (Class< T > type, String name, int cardinality, MetaModel metamodel, boolean restricted, T...values) throws BadPreCondition
public< T extends
WorkspaceObject > boolean 
isA (Class< T > c)
public< T extends
WorkspaceObject > T 
narrow (Class< T > c) throws BadPreCondition
public< A > MetaPropertyExt< A > shareMetaProperty (MetaProperty< A > mp, MetaModel metamodel) throws BadPreCondition

Private Member Functions

MetaPropertyExt<?> _createMetaProperty (String name, int cardinality, K_ObjectType type, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt<?> retrievePropertyForProduce (MetaModel metamodel, String name) throws BadPreCondition
String _getName (MetaModel metamodel)
Set< MetaObjectmakeMetaObjectSet (Collection<?extends K_ObjectType > types) throws BadPreCondition
void _getAllMetaProperties (Set< MetaPropertyExt<?>> accumulator)
void _getAllMetaRolesDomain (Set< MetaRole > accumulator)
void _getAllMetaRolesRange (Set< MetaRole > accumulator)
final< A > MetaPropertyExt< A > _shareMetaProperty (MetaProperty< A > mp, MetaModel metamodel) throws BadPreCondition
final MetaPropertyExt<?> _getMetaProperty (String name, MetaModel metamodel)
MetaPropertyExt<?> _getMetaPropertyAnywhere (String name, MetaModel metamodel)
String _findDisplayNameFormula (MetaModel mm)

Static Private Member Functions

static List< MetaModellookForPath (MetaModel model, MetaObject obj) throws BadPreCondition

Private Attributes

final K_ObjectType target

Static Private Attributes

static final Logger logger = Logger.getLogger(MetaObject_impl.class)

Detailed Description

An instance of a MetaObject_impl denotes for instance a STATE in some STATECHART metaModel.

Author:
ven

Constructor & Destructor Documentation

metadone.metabusiness.impl.MetaObject_impl.MetaObject_impl ( K_ObjectType  x,
Workspace_impl  workspace 
) throws BadPreCondition

Member Function Documentation

MetaPropertyExt<?> metadone.metabusiness.impl.MetaObject_impl._createMetaProperty ( String  name,
int  cardinality,
K_ObjectType  type,
MetaModel  metamodel 
) throws BadPreCondition [private]
String metadone.metabusiness.impl.MetaObject_impl._findDisplayNameFormula ( MetaModel  mm) [private]
void metadone.metabusiness.impl.MetaObject_impl._getAllMetaProperties ( Set< MetaPropertyExt<?>>  accumulator) [private]
void metadone.metabusiness.impl.MetaObject_impl._getAllMetaRolesDomain ( Set< MetaRole accumulator) [private]
void metadone.metabusiness.impl.MetaObject_impl._getAllMetaRolesRange ( Set< MetaRole accumulator) [private]
final MetaPropertyExt<?> metadone.metabusiness.impl.MetaObject_impl._getMetaProperty ( String  name,
MetaModel  metamodel 
) [private]
Parameters:
name
metamodel
Returns:
Exceptions:
BadPreCondition

References metadone.metabusiness.impl.MetaObject_impl.getDirectMetaProperties().

Referenced by metadone.metabusiness.impl.MetaObject_impl.getMetaProperty().

MetaPropertyExt<?> metadone.metabusiness.impl.MetaObject_impl._getMetaPropertyAnywhere ( String  name,
MetaModel  metamodel 
) [private]
Parameters:
name
metamodel
Returns:
Exceptions:
BadPreCondition

References metadone.metabusiness.impl.MetaObject_impl.getAllMetaProperties().

Referenced by metadone.metabusiness.impl.MetaObject_impl.getMetaPropertyAnywhere().

final<A> MetaPropertyExt<A> metadone.metabusiness.impl.MetaObject_impl._shareMetaProperty ( MetaProperty< A >  mp,
MetaModel  metamodel 
) throws BadPreCondition [private]

References metadone.repository.kernel.K_Object.addObjectType(), metadone.metabusiness.impl.FactoryOfProxy.buildMetaRole(), metadone.repository.kernel.K_TypeInteger.createObjectInteger(), metadone.repository.kernel.K_PropertyType.createProperty(), metadone.metabusiness.ConcreteModel.createRole(), metadone.repository.kernel.Project.createSubtype(), metadone.metabusiness.impl.MetaObject_impl.getAllSubtypes(), metadone.metabusiness.impl.MetaObject_impl.getAllSupertypes(), metadone.metabusiness.impl.Workspace_impl.getClassCommonMetaObject(), metadone.metabusiness.impl.Workspace_impl.getClassMetaRole(), metadone.repository.kernel.K_Common.getDataObject(), metadone.metabusiness.impl.Workspace_impl.getInvisibleSeparator(), metadone.metabusiness.impl.Workspace_impl.getMetaObjectHasMetaProperty(), metadone.repository.kernel.K_ObjectType.getNameObjectType(), metadone.metabusiness.impl.Workspace_impl.getProject(), metadone.metabusiness.impl.Workspace_impl.getRoleCard_pt(), metadone.metabusiness.impl.MetaObject_impl.getTarget(), metadone.metabusiness.impl.ConcreteObject_impl.getTarget(), metadone.repository.kernel.Project.getTypeInteger(), metadone.util.StringUtil.getUniqueString(), metadone.util.SetUtil.isDisjoined(), metadone.metabusiness.WorkspaceObject.narrow(), metadone.metabusiness.WorkspaceObject.narrow2ConcreteModel(), metadone.metabusiness.WorkspaceObject.narrow2ConcreteObject(), metadone.metabusiness.impl.WorkspaceObject_impl.narrow2ConcreteObject(), metadone.repository.kernel.K_Object.promoteToObjectType(), metadone.repository.kernel.K_Property.promoteToPropertyType(), metadone.util.SetUtil.union(), and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

Referenced by metadone.metabusiness.impl.MetaObject_impl.shareMetaProperty().

MetaObject metadone.metabusiness.impl.MetaObject_impl.addSuperType ( MetaObject  supertype) throws BadPreCondition

Adds a supertype to this metaobject.

Can only be used when 'this' has not yet been initialized.

Parameters:
supertypeThe supertype
Returns:
This with the added supertype
Exceptions:
BadPreCondition

Implements metadone.metabusiness.MetaObject.

References metadone.repository.kernel.K_ObjectType.addSuperType(), metadone.util.Objects.cast(), metadone.exception.NullArgument.check(), and metadone.metabusiness.impl.MetaObject_impl.getTarget().

public<T> MetaPropertyExt<T> metadone.metabusiness.impl.MetaObject_impl.createMetaProperty ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition [package]
MetaPropertyExt<?> metadone.metabusiness.impl.MetaObject_impl.createMetaProperty ( String  name,
int  cardinality,
K_ObjectType  type,
MetaModel  metamodel,
boolean  bootstrap 
) throws BadPreCondition
Parameters:
name
cardinality
type
metamodel
bootstrapif true, then some statements are not executed to allow the boostrapping. They must then be executed manually.
Returns:
Exceptions:
BadPreCondition

References metadone.repository.kernel.K_Object.addObjectType(), metadone.metabusiness.impl.FactoryOfProxy.buildMetaRole(), metadone.metabusiness.impl.ConcreteModel_impl.createObject(), metadone.repository.kernel.K_TypeInteger.createObjectInteger(), metadone.repository.kernel.K_PropertyType.createProperty(), metadone.repository.kernel.K_PropertyType.createPropertyType(), metadone.metabusiness.impl.ConcreteModel_impl.createRole(), metadone.repository.kernel.Project.createSubtype(), metadone.metabusiness.MetaRole.getCardinality(), metadone.metabusiness.impl.Workspace_impl.getClassCommonMetaObject(), metadone.metabusiness.impl.Workspace_impl.getClassMetaObject(), metadone.metabusiness.impl.Workspace_impl.getClassMetaProperty(), metadone.metabusiness.impl.Workspace_impl.getClassMetaRole(), metadone.repository.kernel.K_Common.getDataObject(), metadone.metabusiness.MetaRole.getDomain(), metadone.metabusiness.impl.Workspace_impl.getInvisibleSeparator(), metadone.metabusiness.impl.Workspace_impl.getMetaObjectHasMetaProperty(), metadone.metabusiness.MetaObject.getName(), metadone.repository.kernel.K_ObjectType.getNameObjectType(), metadone.metabusiness.impl.Workspace_impl.getProject(), metadone.metabusiness.impl.Workspace_impl.getPropertyCard_pt(), metadone.metabusiness.impl.Workspace_impl.getPropertyHasType_pt(), metadone.metabusiness.MetaRole.getRange(), metadone.metabusiness.impl.Workspace_impl.getRoleCard_pt(), metadone.metabusiness.impl.MetaObject_impl.getTarget(), metadone.metabusiness.impl.ConcreteObject_impl.getTarget(), metadone.metabusiness.impl.Workspace_impl.getTypeFromRepository(), metadone.repository.kernel.Project.getTypeInteger(), metadone.util.StringUtil.getUniqueString(), metadone.metabusiness.impl.ConcreteModel_impl.isInDefinition(), metadone.metabusiness.impl.MetaObject_impl.narrow(), metadone.metabusiness.impl.ConcreteObject_impl.narrow(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaProperty(), metadone.repository.kernel.K_Object.promoteToObjectType(), metadone.repository.kernel.K_Property.promoteToPropertyType(), and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

MetaPropertyExt<Boolean> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyBoolean ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
MetaPropertyExt<Character> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyChar ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
public<T> MetaPropertyExt<T> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumerated ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel,
boolean  restricted,
T...  values 
) throws BadPreCondition [package]

Creates a new enumerated MetaPropertyExt in 'this'.

Parameters:
typethe type of the property
namethe name of the metaproperty
cardinalitythe maximum number of instances of this MetaProperty that 'this' MetaObject can have
metamodelthe MetaModel in which the new MetaProperty will be created
restrictedSpecifies if the concrete properties MUST share the enumerated values or not. If not, the concrete properties can share the enumerated value or use fresh new literal values.
Returns:
The newly created MetaPropertyExt
Parameters:
valuesThe enumerated values. The array cannot be null nor empty.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl.createMetaProperty(), metadone.metabusiness.ConcreteObject.createProperty(), metadone.metabusiness.ConcreteObject.createPropertyBoolean(), metadone.metabusiness.impl.Workspace_impl.getMetapropertyEnumFromJava(), metadone.metabusiness.impl.Workspace_impl.getMP_EnumRestricted(), metadone.metabusiness.WorkspaceObject.narrow(), metadone.metabusiness.WorkspaceObject.narrow2ConcreteObject(), metadone.metabusiness.impl.MetaObject_impl.precondition_createMetaObject(), and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

Referenced by metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedChar(), metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedFloat(), metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedInteger(), metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedString(), and metadone.metabusiness.impl.MetaObject_impl.produceMetaPropertyEnumerated().

MetaPropertyExt<Character> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedChar ( String  name,
int  cardinality,
MetaModel  metamodel,
char[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<Double> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedFloat ( String  name,
int  cardinality,
MetaModel  metamodel,
double[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<Long> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedInteger ( String  name,
int  cardinality,
MetaModel  metamodel,
long[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<String> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumeratedString ( String  name,
int  cardinality,
MetaModel  metamodel,
String[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<Double> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyFloat ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
MetaPropertyExt<Long> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyInteger ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
MetaPropertyExt<String> metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyString ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
boolean metadone.metabusiness.impl.MetaObject_impl.delete ( ) throws BadPreCondition

Deletes the concrete object from the repository and burns the proxy.

Returns:
true if the deletion has been executed. Some constraint could prevent it. So far, as constraints are not implemented, the result is always true.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.WorkspaceObject.

References metadone.metabusiness.impl.MetaObject_impl.narrow().

boolean metadone.metabusiness.impl.MetaObject_impl.detachMetaProperty ( MetaProperty<?>  mp) throws BadPreCondition
String metadone.metabusiness.impl.MetaObject_impl.findDisplayNameFormula ( MetaModel  mm) throws BadPreCondition
Parameters:
mmThe formula is defined wrt this MetaModel. (not null)
Returns:
a string that denotes a groovy script to compute the sympathic representation of a concrete object.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl._findDisplayNameFormula(), and metadone.exception.NullArgument.check().

Set<MetaPropertyExt<?> > metadone.metabusiness.impl.MetaObject_impl.getAllMetaProperties ( ) throws BadPreCondition

Gets all the metaproperties of this metaobject.

Returns:
the set of MetaProperties attached to this and all its supertypes

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl._getAllMetaProperties().

Referenced by metadone.metabusiness.impl.MetaObject_impl._getMetaPropertyAnywhere().

Set<MetaRole> metadone.metabusiness.impl.MetaObject_impl.getAllMetaRolesDomain ( ) throws BadPreCondition

Gets all the metaroles of which this metaobject is the domain.

Returns:
the set of metaroles whose the domain is this and its supertypes.

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl._getAllMetaRolesDomain().

Set<MetaRole> metadone.metabusiness.impl.MetaObject_impl.getAllMetaRolesRange ( ) throws BadPreCondition

Gets all the metaroles of which this metaobject is the range.

Returns:
the set of metaroles whose the range is this and its supertypes.

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl._getAllMetaRolesRange().

Set<MetaObject> metadone.metabusiness.impl.MetaObject_impl.getAllSubtypes ( ) throws BadPreCondition
Set<MetaRole> metadone.metabusiness.impl.MetaObject_impl.getDirectMetaRolesDomain ( ) throws BadPreCondition
Set<MetaRole> metadone.metabusiness.impl.MetaObject_impl.getDirectMetaRolesRange ( ) throws BadPreCondition
Set<MetaObject> metadone.metabusiness.impl.MetaObject_impl.getDirectSubtypes ( ) throws BadPreCondition
Set<MetaObject> metadone.metabusiness.impl.MetaObject_impl.getDirectSupertypes ( ) throws BadPreCondition
String metadone.metabusiness.impl.MetaObject_impl.getDisplayName ( MetaModel  mm)

Gets a nice name of this object in a metamodel.

By default, this method should return the nickname of the object or the simplified full name of the object. However, other implementations are possible.

Parameters:
mmThe metamodel or null
Returns:
A nice name for this metaobject
Exceptions:
BadPreConditionif mm is null.

Implements metadone.metabusiness.WorkspaceObject.

Reimplemented in metadone.metabusiness.impl.MetaProperty_impl< T >.

References metadone.metabusiness.impl.MetaObject_impl.getName().

String metadone.metabusiness.impl.MetaObject_impl.getDisplayNameFormula ( ) throws BadPreCondition
String metadone.metabusiness.impl.MetaObject_impl.getDisplayNameFormula ( MetaModel  metamodel) throws BadPreCondition
Returns:
the formula to produce a user friendly string representation of a concrete object, and null if no formula is defined. Only the formula defined for this metaobject is taken into account. See findDisplayNameFormula(MetaModel) for a more general method.
Parameters:
metamodelThe formula is defined wrt this MetaModel.
Precondition:
metamodel is not null.

Implements metadone.metabusiness.MetaObject.

References metadone.exception.NullArgument.check(), metadone.metabusiness.impl.Workspace_impl.getMP_DisplayName(), metadone.metabusiness.ConcreteObject.getProperties(), metadone.metabusiness.impl.WorkspaceObject_impl.getWorkspace(), metadone.metabusiness.ConcreteModel.isInDefinition(), metadone.metabusiness.WorkspaceObject.narrow2ConcreteModel(), and metadone.metabusiness.impl.WorkspaceObject_impl.narrow2ConcreteObject().

String metadone.metabusiness.impl.MetaObject_impl.getIdentifier ( )

Gets an identifier for this object.

The identifier is unique for the object in its workspace. if a.equals(b) then also a.getIdentifier().equals(b.getIdentifier()).

Returns:
The identifier

Implements metadone.metabusiness.WorkspaceObject.

References metadone.metabusiness.impl.MetaObject_impl.getTarget().

Set<ConcreteObject> metadone.metabusiness.impl.MetaObject_impl.getInstances ( ) throws BadPreCondition

Gets all the instances of this metaobject.

Returns:
The set of all the instances of this metaobject

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.FactoryOfProxy.buildConcreteObject(), metadone.repository.kernel.K_ObjectType.getInstances(), and metadone.metabusiness.impl.MetaObject_impl.target.

MetaPropertyExt<?> metadone.metabusiness.impl.MetaObject_impl.getMetaProperty ( String  name,
MetaModel  metamodel 
) throws BadPreCondition

Retrieves a metaproperty amongst the direct metaproperties of this metaobject.

Parameters:
nameThe name of the metaproperty to retrieve. Not null.
metamodelThe metamodel that should contain the metaproperty. Not null.
Returns:
The metaproperty whose name is name and belongs to metamodel or null
See also:
getMetaPropertyAnywhere(String, MetaModel)

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl._getMetaProperty(), and metadone.exception.NullArgument.check().

Referenced by metadone.metabusiness.impl.ConcretePropertyExt_impl< T >.getMetaProperty(), and metadone.metabusiness.impl.Workspace_impl.init_metametamodel().

MetaPropertyExt<?> metadone.metabusiness.impl.MetaObject_impl.getMetaPropertyAnywhere ( String  name,
MetaModel  metamodel 
) throws BadPreCondition

Retrieves a metaproperty amongst the direct and indirect metaproperties of this metaobject.

Parameters:
nameThe name of the metaproperty to retrieve. Not null.
metamodelThe metamodel that should contain the metaproperty. Not null.
Returns:
The metaproperty whose name is name or null
See also:
getMetaProperty(String, MetaModel)

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl._getMetaPropertyAnywhere(), and metadone.exception.NullArgument.check().

String metadone.metabusiness.impl.MetaObject_impl.getName ( MetaModel  metamodel) throws BadPreCondition
boolean metadone.metabusiness.impl.MetaObject_impl.hasAtLeastOneInstance ( )

Indicates whether this metaobject has at least one instance.

Returns:
true iff this metaobject has at least one instance.

Implements metadone.metabusiness.MetaObject.

References metadone.repository.kernel.K_ObjectType.hasInstances(), and metadone.metabusiness.impl.MetaObject_impl.target.

int metadone.metabusiness.impl.MetaObject_impl.hashCode ( )
public<T extends WorkspaceObject> boolean metadone.metabusiness.impl.MetaObject_impl.isA ( Class< T >  c) [package]

Checks if this object is an instance of a class.

narrow(Class) should be used instead of this method if the goal is to finally get the casted object.

The given class should be an interface from this package. The implementation of this method should first check if the instance is of the given class and simply cast this if this is the case. In other words, Class#isInstance(Object) must always be respected. If c.isInstance(this) then the result is true. There are two edge cases described below.

The interfaces MetaPropertyExt and ConcretePropertyExt can be used. Still, often automatic casts, such as from a meta object to a MetaPropertyExt, cannot be performed because there is no object to attach to. The result should be c.isInstance(this).

The other edge case is the usage of the specific implementation classes. The user of the implementation should never rely on this as the behavior should be defined by the implementing class (even if the Class#isInstance(Object) must still be respected).

Parameters:
cThe class
Returns:
true iff this is can be narrowed to c
See also:
#narrow(Class)
Class.isInstance(Object)

Reimplemented from metadone.metabusiness.impl.WorkspaceObject_impl.

References metadone.metabusiness.impl.Workspace_impl.getMetaModel_ot(), metadone.metabusiness.impl.Workspace_impl.getMetaProperty_ot(), metadone.repository.kernel.K_Object.getObjectTypes(), metadone.metabusiness.impl.Workspace_impl.getRole_ot(), metadone.metabusiness.impl.MetaObject_impl.target, and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

boolean metadone.metabusiness.impl.MetaObject_impl.isGhost ( )

Indicates whether this object is a ghost (deleted).

Returns:
true iff this object is a ghost

Implements metadone.metabusiness.WorkspaceObject.

References metadone.metabusiness.impl.MetaObject_impl.narrow().

boolean metadone.metabusiness.impl.MetaObject_impl.isOnlyAMetaObject ( )

Checks if this object is just a metaobject and not a subtype.

Equivalent to:

 return isA(MetaObject.class) && !(
   isA(MetaProperty.class) || isA(MetaRole.class) || isA(MetaModel.class)
 )
 
Returns:
true iff 'this' is only a MO (not MP, not MR, not MM)

Reimplemented from metadone.metabusiness.impl.WorkspaceObject_impl.

References metadone.metabusiness.impl.Workspace_impl.getMetaModel_ot(), metadone.metabusiness.impl.Workspace_impl.getMetaProperty_ot(), metadone.repository.kernel.K_Object.getObjectTypes(), metadone.metabusiness.impl.Workspace_impl.getRole_ot(), metadone.metabusiness.impl.MetaObject_impl.target, and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

static List<MetaModel> metadone.metabusiness.impl.MetaObject_impl.lookForPath ( MetaModel  model,
MetaObject  obj 
) throws BadPreCondition [static, private]
public<T extends WorkspaceObject> T metadone.metabusiness.impl.MetaObject_impl.narrow ( Class< T >  c) throws BadPreCondition [package]
public<T> MetaPropertyExt<T> metadone.metabusiness.impl.MetaObject_impl.produceMetaProperty ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition [package]

Creates or retrieves an existing metaproperty.

The retrieved property must match exactly the given arguments as if it were created, otherwise an exception is thrown.

Parameters:
typethe type of the property
namethe name of the property
cardinalitythe maximum number of instances of this MetaProperty that 'this' MetaObject can have
typethe type of the meta property.
metamodelthe MetaModel in which the new MetaProperty will be created
Returns:
the existign or a newly created MetaPropertyExt
Exceptions:
BadPreConditionwhen the existing property didn't match the required arguments or when the property couldn't be created
See also:
#getMetaProperty(String)
#createMetaProperty(Class, String, int, MetaModel)

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl.createMetaProperty(), metadone.metabusiness.MetaProperty< T >.getCardinality(), metadone.metabusiness.MetaPropertyExt< T >.narrowType(), and metadone.metabusiness.impl.MetaObject_impl.retrievePropertyForProduce().

public<T> MetaPropertyExt<T> metadone.metabusiness.impl.MetaObject_impl.produceMetaPropertyEnumerated ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel,
boolean  restricted,
T...  values 
) throws BadPreCondition [package]

Creates or retrieves an existing enumerated metaproperty.

The retrieved property must match exactly the given arguments as if it were created, otherwise an exception is thrown.

Parameters:
typethe type of the property
namethe name of the metaproperty
cardinalitythe maximum number of instances of this MetaProperty that 'this' MetaObject can have
metamodelthe MetaModel in which the new MetaProperty will be created
restrictedSpecifies if the concrete properties MUST share the enumerated values or not. If not, the concrete properties can share the enumerated value or use fresh new literal values.
valuesThe enumerated values. The array cannot be null nor estmpty.
Returns:
The existing or a newly created MetaPropertyExt
Exceptions:
BadPreConditionwhen the existing property didn't match the required arguments or when the property couldn't be created
See also:
#getMetaProperty(String)
createMetaPropertyEnumerated(Class, String, int, MetaModel, boolean, Object...)

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl.createMetaPropertyEnumerated(), metadone.metabusiness.MetaProperty< T >.getCardinality(), metadone.metabusiness.MetaPropertyExt< T >.narrowType(), and metadone.metabusiness.impl.MetaObject_impl.retrievePropertyForProduce().

MetaPropertyExt<?> metadone.metabusiness.impl.MetaObject_impl.retrievePropertyForProduce ( MetaModel  metamodel,
String  name 
) throws BadPreCondition [private]
void metadone.metabusiness.impl.MetaObject_impl.setDisplayNameFormula ( String  formula,
MetaModel  metamodel 
) throws BadPreCondition

Defines the formula expression that will build the string to represent the instances of this metaobject in a user-friendly way. So far, expression must be Clojure expressions beginning with suffix ".clj" without space characters.

Parameters:
formulanot null, a clojure expression.
metamodelthe display name is configured wrt a metamodel specified by this argument.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.MetaObject.

References metadone.exception.NullArgument.check(), metadone.metabusiness.ConcreteObject.createPropertyString(), metadone.metabusiness.impl.Workspace_impl.getMP_DisplayName(), metadone.metabusiness.ConcreteObject.getProperties(), metadone.metabusiness.impl.WorkspaceObject_impl.getWorkspace(), metadone.metabusiness.ConcreteModel.isInDefinition(), metadone.metabusiness.WorkspaceObject.narrow2ConcreteModel(), and metadone.metabusiness.impl.WorkspaceObject_impl.narrow2ConcreteObject().

public<A> MetaPropertyExt<A> metadone.metabusiness.impl.MetaObject_impl.shareMetaProperty ( MetaProperty< A >  mp,
MetaModel  metamodel 
) throws BadPreCondition [package]

Shares a metaproperty with another metamodel.

This metaproperty will be added to the set of metaproperties that describe this metaobject. The previous metaobjects the metaproperty was attached to are not modified. Hence, if this operation succeeds, the metaproperty will be attached to n+1 metaobjects. Be aware that the first time a metaobject that owns this metaproperty will be deleted, will entail the deletion of the metaproperty. If this already owns the metaproperty, then mp is just returned.

Parameters:
mpDenotes some existing metaproperty.
metamodelDenotes the metamodel that will contain the metaproperty in its definition.
Returns:
The shared metaproperty
Exceptions:
BadPreCondition

Implements metadone.metabusiness.MetaObject.

References metadone.metabusiness.impl.MetaObject_impl._shareMetaProperty(), and metadone.exception.NullArgument.check().

String metadone.metabusiness.impl.MetaObject_impl.toString ( )

Member Data Documentation

final Logger metadone.metabusiness.impl.MetaObject_impl.logger = Logger.getLogger(MetaObject_impl.class) [static, private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations