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

List of all members.

Classes

class  MapMetaToConcrete

Public Member Functions

 ConcreteObject_impl (K_Object target) throws BadPreCondition
String getIdentifier ()
boolean hasType (MetaObject typed) throws BadPreCondition
Set< MetaObjectgetTypes () throws BadPreCondition
MetaObject getType (MetaModel metamodel) throws BadPreCondition
boolean detachProperty (MetaPropertyExt<?> metaprop, ConcretePropertyExt<?> cp) throws BadPreCondition
String getOnePropertyString (MetaPropertyExt<?> prop) throws BadPreCondition
List< ConcreteRolegetAllConcreteRolesDomain (MetaRole metarole) throws BadPreCondition
List< ConcreteRolegetAllConcreteRolesRange (MetaRole metarole) throws BadPreCondition
boolean isOnTheOtherSide (MetaRole metarole, ConcreteObject concreteObject) throws BadPreCondition
Set< ConcreteModelgetConcreteModels () throws BadPreCondition
boolean delete () throws BadPreCondition
MetaProperty_impl<?> narrow2MetaProperty () throws BadPreCondition
MetaObject_impl narrow2MetaObject () throws BadPreCondition
MetaRole_impl narrow2MetaRole () throws BadPreCondition
MetaModel_impl narrow2MetaModel () throws BadPreCondition
ConcreteRole_impl narrow2ConcreteRole () throws BadPreCondition
ConcreteProperty_impl<?> narrow2ConcreteProperty () throws BadPreCondition
ConcreteModel_impl narrow2ConcreteModel () throws BadPreCondition
int hashCode ()
boolean equals (Object obj)
int compareTo (ConcreteObject arg)
List< ConcreteObjectgetAllConcreteRolesDomainCO (MetaRole metarole) throws BadPreCondition
List< ConcreteObjectgetAllConcreteRolesRangeCO (MetaRole metarole) throws BadPreCondition
String getDisplayName (final MetaModel mm) throws BadPreCondition
ConcretePropertyExt< Boolean > createPropertyBoolean (MetaPropertyExt< Boolean > mpX, boolean value, ConcreteModel cm) throws BadPreCondition
ConcretePropertyExt< Character > createPropertyChar (MetaPropertyExt< Character > mpX, char value, ConcreteModel cm) throws BadPreCondition
ConcretePropertyExt< Double > createPropertyFloat (MetaPropertyExt< Double > mpX, double value, ConcreteModel cm) throws BadPreCondition
ConcretePropertyExt< Long > createPropertyInteger (MetaPropertyExt< Long > mpX, long value, ConcreteModel cm) throws BadPreCondition
ConcretePropertyExt< String > createPropertyString (MetaPropertyExt< String > mpX, String value, ConcreteModel cm) throws BadPreCondition
boolean isGhost ()
ConcreteObject getOneConcreteRolesDomainCO (MetaRole metarole) throws BadPreCondition
ConcreteObject getOneConcreteRolesRangeCO (MetaRole metarole) throws BadPreCondition
ConcretePropertyExt< Character > createEnumPropertyChar (MetaPropertyExt< Character > mpX, char value, ConcreteModel cm) throws BadPreCondition
ConcretePropertyExt< Double > createEnumPropertyFloat (MetaPropertyExt< Double > mpX, double value, ConcreteModel cm) throws BadPreCondition
ConcretePropertyExt< Long > createEnumPropertyInteger (MetaPropertyExt< Long > mpX, long value, ConcreteModel cm) throws BadPreCondition
ConcretePropertyExt< String > createEnumPropertyString (MetaPropertyExt< String > mpX, String value, ConcreteModel cm) throws BadPreCondition
Iterator< ConcreteRolegetAllConcreteRoles (MetaRole mr, RoleSide side) throws BadPreCondition
Iterator< ConcreteObjectgetAllConcreteRolesCO (MetaRole mr, RoleSide side) throws BadPreCondition
ConcreteObject getOneConcreteRolesCO (MetaRole metarole, RoleSide side) throws BadPreCondition
Iterator<?extends ConcreteObjectgetLinkedObjects (RefType type, RoleSide side)

