net.sf.farrago.cwm
Class CwmPackage$Hib

java.lang.Object
  extended by org.eigenbase.enki.jmi.impl.RefBaseObjectBase
      extended by org.eigenbase.enki.jmi.impl.RefPackageBase
          extended by org.eigenbase.enki.hibernate.jmi.HibernateRefPackage
              extended by net.sf.farrago.cwm.CwmPackage$Hib
All Implemented Interfaces:
RefBaseObject, RefPackage, CwmPackage

public class CwmPackage$Hib
extends HibernateRefPackage
implements CwmPackage

CWM package implementation. CWM Container

Note: This type should not be subclassed, implemented or directly instantiated by clients. It is generated from a MOF metamodel and implemented by Enki or MDR.


Field Summary
private  BehavioralPackage behavioralPackage
           
private  CorePackage corePackage
           
private  DataTypesPackage dataTypesPackage
           
private  InstancePackage instancePackage
           
private  KeysIndexesPackage keysIndexesPackage
           
private  RelationalPackage relationalPackage
           
 
Constructor Summary
CwmPackage$Hib(RefPackage container)
           
 
Method Summary
 void addAliasPackages()
           
protected  void checkConstraints(List<JmiException> errors, boolean deepVerify)
           
 BehavioralPackage getBehavioral()
          Returns nested package Behavioral.
 CorePackage getCore()
          Returns nested package Core.
 DataTypesPackage getDataTypes()
          Returns nested package DataTypes.
 InstancePackage getInstance()
          Returns nested package Instance.
 KeysIndexesPackage getKeysIndexes()
          Returns nested package KeysIndexes.
 RelationalPackage getRelational()
          Returns nested package Relational.
 
Methods inherited from class org.eigenbase.enki.hibernate.jmi.HibernateRefPackage
getHibernateRepository, refDelete
 
Methods inherited from class org.eigenbase.enki.jmi.impl.RefPackageBase
addAssociation, addClass, addPackage, getRepository, refAllAssociations, refAllClasses, refAllPackages, refAssociation, refAssociation, refClass, refClass, refCreateStruct, refCreateStruct, refGetEnum, refGetEnum, refImmediatePackage, refPackage, refPackage
 
Methods inherited from class org.eigenbase.enki.jmi.impl.RefBaseObjectBase
createInstance, equals, getCurrentInitializer, getEnum, getInitializer, getMofId, getTag, hashCode, invokeMethod, invokeMethod, logJmi, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints, setMofId, setRefMetaObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jmi.reflect.RefPackage
refAllAssociations, refAllClasses, refAllPackages, refAssociation, refAssociation, refClass, refClass, refCreateStruct, refCreateStruct, refDelete, refGetEnum, refGetEnum, refPackage, refPackage
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
 

Field Detail

corePackage

private final CorePackage corePackage

behavioralPackage

private final BehavioralPackage behavioralPackage

instancePackage

private final InstancePackage instancePackage

dataTypesPackage

private final DataTypesPackage dataTypesPackage

keysIndexesPackage

private final KeysIndexesPackage keysIndexesPackage

relationalPackage

private final RelationalPackage relationalPackage
Constructor Detail

CwmPackage$Hib

public CwmPackage$Hib(RefPackage container)
Method Detail

getCore

