MetaDone
metadone.metabusiness.MetaRole Interface Reference
Inheritance diagram for metadone.metabusiness.MetaRole:
Collaboration diagram for metadone.metabusiness.MetaRole:

List of all members.

Public Types

enum  FirstLastMode { FIRST, LAST, AFTER, SKIP }
enum  Cardinality {
  NO_TO_NO = (-999, "no to no"), ONE_TO_MANY = (1, "one to many"), MANY_TO_ONE = (2, "many to one"), ONE_TO_ONE = (3, "one to one"),
  MANY_TO_MANY = (4, "many to many"), MANYS_TO_MANYS = (0, "manys to manys")
}

Public Member Functions

boolean disposeRoles (ConcreteObject domain, ConcreteObject range) throws BadPreCondition
List< ConcreteObjectgetDomains (ConcreteObject range) throws BadPreCondition
List< ConcreteObjectgetRanges (ConcreteObject domain) throws BadPreCondition
List< ConcreteRolelistRoles (ConcreteObject domain, ConcreteObject range) throws BadPreCondition
Cardinality getCardinality () throws BadPreCondition
MetaObject getDomain () throws BadPreCondition
MetaObject getRange () throws BadPreCondition
MetaObject getSide (RoleSide side) throws BadPreCondition
boolean isRangeOrdered () throws BadPreCondition
boolean isDomainOrdered () throws BadPreCondition
boolean isOrdered (RoleSide side) throws BadPreCondition
void setRangeOrdered (boolean isOrdered) throws BadPreCondition
void setDomainOrdered (boolean isOrdered) throws BadPreCondition
void setDomainName (String name) throws BadPreCondition
void setRangeName (String name) throws BadPreCondition
String getDomainName () throws BadPreCondition
String getRangeName () throws BadPreCondition
String getSideName (RoleSide side) throws BadPreCondition
boolean isRangeMany ()
boolean isDomainMany ()
boolean isMany (RoleSide side)
MetaPropertyExt<?> toMetaPropertyExt () throws BadPreCondition

Detailed Description

A metarole.

Author:
ven
kma
See also:
MetaObject

Member Enumeration Documentation

The cardinalities for metaroles.

Enumerator:
NO_TO_NO 

Defines a value distinct of all the valid values.

ONE_TO_MANY 

Defines a one to many cardinality for a MetaRole instance

MANY_TO_ONE 

Defines a many to one cardinality for a MetaRole instance

ONE_TO_ONE 

Defines a one to one cardinality for a MetaRole instance

MANY_TO_MANY 

Defines a many to many cardinality for a MetaRole instance

MANYS_TO_MANYS 

Defines a special type of many to many cardinality for a MetaRole instance where MetaRole instances can be replicated between two MetaObjects

This enum lists the possible ways to insert a concrete role in a list of concrete role at the creation time.

Enumerator:
FIRST 
LAST 
AFTER 
SKIP 

Member Function Documentation

boolean metadone.metabusiness.MetaRole.disposeRoles ( ConcreteObject  domain,
ConcreteObject  range 
) throws BadPreCondition

Disposes all ConcreteRoles typed by 'this' MetaRole between the given ConcreteObjects.

Parameters:
domainthe ConcreteObject specified as the domain
rangethe ConceteObject specified as the range
Returns:
true if some concrete roles have been deleted.
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Cardinality metadone.metabusiness.MetaRole.getCardinality ( ) throws BadPreCondition
String metadone.metabusiness.MetaRole.getDomainName ( ) throws BadPreCondition

Gets the name of the domain side.

Returns:
the name of the alias for the domain side of the metarole or null if there is no name
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.dialog.swing.selectAMetaRole.MyChooseMetaRole.format().

List<ConcreteObject> metadone.metabusiness.MetaRole.getDomains ( ConcreteObject  range) throws BadPreCondition

Retrieves all ConcreteObjects that are the domains of the given ConcreteObject.

Parameters:
rangethe ConcreteObject at the domain side
Returns:
The list of ConcreteObjects of found domains
Exceptions:
BadPreConditionif the type of 'range' does not comply to the range-side of 'this', or if range is null.

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.dialog.swing.helperBrowserMetal2.NodeRoot_MetaObject_RangeOf.getChildren().

String metadone.metabusiness.MetaRole.getRangeName ( ) throws BadPreCondition

Gets the name of the range side.

Returns:
the name of the alias for the range side of the metarole or null if there is no name
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.dialog.swing.selectAMetaRole.MyChooseMetaRole.format().

List<ConcreteObject> metadone.metabusiness.MetaRole.getRanges ( ConcreteObject  domain) throws BadPreCondition