Protected Member Functions

final K_Object getTarget ()
List< ConcreteObject_getAllConcreteRolesDomainCO (MetaRole_impl metarole)
List< ConcreteObject_getAllConcreteRolesRangeCO (MetaRole_impl metarole)
ConcreteObject _getOneConcreteRolesDomainCO (MetaRole_impl metarole)
ConcreteObject _getOneConcreteRolesRangeCO (MetaRole_impl metarole)

Package Functions

private< A >
ConcretePropertyExt< A > 
addPropertyGeneric (MetaPropertyExt_impl< A > metaprop, K_Object value, ConcreteModel_impl model)
public< T >
ConcretePropertyExt< T > 
getOneProperty (MetaPropertyExt< T > prop) throws BadPreCondition
public< T > List<?extends
ConcreteProperty< T > > 
getProperties (MetaPropertyExt< T > prop) throws BadPreCondition
private< T > List
< ConcreteProperty< T > > 
_getProperties (MetaPropertyExt_impl< T > prop)
public< T extends
WorkspaceObject > boolean 
isA (Class< T > c)
private< T extends MetaObject >
boolean 
isAConcrete (Class< T > cl)
public< T extends
WorkspaceObject > T 
narrow (Class< T > c) throws BadPreCondition
public< T >
ConcretePropertyExt< T > 
createProperty (MetaPropertyExt< T > mp, T value, ConcreteModel cm) throws BadPreCondition
public< T > T getOnePropertyValue (MetaPropertyExt< T > prop) throws BadPreCondition
public< T >
ConcretePropertyExt< T > 
setOnePropertyValue (MetaPropertyExt< T > prop, T value, ConcreteModel model) throws BadPreCondition
private< T >
ConcretePropertyExt< T > 
_sharePropertyGeneric (MetaPropertyExt< T > metaprop, ConcreteProperty< T > cp, ConcreteModel model)
public< T >
ConcretePropertyExt< T > 
shareProperty (MetaPropertyExt< T > mp, ConcreteProperty< T > cp, ConcreteModel model) throws BadPreCondition
public< T > Iterator
< ConcreteRole
getFilteredConcreteRoles (MetaRole mr, final RoleSide side, final boolean onRole, final MetaPropertyExt< T > mp, final T value) throws BadPreCondition
public< T > Iterator
< ConcreteObject
getFilteredConcreteRolesCO (MetaRole mr, final RoleSide side, boolean onRole, MetaPropertyExt< T > mp, T value) throws BadPreCondition
public< T > Iterator<?extends
ConcreteObject
getLinkedObjects (RefType type, RoleSide side, final MetaPropertyExt< T > mp, final T value)

Private Member Functions

final MetaObject _getType (MetaModel metamodel)
boolean _detach (MetaPropertyExt_impl<?> metaprop, ConcretePropertyExt_impl<?> cp)
List< ConcreteRole_getAllConcreteRolesDomain (MetaRole_impl metarole)
List< ConcreteRole_getAllConcreteRolesRange (MetaRole_impl metarole)
boolean _isOnTheOtherSide (MetaRole_impl metarole, ConcreteObject_impl concreteObject)
void deleteAllTheObjectsIn (Set< ConcreteObject_impl > accumulator)
void checkObjectIsOwnerOfProperty (MetaPropertyExt_impl<?> prop) throws InternalError, BadPreCondition
String _getDisplayName (final MetaModel mm)
String evaluateFormula (String formula, MetaModel mm)
void _precond_createProperty (MetaPropertyExt_impl<?> mpX, ConcreteModel cm, K_ObjectType type) throws BadPreCondition

Static Private Member Functions

static void getDependumIfSetIsDeleted (ConcreteObject co, Set< ConcreteObject_impl > acc) throws BadPreCondition