public CorePackage getCore()
Description copied from interface: CwmPackage
Returns nested package Core. The Core metamodel depends on no other packages. The ObjectModel Core metamodel contains basic metamodel classes and associations used by all other CWM metamodel packages, including other ObjectModel packages OCL Representation of Core Constraints Operations The operation allFeatures results in a Set containing all Features of the Classifier itself and all its inherited Features. allFeatures : Set(Feature); allFeatures = self.feature->union(self.parent.oclAsType(Classifier).allFeatures) The operation allAttributes results in a Set containing all Attributes of the Classifier itself and all its inherited Attributes. allAttributes : set(Attribute); allAttributes = self.allFeatures->select(f | f.oclIsKindOf(Attribute)) The operation specification yields the set of Classifiers that the current Classifier realizes. specification: Set(Classifier) specification = self.clientDependency-> select(d | d.stereotype.name = "realization" and d.supplier.oclIsKindOf(Classifier)).supplier.oclAsType(Classifier) The operation parent returns a Set containing all direct parents of a Classifier. parent : Set(Classifier); parent = self.generalization.parent The operation allParents returns a Set containing all the Classifiers inherited by this Classifier (the transitive closure), excluding the Classifier itself. allParents : Set(Classifier); allParents = self.parent->union(self.parent.allParents) The operation allContents returns a Set containing all ModelElements contained in the Classifier together with the contents inherited from its parents. allContents : Set(ModelElement); allContents = self.contents->union(self.parent.allContents-> select(e | e.elementOwnership.visibility = #public or e.elementOwnership.visibility = #protected)) The operation supplier results in a Set containing all direct suppliers of the ModelElement. supplier : Set(ModelElement); supplier = self.clientDependency.supplier The operation allSuppliers results in a Set containing all the ModelElements that are suppliers of this ModelElement, including the suppliers of these Model Elements. This is the transitive closure. allSuppliers : Set(ModelElement); allSuppliers = self.supplier->union(self.supplier.allSuppliers) The operation contents results in a Set containing all ModelElements contained by the Namespace. contents : Set(ModelElement) contents = self.ownedElement -> union(self.namespace.contents) The operation allContents results in a Set containing all ModelElements contained by the Namespace. allContents : Set(ModelElement); allContents = self.contents The operation allVisibleElements results in a Set containing all ModelElements visible outside of the Namespace. allVisibleElements : Set(ModelElement) allVisibleElements = self.allContents -> select(e | e.elementOwnership.visibility = #public) The operation allSurroundingNamespaces results in a Set containing all surrounding Namespaces. allSurroundingNamespaces : Set(Namespace) allSurroundingNamespaces = self.namespace->union(self.namespace.allSurroundingNamespaces) The operation contents results in a Set containing the ModelElements owned by or imported by the Package. contents : Set(ModelElement) contents = self.ownedElement->union(self.importedElement) The operation allImportedElements results in a Set containing the ModelElements imported by the Package. allImportedElements : Set(ModelElement) allImportedElements = self.importedElement The operation allContents results in a Set containing the ModelElements owned by or imported by the Package. allContents : Set(ModelElement) allContents = self.contents Constraints [C-3-1] A Constraint cannot be applied to itself. context Constraint inv: not self.constrainedElement->includes (self) [C-3-2] A DataType cannot contain any other ModelElements. context DataType inv: self.ownedElement->isEmpty [C-3-3] Tags associated with a model element (directly via a property list or indirectly via a stereotype) must not clash with any meta attributes associated with the model element. context ModelElement inv: -- cannot be specified with OCL

Specified by:
getCore in interface CwmPackage
Returns:
Proxy object related to nested package Core.

getBehavioral

public BehavioralPackage getBehavioral()
Description copied from interface: CwmPackage
Returns nested package Behavioral. The Behavioral metamodel depends on the following package: org.omg::CWM::ObjectModel::Core The Behavioral metamodel collects together classes and associations that describe the behavior of CWM types and provides a foundation for recording the invocations of defined behaviors. The elements of the Behavioral metamodel are shown in the following figure. OCL Representation of Behavioral Constraints Operations The operation hasSameSignature checks if the argument has the same signature as the instance itself. hasSameSignature ( b : BehavioralFeature ) : Boolean; hasSameSignature (b) = (self.name = b.name) and (self.parameter->size = b.parameter->size) and Sequence{ 1..(self.parameter->size) }->forAll( index : Integer | b.parameter->at(index).type = self.parameter->at(index).type and b.parameter->at(index).kind = self.parameter->at(index).kind ) The operation allOperations results in a Set containing all Operations of the Classifier itself and all its inherited Operations. allOperations : Set(Operation); allOperations = self.allFeatures->select(f | f.ockIsKindOf(Operations)) The operation allMethods results in a Set containing all Methods of the Classifier itself and all its inherited Methods. allOperations : Set(Method); allMethods = self.allFeatures->select(f | f.ockIsKindOf(Method)) Constraints [C-4-1] All Parameters should have a unique name. context BehavioralFeature inv: self.parameter->forAll(p1, p2 | p1.name = p2.name implies p1 = p2) [C-4-2] The type of the Parameters should be included in the Namespace of the Classifier. context BehavioralFeature inv: self.parameter->forAll( p | self.owner.namespace.allContents->includes (p.type) ) [C-4-3] The number of arguments must be the same as the number of parameters of the Operation. context CallAction inv: self.actualArgument->size = self.operation.parameter->size [C-4-4] An Interface can only contain Operations. context Interface inv: self.allFeatures->forAll( f | f.oclIsKindOf( Operation ) ) [C-4-5] An Interface cannot contain any ModelElements. context Interface inv: self.allContents->isEmpty [C-4-6] All Features defined in an Interface are public. context Interface inv: self.allFeatures->forAll( f | f.visibility = #public ) [C-4-7] If the realized Operation is a query, then so is the Method. context Method inv: self.specification->isQuery implies self.isQuery

Specified by:
getBehavioral in interface CwmPackage
Returns:
Proxy object related to nested package Behavioral.

getInstance

public InstancePackage getInstance()
Description copied from interface: CwmPackage
Returns nested package Instance. The Instance metamodel depends on the following package: org.omg::CWM::ObjectModel::Core In addition to the metadata normally interchanged with CWM, it is sometimes useful to interchange specific data instances as well. The ObjectModel?s Instance metamodel allows the inclusion of data instances with the metadata. OCL Representation of Instance Constraints Constraints [C-6-1] A DataValue originates from a Classifier that is a DataType. context DataValue inv: self.classifier.oclIsKindOf(DataType) [C-6-2] A DataValue has no Slots. context DataValue inv: self.valueSlot->isEmpty [C-6-3] An Object may only own Objects and DataValues. context Object inv: self.contents->forAll(c | c.oclIsKindOf(Object) or c.oclIsKindOf(DataValue)) [C-6-4] If an Object represents an association, at least two of its ends must be not be empty. context Object inv: self.classifier.oclIsKindOf(Association) implies self.slot.feature->iterate( ae ; cnt : Integer = 0 | if ae.oclIsKindOf(AssociationEnd) and ae.value.notEmpty then cnt + 1 else cnt end if ) > 1 [C-6-5] If the StructuralFeature describing a Slot is an AssociationEnd, the Classifier associated with the Object owning the Slot must be an Association. context Slot inv: self.feature.oclIsKindOf(AssociationEnd) implies self.value.classifier.oclIsKindOf(Association)

Specified by:
getInstance in interface CwmPackage
Returns:
Proxy object related to nested package Instance.

getDataTypes

public DataTypesPackage getDataTypes()
Description copied from interface: CwmPackage
Returns nested package DataTypes. The DataTypes package depends on the following packages: org.omg::CWM::ObjectModel::Core The CWM DataTypes metamodel supports definition of metamodel constructs that modelers can use to create the specific data types they need. Although the CWM Foundation itself does not contain specific data type definitions, a number of data type definitions for widely used environments are provided (in the CWM Data Types chapter) as examples of the appropriate usage of CWM Foundation classes for creating data type definitions. OCL Representation of DataTypes Constraints [C-4-1] A TypeAlias instance cannot alias itself. context TypeAlias inv: self.type <> self [C-4-2] A Union can have at most one default UnionMember instance. context Union inv: self.allFeatures->select(isDefault)->size <= 1

Specified by:
getDataTypes in interface CwmPackage
Returns:
Proxy object related to nested package DataTypes.

getKeysIndexes

public KeysIndexesPackage getKeysIndexes()
Description copied from interface: CwmPackage
Returns nested package KeysIndexes. The KeysIndexes package depends on the following package: org.omg::CWM::ObjectModel::Core Keys and indexes as means for specifying instances and for identifying alternate sortings of instances are epresented in the CWMFoundation so that they can be shared among the various data models that employ hem. The CWM Foundation defines the base concepts (uniqueness and relationships implemented as keys) pon which more specific key structures can be built by other CWM and tool-specific packages. The concepts of key and index have been placed in the CWM Foundation because they are available in many types of data resources. In the CWM Foundation class and association descriptions that follow, relational model examples are frequently used when discussing the definition and usage of key and index types. This is done because of the wide-spread availability of relational systems and is thought to promote an understanding of the underlying concepts. These concepts, however, are no less applicable to other data models as well. The two central classes for representing the concept of keys are UniqueKey and KeyRelationship. UniqueKey instances correspond to the notion that keys represent the identity of instances -- similar to the relational model?s concept of a primary key or an object model?s concept of an object identity. In contrast, KeyRelationship instancescorrespond to the notion that keys embedded in an instance can be used to determine the identity of other related instances -- similar to the relational model concept of foreign key and the object model concept of a reference. Consequently, UniqueKey and KeyRelationship are best thought of as representing roles that collections of Features of Classifiers play rather than Classifiers describing the internal structure of keys. Representing keys as roles rather than structural entities provides greater flexibility and allows the reuse of Features in multiple keys and in differing relationships to each other. Associations within the KeysIndexes package describe how UniqueKey and KeyRelationship instances describe the roles they play for various Class instances and the StructuralFeature instances they contain. OCL Representation of KeysIndexes Constraints [C-6-1]The isAscending attribute is valid only if the isSorted attribute is True. context IndexedFeature inv: self.isAscending->notEmpty implies self.index.isSorted [C-6-2] A KeyRelationship instance must be owned by one and only one Class instance. context KeyRelationship inv: (self.namespace->size = 1) and self.namespace.oclIsKindOf(Class) [C-6-3] An UniqueKey instance must be owned by one and only one Class instance. context UniqueKey inv: (self.namespace->size = 1) and self.namespace.oclIsKindOf(Class)

Specified by:
getKeysIndexes in interface CwmPackage
Returns:
Proxy object related to nested package KeysIndexes.

getRelational

public RelationalPackage getRelational()
Description copied from interface: CwmPackage
Returns nested package Relational. The Relational package describes data accessible through a relational interface such as a native RDBMS, ODBC, or JDBC. The Relational package is based on the [SQL] standard section concerning RDBMS catalogs. The scope of the top level container, Catalog, is intended to cover all the tables a user can use in a single statement. A catalog is also the unit which is managed by a data resource. A catalog contains schemas which themselves contain tables. Tables are made of columns which have an associated data type. The Relational package uses constructs in the ObjectModel package to describe the object extensions added to SQL by the [SQL] standards. The Relational package also addresses the issues of indexing, primary keys and foreign keys by extending the corresponding concepts from the Foundation packages. The Relational package depends on the following packages: org.omg::CWM::ObjectModel::Behavioral org.omg::CWM::ObjectModel::Core org.omg::CWM::ObjectModel::Instance org.omg::CWM::Foundation::DataTypes org.omg::CWM::Foundation::KeysIndexes The Relational package references the ObjectModel and Foundation packages. OCL Representation of Relational Constraints [C-1] temporaryScope is valid only if the isTemporary is True. context Tabl e inv: self.temporaryScope.notEmpty implies self.isTemporary=True [C-2] checkOption is valid only if isReadOnly is False. context View inv: self.checkOption implies self.isReadOnly=False [C-3] scale is valid only if precision is specified. context Column inv: self.scale.nonEmpty implies self.precision.notEmpty

Specified by:
getRelational in interface CwmPackage
Returns:
Proxy object related to nested package Relational.

addAliasPackages

public void addAliasPackages()
Overrides:
addAliasPackages in class RefPackageBase

checkConstraints

protected void checkConstraints(List<JmiException> errors,
                                boolean deepVerify)
Specified by:
checkConstraints in class RefBaseObjectBase