Retrieves all ConcreteObjects that are the ranges of the given ConcreteObject.

Parameters:
domainthe ConcreteObjects at the range side
Returns:
The list of ConcreteObjects of found ranges
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.dialog.swing.helperBrowserMetal2.NodeRoot_MetaObject_DomainOf.getChildren().

MetaObject metadone.metabusiness.MetaRole.getSide ( RoleSide  side) throws BadPreCondition

Gets the metaobject on the given side.

Parameters:
sideThe side
Returns:
The meatobject on the given side
Exceptions:
BadPreCondition

Referenced by metadone.client.grasyla2.ref.ActionCreateRoleEngine.create(), and metadone.client.grasyla2.ref.MORefRoleEngine.evaluateComponent().

String metadone.metabusiness.MetaRole.getSideName ( RoleSide  side) throws BadPreCondition

Gets the name of the given side.

Parameters:
sideThe side
Returns:
the name of the alias for the range side of the metarole or null if there is no name
Exceptions:
BadPreCondition
boolean metadone.metabusiness.MetaRole.isDomainMany ( )

Indicates whether the cardinality of the domain is many.

Returns:
true if the cardinality of the domain side is >1

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.dialog.swing.genConcreteObject.Panel_one_range.SelectActionListener.actionPerformed(), and metadone.client.dialog.swing.genConcreteObject.Wmetarole.create().

boolean metadone.metabusiness.MetaRole.isDomainOrdered ( ) throws BadPreCondition

Indicates whether the domain side is ordered.

Returns:
true iff the domain side of this metarole is ordered.

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.dialog.swing.genConcreteObject.DialogConcreteRoles.configure().

boolean metadone.metabusiness.MetaRole.isMany ( RoleSide  side)

Indicates whether the cardinality of the given side is many.

Parameters:
sideThe side
Returns:
true if the cardinality of the side is >1

Referenced by metadone.metabusiness.script.groovy.GroovyProxyCO.sideOf().

boolean metadone.metabusiness.MetaRole.isOrdered ( RoleSide  side) throws BadPreCondition

Indicates whether the given side is ordered

Parameters:
sideThe side
Returns:
true iff the given side is ordered

Referenced by metadone.client.grasyla2.ref.RefRoleEngine.activate().

boolean metadone.metabusiness.MetaRole.isRangeMany ( )
boolean metadone.metabusiness.MetaRole.isRangeOrdered ( ) throws BadPreCondition

Indicates whether the range side is ordered.

Returns:
true iff the range side of this metarole is ordered.

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.dialog.swing.genConcreteObject.DialogConcreteRoles.configure().

List<ConcreteRole> metadone.metabusiness.MetaRole.listRoles ( ConcreteObject  domain,
ConcreteObject  range 
) throws BadPreCondition

Retrieves all ConcreteRoles between the given ConcreteObjects.

Parameters:
domainthe ConcreteObject at the domain-side (not null)
rangethe ConcreteObject at the range-side (not null)
Returns:
The list of all the concrete roles that exist between domain and range.
Exceptions:
BadPreConditionwhen the types of domain or range do not comply to the domain and range types of 'this'.

Implemented in metadone.metabusiness.impl.MetaRole_impl.

void metadone.metabusiness.MetaRole.setDomainName ( String  name) throws BadPreCondition

Defines the name of the domain side of the metarole.

>This name must be distinct of getRangeName(). If name is null and if an alias existed before, it is removed.

Parameters:
nameThe name or null
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.functions.importer.km3.KM3Importer.Promoter.createReference().

void metadone.metabusiness.MetaRole.setDomainOrdered ( boolean  isOrdered) throws BadPreCondition

Specify if the domain side of this metarole is ordered.

This method can not be used once the metarole has been instantiated (createRole).

Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

void metadone.metabusiness.MetaRole.setRangeName ( String  name) throws BadPreCondition

Defines the name of the range side of the metarole.

>This name must be distinct of getDomainName(). If name is null and if an alias existed before, it is removed.

Parameters:
nameThe name or null
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

Referenced by metadone.client.functions.importer.km3.KM3Importer.Promoter.createReference().

void metadone.metabusiness.MetaRole.setRangeOrdered ( boolean  isOrdered) throws BadPreCondition

Specify if the range side of this metarole is ordered.

This method can not be used once the metarole has been instantiated (createRole).

Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaRole_impl.

MetaPropertyExt<?> metadone.metabusiness.MetaRole.toMetaPropertyExt ( ) throws BadPreCondition

Converts this role to a MetaPropertyExt.

Returns:
A metaproperty ext.
Exceptions:
BadPreConditionwhen this role does not represent a metaproperty

Implemented in metadone.metabusiness.impl.MetaRole_impl.


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