Private Attributes

final K_Object target

Static Private Attributes

static final String THE_TYPE_OF_THE_METAPROPERTY_DOESN_T_MATCH_THE_SIGNATURE_OF_THE_METHOD = "The type of the metaproperty doesn't match the signature of the method."
static final String THE_CARDINALITY_OF_THE_METAPROPERTY_IS_NOT_RESPECTED = "The cardinality of the metaproperty is not respected"
static final Logger logger = Logger.getLogger(ConcreteObject_impl.class)

Detailed Description

This class denotes instance of metaobjects, for example: if state is a metaobject, then IDLE or BUSY could be ConcreteObject_impl.

Author:
ven Date=06/02/2006 - 15:47:15 Filename = ConcreteObject_impl.java

Constructor & Destructor Documentation


Member Function Documentation

boolean metadone.metabusiness.impl.ConcreteObject_impl._detach ( MetaPropertyExt_impl<?>  metaprop,
ConcretePropertyExt_impl<?>  cp 
) [private]
private<T> List<ConcreteProperty<T> > metadone.metabusiness.impl.ConcreteObject_impl._getProperties ( MetaPropertyExt_impl< T >  prop) [package]
boolean metadone.metabusiness.impl.ConcreteObject_impl._isOnTheOtherSide ( MetaRole_impl  metarole,
ConcreteObject_impl  concreteObject 
) [private]
private<T> ConcretePropertyExt<T> metadone.metabusiness.impl.ConcreteObject_impl._sharePropertyGeneric ( MetaPropertyExt< T >  metaprop,
ConcreteProperty< T >  cp,
ConcreteModel  model 
) [package]

Set this.metaprop=rangeProperty

Parameters:
metapropExtthe metapropertyExt
valuethe value to set
metamodelthe metamodel of 'model'
modelthe model within the new concrete property will be added.
Returns:
A the newly created concretepropertyExt
Exceptions:
Metal2Exception
BadPreCondition

References metadone.metabusiness.impl.ConcreteModel_impl.createRole(), and metadone.metabusiness.WorkspaceObject.narrow().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.shareProperty().

private<A> ConcretePropertyExt<A> metadone.metabusiness.impl.ConcreteObject_impl.addPropertyGeneric ( MetaPropertyExt_impl< A >  metaprop,
K_Object  value,
ConcreteModel_impl  model 
) [package]
void metadone.metabusiness.impl.ConcreteObject_impl.checkObjectIsOwnerOfProperty ( MetaPropertyExt_impl<?>  prop) throws InternalError, BadPreCondition [private]
boolean metadone.metabusiness.impl.ConcreteObject_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.ConcreteObject_impl.deleteAllTheObjectsIn(), metadone.metabusiness.impl.ConcreteObject_impl.getDependumIfSetIsDeleted(), and metadone.metabusiness.impl.ConcreteObject_impl.isGhost().

void metadone.metabusiness.impl.ConcreteObject_impl.deleteAllTheObjectsIn ( Set< ConcreteObject_impl accumulator) [private]
boolean metadone.metabusiness.impl.ConcreteObject_impl.detachProperty ( MetaPropertyExt<?>  metaprop,
ConcretePropertyExt<?>  cp 
) throws BadPreCondition

Removes the 'cp' concrete property from the 'this' concrete object as a valuation of the 'metaprop' metaproperty.

If 'cp' is no more referenced as a valuation of some metaproperty, then the concreteproperty is deleted (physically removed from the repository), and the proxy is burned.

Parameters:
metapropThe metaproperty that attaches the concrete property to 'this'
cpThe concrete property
Returns:
true iff the concrete property has been physically deleted.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._detach(), and metadone.exception.NullArgument.check().

boolean metadone.metabusiness.impl.ConcreteObject_impl.equals ( Object  obj)
List<ConcreteRole> metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRolesDomain ( MetaRole  metarole) throws BadPreCondition

Gets all the roles in which this is a domain.

Parameters:
metaroleThe metarole
Returns:
The list of concreteRole that are instances of 'metarole' and whose 'this' is the domain. If the range side is sorted, then the list is also sorted.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesDomain(), and metadone.metabusiness.impl.ConcreteObject_impl.hasType().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl._getProperties(), and metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRoles().

List<ConcreteObject> metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRolesDomainCO ( MetaRole  metarole) throws BadPreCondition

Gets all the concrete objects which are on the range side of the roles for the given metarole.

This is equivalent to:

 List<ConcreteObject> result = new ...;
 for (ConcreteRole cr : getAllConcreteRolesDomain(metarole)) {
   result.add(cr.getRange());
 }
 return result;
 
Parameters:
metaroleThe metarole
Returns:
The list of concreteobjects that are instances of 'metarole.getRange()' and whose 'this' is the domain. If the range side is sorted, then the list is also sorted.
Exceptions:
BadPreCondition
See also:
getAllConcreteRolesDomain(MetaRole)

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesDomainCO(), metadone.exception.NullArgument.check(), and metadone.metabusiness.impl.ConcreteObject_impl.hasType().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRolesCO().

List<ConcreteRole> metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRolesRange ( MetaRole  metarole) throws BadPreCondition

Gets all the roles in which this is a range.

Parameters:
metaroleThe metarole
Returns:
The list of concreteRole that are instances of 'metarole' and whose 'this' is the range. If the domain side is sorted, then the list is also sorted.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesRange(), metadone.exception.NullArgument.check(), and metadone.metabusiness.impl.ConcreteObject_impl.hasType().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRoles().

List<ConcreteObject> metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRolesRangeCO ( MetaRole  metarole) throws BadPreCondition

Gets all the concrete objects which are on the domain side of the roles for the given metarole.

This is equivalent to:

 List<ConcreteObject> result = new ...;
 for (ConcreteRole cr : getAllConcreteRolesRange(metarole)) {
   result.add(cr.getDomain());
 }
 return result;
 
Parameters:
metaroleThe metarole
Returns:
The list of concreteobjects that are instances of 'metarole.getDomain()' and whose 'this' is the range. If the domain side is sorted, then the list is also sorted.
Exceptions:
BadPreCondition
See also:
getAllConcreteRolesRange(MetaRole)

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesRangeCO(), metadone.exception.NullArgument.check(), and metadone.metabusiness.impl.ConcreteObject_impl.hasType().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getAllConcreteRolesCO().

Set<ConcreteModel> metadone.metabusiness.impl.ConcreteObject_impl.getConcreteModels ( ) throws BadPreCondition
public<T> Iterator<ConcreteRole> metadone.metabusiness.impl.ConcreteObject_impl.getFilteredConcreteRoles ( MetaRole  mr,
final RoleSide  side,
final boolean  onRole,
final MetaPropertyExt< T >  mp,
final T  value 
) throws BadPreCondition [package]
public<T> Iterator<ConcreteObject> metadone.metabusiness.impl.ConcreteObject_impl.getFilteredConcreteRolesCO ( MetaRole  mr,
final RoleSide  side,
boolean  onRole,
MetaPropertyExt< T >  mp,
value 
) throws BadPreCondition [package]
String metadone.metabusiness.impl.ConcreteObject_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.ConcreteObject_impl.getTarget().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.checkObjectIsOwnerOfProperty(), metadone.metabusiness.impl.ConcreteObject_impl.getDisplayName(), and metadone.metabusiness.impl.ConcreteRole_impl.toString().

public<T> Iterator<? extends ConcreteObject> metadone.metabusiness.impl.ConcreteObject_impl.getLinkedObjects ( RefType  type,
RoleSide  side,
final MetaPropertyExt< T >  mp,
final T  value 
) [package]
ConcreteObject metadone.metabusiness.impl.ConcreteObject_impl.getOneConcreteRolesDomainCO ( MetaRole  metarole) throws BadPreCondition

Gets one of the objects on the range side for the given metarole.

Parameters:
metaroleThe metarole
Returns:
One concreteobject of type 'metarole.getRange()' and whose 'this' is the domain. null if there is no such object and a random value if there exists several values.
Exceptions:
BadPreCondition
See also:
getAllConcreteRolesDomainCO(MetaRole)

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._getOneConcreteRolesDomainCO(), and metadone.metabusiness.impl.ConcreteObject_impl.hasType().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getOneConcreteRolesCO(), and metadone.metabusiness.impl.ConcreteObject_impl.getOneProperty().

ConcreteObject metadone.metabusiness.impl.ConcreteObject_impl.getOneConcreteRolesRangeCO ( MetaRole  metarole) throws BadPreCondition

Gets one of the objects on the domain side for the given metarole.

Parameters:
metaroleThe metarole
Returns:
One concreteobject of type 'metarole.getDomain()' and whose 'this' is the range. null if there is no such object and a random value if there exists several values.
Exceptions:
BadPreCondition
See also:
getAllConcreteRolesRangeCO(MetaRole)

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._getOneConcreteRolesRangeCO(), metadone.exception.NullArgument.check(), and metadone.metabusiness.impl.ConcreteObject_impl.hasType().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getOneConcreteRolesCO().

public<T> ConcretePropertyExt<T> metadone.metabusiness.impl.ConcreteObject_impl.getOneProperty ( MetaPropertyExt< T >  prop) throws BadPreCondition [package]

Gets a single property.

This method is useful specially when the cardinality is 1.

Parameters:
propDenotes a metaproperty attached to this object
Returns:
Either one random value taken from the properties of this concrete object or null is no property does exist.
Exceptions:
BadPreCondition
See also:
#getProperties(MetaPropertyExt)

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl.getOneConcreteRolesDomainCO(), and metadone.metabusiness.WorkspaceObject.narrow().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getOnePropertyValue(), and metadone.metabusiness.impl.ConcreteObject_impl.setOnePropertyValue().

String metadone.metabusiness.impl.ConcreteObject_impl.getOnePropertyString ( MetaPropertyExt<?>  prop) throws BadPreCondition

Gets one property value transformed into a string. // TODO could be deprecated as getOnePropertyValue is enough?

This is equivalent to:

 Object result = getOnePropertyValue(prop);
 return result != null ? result.toString() : null;
 
Parameters:
propDenotes a metaproperty attached to this object
Returns:
The property converted to string or null
Exceptions:
BadPreCondition
See also:
#getOnePropertyValue(MetaPropertyExt)
Object.toString()
Deprecated:
use getOnePropertyValue(MetaPropertyExt) instead

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl.getOnePropertyValue().

public<T> T metadone.metabusiness.impl.ConcreteObject_impl.getOnePropertyValue ( MetaPropertyExt< T >  prop) throws BadPreCondition [package]

Gets a single property value.

This method is useful specially when the cardinality is 1.

This method is equivalent to:

 ConcretePropertyExt<T> cp = getOneProperty(prop);
 return cp != null ? cp.getValue() : null;
 
Parameters:
propDenotes a metaproperty attached to this object
Returns:
Either one random value taken from the properties of this concrete object or null is no property does exist.
Exceptions:
BadPreCondition
See also:
#getOneProperty(MetaPropertyExt)
#setOnePropertyValue(MetaPropertyExt, Object, ConcreteModel)

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl.getOneProperty().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getOnePropertyString().

public<T> List<? extends ConcreteProperty<T> > metadone.metabusiness.impl.ConcreteObject_impl.getProperties ( MetaPropertyExt< T >  prop) throws BadPreCondition [package]
final K_Object metadone.metabusiness.impl.ConcreteObject_impl.getTarget ( ) [protected]

References metadone.metabusiness.impl.ConcreteObject_impl.target.

Referenced by metadone.metabusiness.impl.ConcreteModel_impl._addInDefinition(), metadone.metabusiness.impl.ConcreteModel_impl._createObject(), metadone.metabusiness.impl.ConcreteModel_impl._createRole(), metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesDomain(), metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesDomainCO(), metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesRange(), metadone.metabusiness.impl.ConcreteObject_impl._getAllConcreteRolesRangeCO(), metadone.metabusiness.impl.ConcreteModel_impl._getDefinition(), metadone.metabusiness.impl.ConcreteModel_impl._getDefinitionRestricted(), metadone.metabusiness.impl.ConcreteObject_impl._getOneConcreteRolesDomainCO(), metadone.metabusiness.impl.ConcreteObject_impl._getOneConcreteRolesRangeCO(), metadone.metabusiness.impl.ConcreteModel_impl._isInDefinition(), metadone.metabusiness.impl.ConcreteObject_impl._isOnTheOtherSide(), metadone.metabusiness.impl.MetaObject_impl._shareMetaProperty(), metadone.metabusiness.impl.ConcreteObject_impl.addPropertyGeneric(), metadone.metabusiness.impl.ConcreteRole_impl.afterDomain(), metadone.metabusiness.impl.ConcreteRole_impl.afterRange(), metadone.metabusiness.impl.ConcreteObject_impl.compareTo(), metadone.metabusiness.impl.MetaObject_impl.createMetaProperty(), metadone.metabusiness.impl.ConcreteModel_impl.createModel(), metadone.metabusiness.impl.ConcreteObject_impl.equals(), metadone.metabusiness.impl.ConcreteObject_impl.getConcreteModels(), metadone.metabusiness.impl.ConcreteModel_impl.getDefinition(), metadone.metabusiness.impl.MetaRole_impl.getDomains(), metadone.metabusiness.impl.ConcreteObject_impl.getIdentifier(), metadone.metabusiness.impl.ConcreteRole_impl.getMetaRole(), metadone.metabusiness.impl.MetaRole_impl.getRanges(), metadone.metabusiness.impl.ConcreteObject_impl.hasType(), metadone.metabusiness.impl.MetaRole_impl.listRoles(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaModel(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaObject(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaProperty(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaRole(), metadone.metabusiness.impl.ConcreteProperty_impl< T >.narrowExt(), and metadone.metabusiness.impl.ConcreteModel_impl.removeFromDefinition().

MetaObject metadone.metabusiness.impl.ConcreteObject_impl.getType ( MetaModel  metamodel) throws BadPreCondition

Gets the type of this object in a given metamodel.

Parameters:
metamodelDenotes the metamodel that contains the metaObject
Returns:
The more precise type of 'this' in 'metamodel'.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._getType(), and metadone.exception.NullArgument.check().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl._getDisplayName(), and metadone.metabusiness.impl.ConcreteObject_impl.getDisplayName().

int metadone.metabusiness.impl.ConcreteObject_impl.hashCode ( )
public<T extends WorkspaceObject> boolean metadone.metabusiness.impl.ConcreteObject_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.ConcreteObject_impl.isAConcrete().

private<T extends MetaObject> boolean metadone.metabusiness.impl.ConcreteObject_impl.isAConcrete ( Class< T >  cl) [package]
boolean metadone.metabusiness.impl.ConcreteObject_impl.isGhost ( )
boolean metadone.metabusiness.impl.ConcreteObject_impl.isOnTheOtherSide ( MetaRole  metarole,
ConcreteObject  concreteObject 
) throws BadPreCondition

Checks if an object is on the other side of the role.

This method is equivalent to:

 for (ConcreteObject co : getAllConcreteRolesDomain(this)) {
   if (co.equals(concreteObject))
     return true;
 }
 for (ConcreteObject co : getAllConcreteRolesRange(this)) {
   if (co.equals(concreteObject))
     return true;
 }
 return false;
 
Parameters:
metaroleThe metarole
concreteObjectThe concrete object to check
Returns:
true iff there exists an instance of 'metarole that defines a conreterole between 'this and 'concreteObject.
Exceptions:
BadPreCondition

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl._isOnTheOtherSide(), metadone.exception.NullArgument.check(), and metadone.metabusiness.impl.ConcreteObject_impl.hasType().

public<T extends WorkspaceObject> T metadone.metabusiness.impl.ConcreteObject_impl.narrow ( Class< T >  c) throws BadPreCondition [package]

Casts this object to an object of the given type.

This method respects: obj.narrow(c).equals(obj) == true.

Parameters:
cThe class
Returns:
This as another type
Exceptions:
BadPreConditionwhen isA(c) == false
See also:
#isA(Class)

Reimplemented from metadone.metabusiness.impl.WorkspaceObject_impl.

References metadone.metabusiness.impl.ConcreteObject_impl.narrow2ConcreteModel(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2ConcreteProperty(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2ConcreteRole(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaModel(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaObject(), metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaProperty(), and metadone.metabusiness.impl.ConcreteObject_impl.narrow2MetaRole().

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.createEnumPropertyChar(), metadone.metabusiness.impl.ConcreteObject_impl.createEnumPropertyFloat(), metadone.metabusiness.impl.ConcreteObject_impl.createEnumPropertyInteger(), metadone.metabusiness.impl.ConcreteObject_impl.createEnumPropertyString(), metadone.metabusiness.impl.MetaObject_impl.createMetaProperty(), metadone.metabusiness.impl.ConcreteModel_impl.createRole(), metadone.metabusiness.impl.MetaRole_impl.getDomains(), metadone.metabusiness.impl.ConcreteObject_impl.getLinkedObjects(), metadone.metabusiness.impl.MetaRole_impl.getRanges(), metadone.metabusiness.impl.ConcreteModel_impl.isInDefinition(), metadone.metabusiness.impl.MetaRole_impl.listRoles(), metadone.metabusiness.impl.MetaObject_impl.narrow(), metadone.metabusiness.impl.ConcreteProperty_impl< T >.narrowExt(), and metadone.metabusiness.impl.ConcreteModel_impl.removeFromDefinition().

ConcreteModel_impl metadone.metabusiness.impl.ConcreteObject_impl.narrow2ConcreteModel ( ) throws BadPreCondition
ConcreteProperty_impl<?> metadone.metabusiness.impl.ConcreteObject_impl.narrow2ConcreteProperty ( ) throws BadPreCondition
ConcreteRole_impl metadone.metabusiness.impl.ConcreteObject_impl.narrow2ConcreteRole ( ) throws BadPreCondition
public<T> ConcretePropertyExt<T> metadone.metabusiness.impl.ConcreteObject_impl.setOnePropertyValue ( MetaPropertyExt< T >  prop,
value,
ConcreteModel  model 
) throws BadPreCondition [package]

Sets a single property value.

This method is useful specially when the cardinality is 1.

This method is equivalent to:

 ConcretePropertyExt<T> cp = getOneProperty(prop);
 if (cp != null) {
   cp.setValue(value);
 } else {
   cp = createProperty(prop, value, model);
 }
 return cp;
 
Parameters:
propDenotes a metaproperty attached to this object
valueThe value to set
Exceptions:
BadPreCondition
See also:
#getOneProperty(MetaPropertyExt)
#getOnePropertyValue(MetaPropertyExt)

Implements metadone.metabusiness.ConcreteObject.

References metadone.metabusiness.impl.ConcreteObject_impl.createProperty(), metadone.metabusiness.impl.ConcreteObject_impl.getOneProperty(), and metadone.metabusiness.ConcreteProperty< T >.setValue().

public<T> ConcretePropertyExt<T> metadone.metabusiness.impl.ConcreteObject_impl.shareProperty ( MetaPropertyExt< T >  mp,
ConcreteProperty< T >  cp,
ConcreteModel  model 
) throws BadPreCondition [package]

Member Data Documentation


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