Benutzeranleitung / Produktwartung 7.5 des Produzenten Sybase
Zur Seite of 288
O BJECT O RIENTED M ODEL User’ s Guide POWERDESI GNER 7.5.
Copyri ght ( c) 1988–2000 Sybase, Inc. Al l ri gh ts reserved. Inf orm ati on in thi s m anu al m ay chan ge wi th out n oti ce and does n ot represen t a com m i tm ent on the par t of S ybase, In c. and i ts sub sid iarie s . The sof twar e described i n t hi s m anu al i s prov ided by Sy base, Inc.
iii Contents A bout T his Book ............................................................................................ix 1 Obje ct-Oriente d Mode l Basic s ..........................................1 Functional overview ..........................
iv Preview the code of an interf ace ...................................... 45 Displaying text in interface symbols ................................. 46 Defining attributes ................................................................... 48 Attribute properties .
v Creating a dependency .................................................. 109 Modifying dependency properties ................................... 111 Displaying text in dependency sy mbols .......................... 112 Defining realizations ........
vi Reverse engineering PowerBuilder options ................... 166 Loading a PowerBuilder library model in the workspac e ................................................................ 168 Reverse engineering obj ects fr om a PowerBuilder application .
vii Trans lating OOM data types for a PDM ................................ 217 Trans lating Java data ty pes for a PDM .......................... 217 Generating a PDM fr om an O OM ......................................... 218 Generating and updating a PDM .
viii.
ix About This Book This book des cribes th e Pow erDesign er Object-Ori ented Model en vironm en t. It shows y ou how to do the follow ing: ♦ Build an Object-Oriented Model (OOM) ♦ Use classes , p.
About This Book x To help you do you r w ork m ore easily , thi s book is divided in to chapters that focus on particular goals. If y ou want to Use these parts of the book Lea rn about the e nvironm .
1 CHAPTER 1 Object-Oriented Model Basics This chapter presents the PowerDes igner Object-Orien ted Model. It provides you w ith an introduction to the basic notions of object-oriented modeling and the Uni fi ed M o del i ng Language ( UML).
Functional over view 2 Functional ov erv iew Pow erDesig ner Object-Ori ented Model i s a pow erful desig n tool f or obj ect- oriented m odeling. It gives y ou all the advantag es of a graphical object design implem entation. With this product, you can: ♦ Build an Object-Oriented Model (OOM) ♦ Gener ate J a va class so urce fil es (.
Chapter 1 Object- Oriented Model Basics 3 UML and object-oriented modeling UML ( T he U ni fied M ode ling Language ) is a mod eling l a nguage ai med at defin ing s tandards f or obj ect-orien ted modelin g.
What is an OOM? 4 What is an OOM? An OOM con tains a set of packages, classes, interf aces, and their relationships . T hese objects together f o rm a class structu re that is the logical design view of all (or p art of) a so ftware system . An OOM is esse ntia lly a static conceptu al model of a softw are system .
Chapter 1 Object- Oriented Model Basics 5 Objects in an OOM An OOM represents the interaction of th e followin g objects: Object Selection Tool Description Package Genera l purpose s ub-set use d to o.
Creating a new OOM 6 Creating a new OOM Creating an OOM requires that y o u do the follow ing: ♦ Open a new file ♦ Give the OOM a n ame an d a code After y ou create an OOM, you can enrich its d efinition by entering properties and associating obj ects.
Chapter 1 Object- Oriented Model Basics 7 4 Click OK. If y o u were w orking on an ex isting work space, P ow erDesigner open s an new OOM. If there w as no w orkspace open, PowerDesig ner opens a n ew w orkspace and a new OOM. 5 Select Model ➤ Model Properti es.
Opening an existing O OM 8 Opening an existing OOM An OOM h as the file extens ion .OOM. v To open an existing OOM : 1 Select File ➤ Open. or Click the Open tool. A st andard Win dows file selecti on dialog box appears. 2 Select a file w ith the .OOM extension.
Chapter 1 Object- Oriented Model Basics 9 Defining OOM model options You can set m odel optio ns and nam ing conventions that apply to all o bjects in the m odel. You can also set nam ing conven tions for each type of object in you r model. You defi ne OOM model options from the model opt ions di alog box.
Defining OOM model options 10 Your choice of wh ether or not to enforce dom ain and attribute non- divergence has the follow ing results: Non-divergence Result Not enforced Attribu t es that are di ve.
Chapter 1 Object- Oriented Model Basics 11 Defining OOM properties The Model p r operty sheet displays th e d efinition of th e current model. From this property sheet you can modify the model definition. A OOM has the f ollowing m od el prope r ties: Property Description Length Nam e Nam e for the m odel 254 Code Code f or the m odel.
Defining OOM properties 12.
13 CHAPTER 2 Building an Object-Oriented Model This chapter describ es how to build an Object-Oriented Model ( OOM) . I t explains th e role of each object in an OOM and how to create and modif y objects.
Defining packages 14 Defining packages A packag e is a general pu rpose m echanism for organizing elemen ts into grou ps. When you are w orking with large models, y ou can split any model into sm aller subdivi sions in order to avoid m anipulati ng th e entire set of data of the m odel.
Chapter 2 Building an Object- Oriented Model 15 Display ing text in package symbols You can def ine the f ollowin g display preferen ces for a packag e: Preference Description Sho w stereo t ypes When.
Defining packages 16 The package display preferences page appears. 4 Modify the package display pref erences. 5 Click OK..
Chapter 2 Building an Object- Oriented Model 17 Defining classes A class is a description of a set of objects that h ave a sim ilar structure and behavior, and share the sam e attributes, operatio ns, relationships, and sem antics. A clas s usually implem ents one or more interf aces.
Defining classes 18 Class properties A class has the follow ing general pr operties: Property Description Maximum length Name Name of the class 254 Code Reference name f o r the class 254 Comment Descriptive comm ent for the cl ass — Stereoty pe Subclass ific ation of a class deriv ed from an exis ting one.
Chapter 2 Building an Object- Oriented Model 19 A nalyzing class properties The follow ing class properties each hav e several defau lt values from wh ich you can select from: ♦ Stereotype ♦ Ty pe.
Defining classes 20 You can declare a class to be one of th e follow ing stereoty pes: Stereoty pe Description actor Coherent set of roles that users of use cases pl ay when interacting with the use cases enum eration List of named v alues us ed as the range of a particula r attribute ty pe exce ption Exception cla ss.
Chapter 2 Building an Object- Oriented Model 21 Visibility The visibility of a class refers to the w ay in w hich it can be seen by other objects. A class th at is visible to an other object may in fluen ce the structu r e or behavi or of the object, or s imilarly , its ow n properties m ay be affect ed by t he other object.
Defining classes 22 Creating a class from the Browser v To create a class from the Brow ser: 1 Right-click the Classes category in th e Browser. 2 Select New from the contex tual m enu. The property sh eet of the class appears. 3 Type a class name and a class code.
Chapter 2 Building an Object- Oriented Model 23 Creating a class from a diagram v To create a class in a diagram: 1 Click the Class tool in the palette toolbar.
Defining classes 24 A ttaching an inner class to a class You attach an in ner class to a class (or interf ace) from the Inn er Classes pag e of the class (or interface) property sh eet. v To declare an inner class w ithin a class: 1 Double-click a class in the m odel.
Chapter 2 Building an Object- Oriented Model 25 The classes appear in th e list of inn er classes for th e current class , and the definition of the classes are added to the current class definition. 6 Click the Code Preview tab to visualize the in ner class definitions w ithin the current class: 7 Click OK.
Defining classes 26 Detaching an inner class from a cl ass Once y ou have attach ed an inner clas s to a class, to rem ove its declaration from the class y ou must u se detach it. v To detach an inner class from a class: 1 Double-click a class in the m odel.
Chapter 2 Building an Object- Oriented Model 27 Classifiers A classi fier, in UML termin ology, is a mech anism that has structural (attributes) an d behavioral (operation s) features . A class is the m ost importan t classif ier, but all objects that can h ave instan ces, such as interfaces or associations, are clas sifiers .
Defining classes 28 The class property sheet appears. 2 Type or select class properties . or Click on a page tab. Type or select class properti es as requi red. 3 Click OK. Modifying class properti es from the l i st of cl asses The list of classes in cludes all classes attached to the curren t model or package.
Chapter 2 Building an Object- Oriented Model 29 An arrow appears at the begin ning of the line. 3 Modify any of the pro p erties of the class directly in th e list. 4 Click OK. A dding objects to a class You can add an object to a class , that already ex ists in the m odel, but w hich belo ngs to ano ther cl a ss.
Defining classes 30 A dding an attribute to a class An attribu te is a named property of an object that defines th e characteristics of th e object. You can add attributes that already exist in th e model and w hich belong to other objects. v To add an attribute to a class: 1 Double-click a class in the m odel.
Chapter 2 Building an Object- Oriented Model 31 The Selection w indow appears. It contains a list of all th e attributes that exist in the m od el, with the exception of those th at already belong to the class. 4 Select the attributes that y ou w ant to add to the class .
Defining classes 32 The Operations page appears . 3 Click the A d d Operations tool. The Selection window app ear s. It contains a list of all th e operations that exist in the m od el, with the exception of those th at already belong to the class. 4 Select the operations that y ou w ant to add to the class .
Chapter 2 Building an Object- Oriented Model 33 The operations are added to the class and appear in the list of operations for the class. 6 Click OK. Preview the code of a class or an interface You can preview the code of a class or an interface in the Code Preview page of the Property sheet of a clas s or an interf ace.
Defining classes 34 Display ing text in class symbols You can def ine the f ollowin g display preferen ces for a class: Preference Description Show attribute s Display s all the attribute s of the cla.
Chapter 2 Building an Object- Oriented Model 35 The class display preferences page appears. 4 Modify the class display pref erences. 5 Click OK..
Defining interfaces 36 Defining interfaces An in terface is a ty pe of class that is sim ilar to a class but w hich is u sed to implem ent the specification of an abstraction of a class. A n interface is a collection of operations used to specify the externally visible behavior of a class.
Chapter 2 Building an Object- Oriented Model 37 An interf ace d e finition also includes the followi ng properties, which are defin ed on associ ated property sheets : Property Description Attribut e .
Defining interfaces 38 The property sh eet of the interface appears. 3 Type an interface nam e and an interface code. 4 Click OK. A new interface is created in th e Interfaces categ ory. Creating an interface from the list of interfaces v To create an interface by inserting it in the list: 1 Select Model ➤ Interf aces.
Chapter 2 Building an Object- Oriented Model 39 The following sy mbol appears at the click positio n: At creation, an interface is nam ed Intf n , w here n is a number a ssigned in the order of the creation of objects. 3 Click the Pointer tool in the palette toolbar.
Defining interfaces 40 The interface property sheet opens to the General pag e. Opening property sheets at last accessed page Property sheets open to th e General pag e by def ault.
Chapter 2 Building an Object- Oriented Model 41 The list of interf aces appears. 2 Click the in terface that y ou want to m odify. An arrow appears at the begin ning of the line. 3 Modify any of the properties of the interf ace directly in the list. 4 Click OK.
Defining interfaces 42 You can add the f ollowing objects to an interface: Object Description Attribut e Named propert y of an interface that defines t h e characteristi cs o f an int erface Operatio .
Chapter 2 Building an Object- Oriented Model 43 The Attributes page appears. 3 Click the A dd Attributes tool. The Selection w indow appears. It contains a list of all th e attributes that exist in the m od el, with the exception of those th at already belong to the interface.
Defining interfaces 44 6 Click OK. A dding an operation to an inter f ace An operation is the im plementation of a service that can be requested from any object of the class in order to affect behavior. You can add operatio ns that already exist in the m ode l and which belong to other objects.
Chapter 2 Building an Object- Oriented Model 45 The Selection window app ear s. It contains a list of all th e operations that exist in the m od el, with the exception of those th at already belong to the interface. 4 Select the operations that y ou w ant to add to the interf ace.
Defining interfaces 46 The Code Preview page appears. 3 Click OK. Display ing text in interface symbols You can def ine the f ollowin g display preferences for an interf ace: Preference Description Sh.
Chapter 2 Building an Object- Oriented Model 47 v To modify the interface display preferences: 1 Select Tools ➤ Display Preferen ces. or Righ t-click th e diagram backgroun d and select Display P references f rom the contextu al menu. The Display Preferen ces dialog box appears .
Defining attributes 48 Defining attributes Attributes define the characteristics of a class. A class m ay have non e or several attributes. An attribute is a nam ed property of a class that describes the range of values that inst ances of th e property may hold.
Chapter 2 Building an Object- Oriented Model 49 A ttribute properties An attribute has the f ollowing properties: Property Description Maximum length Parent Object to which the attribute be longs to 2.
Defining attributes 50 An attribute definition also includes business rules, w hich are defined on associated property sheets. A nalyzing attribute properties The follow ing attribut e properties each.
Chapter 2 Building an Object- Oriented Model 51 M ultiplicity The cardinality of each of an attribute is called the m ultiplicity. Cardinality Number of instances in relation 0.
Defining attributes 52 The property sh eet of the attribute appears. 3 Type an attribute nam e and an attribute code. 4 Click OK. A new attribute is created in the A ttributes category. Creating an att r i bute from the list of at t r i but es v To create an attribute by inserting it in the list: 1 Select Model ➤ Attributes.
Chapter 2 Building an Object- Oriented Model 53 3 Type an attribute nam e and an attribute code. 4 Click the Stereoty pe column. 5 Select a s tereoty pe from the Stereoty pe dropdown lis tbox. or Type a stereoty pe in the Stereotype colum n. 6 Click the Data Type colum n.
Defining attributes 54 The Attributes page appears. I t lists attr ib utes defined for the class. 3 Click a blank line in the list. or Click the Add a Row tool. An arrow appears at the begin ning of the line. 4 Type an attribute nam e and an attribute code.
Chapter 2 Building an Object- Oriented Model 55 Modifyi ng at t r i but e pr oper t i es f r om i t s pr oper t y sheet The attribute pro p erty sheet display s the definition of the attribute, wh ich you can m odify. v To modify attribute properties from its property sheet: 1 Double-click the attribute in th e model.
Defining attributes 56 The general prop er ties of the attribute, in addition to those on the general page, appear. 4 Type or select attribut e properties as required. 5 Click OK. Modifyi ng at t r i but e pr oper t i es f r om t he l i st of attributes The list of attributes includes all attributes attached to the current model.
Chapter 2 Building an Object- Oriented Model 57 The list of attributes appear s. 2 Click the attribute that y ou want to m o dify . An arrow appears at the begin ning of the line. 3 Modify any of the prop erties of the attribute directly in th e list.
Defining attributes 58 The attribute pro p erty sh eet opens to the General page. Opening property sheets at last accessed page Property sheets open to th e General pag e by def ault.
Chapter 2 Building an Object- Oriented Model 59 Copy ing an attribute to another class You can copy an attribute from one class and add it to anoth er class. If th e class already contains an attribute w ith the sam e name or code as the copied attribute, the copied attribute is renamed.
Defining attributes 60 Display ing text in attribute symbols An attribu te has the f o llowing dis play preferen ces: Preference Description Show v isibility Display s the attribute as an icon, w ith .
Chapter 2 Building an Object- Oriented Model 61 3 Select Attribut e. 4 Modify the attribute display pref erences. 5 Click OK..
Defining identifiers 62 Defining identifiers An identif ier is a class attribute, or a co mbination of class attributes, wh ose values u niquely identify each occurrence of th e class. An identifier is the OOM equivalen t of a CDM iden tifier or a prim ary key or an alternate key in a PDM.
Chapter 2 Building an Object- Oriented Model 63 Creating an identifier You can create an iden tifier from a class . v To create an identifier: 1 Double-click a class in the m odel. The class property sheet opens to the General page. 2 Click the Identifier tab.
Defining identifiers 64 A dding attributes to an identifier You can add attributes to an identifier. v To add attributes to an identifier: 1 From the identifier property sheet, click th e Attributes tab. The Attributes page appears. It lists the attributes currently defined for the identifier.
Chapter 2 Building an Object- Oriented Model 65 3 Select ch eckboxes f or one or m ore class attributes th at you w ant to designate as an identifier. 4 Click OK in each of the dialog boxes .
Defining identifiers 66 Opening property sheets at last accessed page Property sheets open to th e General pag e by def ault. How ever, you can choose to open property sheets at th e last page accessed by selecting Tools ➤ Options ➤ Dialog, and selecting the option Keep Last T ab in th e Property Sheet s grou pbox.
Chapter 2 Building an Object- Oriented Model 67 Defining operations An operation is a service that can be reques ted from an object to eff ect behavi or. It has a n ame and a list of param eters. An operati on is a specification of a transform ation or query that an object may be called to execute.
Defining operations 68 A nalyzing operation properties The follow ing operation properties each hav e several def ault values from w hich y o u can select from : ♦ Visibility ♦ Stereotype Visibili.
Chapter 2 Building an Object- Oriented Model 69 3 Type an operation nam e and an operati on code. 4 Click OK. A new operation is created in the Operation s category. Creating an opera t i on f r om t he l ist of operations v To create an operation by inserting it in the list: 1 Select Model ➤ Operations .
Defining operations 70 Creating an operation from a class in a di agram You can create an operation from a class or an interface in a diag ram in the same way . v To create an operation from a class in a diagram: 1 Double-click a class in the m odel. The class property sheet appears.
Chapter 2 Building an Object- Oriented Model 71 Modifying operation properties There are tw o approaches to modif ying operation properties : ♦ Modify the property s heet of an operation ♦ Modify .
Defining operations 72 The operation property sheet opens t o the General page. Opening property sheets at last accessed page Property sheets open to th e General pag e by def ault.
Chapter 2 Building an Object- Oriented Model 73 The list of oper atio ns appears. 2 Click the operation that you w ant to modify . An arrow appears at the begin ning of the line. 3 Modify any of the prop erties of the operation directly in the list. 4 Click OK.
Defining operations 74 You can create tw o types of con structor for a given class: Default Copy A Default c onstruc tor ha s no pa r ameters . A dding a Default constructor and dest r uct or t o a cl ass You can def ine only one Default con structor and one D efaul t destruct or (PowerBuilder on ly) for any given class .
Chapter 2 Building an Object- Oriented Model 75 If the c urre nt obj ect l a nguage o f t he OOM i s Analysis or Java , a Defa ult constructor is created at the end of the list of operation s for the clas s.
Defining operations 76 A dding a Copy construct or t o a cl ass The body of a Copy const ructor contai ns a copy of the attribu tes of the class that exist at the m oment of the creation of the cons tructor. When y o u create a Copy constructor, it has th e sam e as that of th e class, prefix ed by t he key word new .
Chapter 2 Building an Object- Oriented Model 77 A dding operations to a class You can add an operation to a class in one of th e follow ing tw o way s: ♦ Add a dupl icate operation ♦ Add an operat.
Defining operations 78 A dding an operation from a pare nt cl ass You can add to a class an operation th at belongs to a paren t class. The new operatio n has the same signatu re (name and parameters) as the original operation, bu t does not hav e its ot her properties .
Chapter 2 Building an Object- Oriented Model 79 A copy of the operation is added to the list op erations for the class. A dding Getter and Setter operations to a class Getter or a Setter operations are special ty pes of operations that y ou create for an attribute.
Defining operations 80 4 Click the A dd button. 5 Select Get /Set Operation s from th e dropdown lis tbox. The operations are created for the attribu tes.
Chapter 2 Building an Object- Oriented Model 81 The new ly created operation s appear at the bottom of th e list of operations for th e class. They are g rayed indicatin g that their nam es can not be m odified.
Defining operations 82 v To create an implementation operation: 1 Double-click a class that is lin ked to an interf ace by a realization link. 2 Click the Operations tab. 3 Click the To be implem ented button. The To B e Implemen ted Operations win dow appears .
Chapter 2 Building an Object- Oriented Model 83 6 Click Close. The newly created o peration is added to the end of the list of operations for the class.
Defining operations 84 The Implem entation page appears. 3 Type or m odify code direct ly in th e w indow . or Click a tab at the bottom of the edit w indow and type or m odify code. 4 Click OK. Copy ing an operation to another class You can copy an operation from one class and add it to anoth er class.
Chapter 2 Building an Object- Oriented Model 85 A selection box appears. It lists ope r a tio ns attached to all other classes in the model. 4 Select one or more operations in the list. 5 Click OK. The copied o p erations appear in the list of operations for the current class.
Defining operations 86 The visibility of an operation in a class or an interf ace can be d isplayed in one of the follow ing way s: Visibility When selected Icon Displa ys the operation a s an icon Ma.
Chapter 2 Building an Object- Oriented Model 87 4 Modify the operation display pref erences. 5 Click OK..
Defining parameters 88 Defining parameters A param eter is a specification of a v ariable that can be changed, pas sed, or returned. Parameters are used only for op erations. A parameter alw ays has a direction, wh ich indicates the flow of information.
Chapter 2 Building an Object- Oriented Model 89 Creating a parameter You can create param eters only f rom an operation. You create param eters from the Paramete rs page in the operation property sheet. v To create a parameter: 1 Double-click an operation in the m o d el.
Defining parameters 90 The paramet er property s heet opens to the G eneral page . Opening property sheets at last accessed page Property sheets open to th e General pag e by def ault.
Chapter 2 Building an Object- Oriented Model 91 Defining generalizations A generalization relationship between classes sh ows that the su bclass shares the st ructure or beh avior def ined in one or m ore superclasses. You use a generalize to sh ow a "is-a" relationship betw een classes.
Defining generalizations 92 A nalyzing generalization properties The followi ng gen eralization properties each h ave several def ault values from which y ou can select from : ♦ Visibility ♦ Stere.
Chapter 2 Building an Object- Oriented Model 93 The link appears betw een the tw o objects. Dragging a generalization to a different class You can chan ge the class or interface at eith er end of a ge.
Defining generalizations 94 Modifying generalization properties There are two approach es to modify ing generalization properties : ♦ Modify the property s heet of the ge neralizati on ♦ Modify an.
Chapter 2 Building an Object- Oriented Model 95 Modifyi ng gener al i zation properties fr om t he l i st of gener al izations The list of generalizations includes all generalizations attach ed to the current model. You can m o d ify the generalization pro p erties from the list.
Defining generalizations 96 You m odify the display preferences f o r a generalization in the Display Preferences dialog box. v To modify the display preferences: 1 Select Tools ➤ Display Preferen ces. or Righ t-click th e diagram backgroun d and select Display P references f rom the contextu al menu.
Chapter 2 Building an Object- Oriented Model 97 Defining associations An as sociation represents a structu ral relationship betw een objects of differen t classes. A n association is draw n as a solid line between pairs of classes. You can def ine an ass ociation betw een two classes , or between a class and an interface.
Defining associations 98 A ssociation properties An association has the follow ing pr o perties: Property Description Maximum length Name Name of the asso ci ation 254 Code Reference name for the associatio n 254 Comment Descriptive comment for the associatio n — Stereoty pe Subcla ssifica tion of an a ssocia tion derived f rom an existing one.
Chapter 2 Building an Object- Oriented Model 99 Creating an association You can create an as sociation between tw o classes or betw een a class and an interface: ♦ in a diagram ♦ from the list of .
Defining associations 100 The association property sheet opens to the General pag e. Opening property sheets at last accessed page Property sheets open to th e General pag e by def ault.
Chapter 2 Building an Object- Oriented Model 101 A ssociation role propert i es You can def ine the f o llowing properties for each of th e two roles of an association: ♦ Multiplicity ♦ Ordering ♦ Visibility M ultiplicity The cardinality of each of th e two roles of an association is called the mu ltiplicity.
Defining associations 102 Visibility The visibility of an association refers to the w ay in w hich it can be seen by other objects. An association that is visible to an other object may influence the st ructure or beh avior of the object, or s im ilarly , its ow n properties may be affected by the other object.
Chapter 2 Building an Object- Oriented Model 103 The association contex t men u appears. 2 Select Chan ge to Class from the context m enu. An ass o ciative class w ith two as sociations replaces the as sociation. The associative class tak es the nam e of the original association.
Defining associations 104 3 Click OK. Modifying associati on properti es from the l i st of associ ati ons The list of associations in cludes all associations attached to the curren t model. You can m o dify the association prope r ties fro m the list.
Chapter 2 Building an Object- Oriented Model 105 The association property sheet appears. 2 Click the Cardinality tab . The Cardinality page appears. 3 Select properties for role A and for Role B. 4 Select the Ag gregation/Composition check box. 5 Select Aggreg ation/Composition group box optio ns.
Defining associations 106 Display ing text in association symbols You can def ine the f ollowin g display preferences for an ass ociation: Preference Description Sho w name When selected, d isplays th.
Chapter 2 Building an Object- Oriented Model 107 The Association dis p lay preferences appears . 4 Modify the association display pref erences. 5 Click OK.
Defining dependencies 108 Defining dependencies A dependency is a relations hip between tw o modeling elem ents, in w hich a change to one m o d e ling element (the in dependent element) w ill affect the other m odeling elem ent (the dependent elem ent).
Chapter 2 Building an Object- Oriented Model 109 A nalyzing dependency properties You can select a s tereotype f or a dependency from the follow ing sev eral default values: Stereoty pe Description ac.
Defining dependencies 110 The link appears betw een the tw o objects. Dragging a dependency to a different class You can chan ge the class at either end of a dependency by clicking the dependency to select it, pressing down CTRL , an d draggi ng on e of the attach point s to a differen t class.
Chapter 2 Building an Object- Oriented Model 111 Modifying dependency properties There are two approach es to modify ing dependency properties: ♦ Modify the property s heet of a dependency ♦ Modif.
Defining dependencies 112 3 Click OK. Modifyi ng dependency properties fr om t he l i st of dependenci es The list of dependencies includes all dependencies attached to the current model . You can m odify t he dependen cy properti es from the list. v To modify dependency proper ties from the list of dependencies: 1 Select Model ➤ Dependencies .
Chapter 2 Building an Object- Oriented Model 113 You m odify the display preferences for a dependency in the Display Preferences dialog box. v To modify the display preferences: 1 Select Tools ➤ Display Preferen ces. or Righ t-click th e diagram backgroun d and select Display P references f rom the contextu al menu.
Defining realizations 114 Defining realizations A realization is a relationship betw een a class and an interface. It sh ows that the class realizes th e operations offered by the interface. In this kind of relationship, th e interface is called th e specification elem ent and the class is called the im plemen tation elem ent.
Chapter 2 Building an Object- Oriented Model 115 Creating a realization You can create a realization on ly from a class to an interf ace. v To create a realization: 1 Click the Realization tool in the palette toolbar. 2 Drag the realization f rom the class to the in terface.
Defining realizations 116 Opening property sheets at last accessed page Property sheets open to th e General pag e by def ault. How ever, you can choose to open property sheets at th e last page accessed by selecting Tools ➤ Options ➤ Dialog, and selecting the option Keep Last T ab in th e Property Sheet s grou pbox.
Chapter 2 Building an Object- Oriented Model 117 v To modify realization properties from its property sheet: 1 Double-click the realization in th e model. The realization property s heet appears. 2 Type or select realization properties . or Click on a page tab.
Defining realizations 118 Modifyi ng a r eal i z at i on f r om t he l i st of r eal izations The list of realizations includes all realizations attached to the current m o del. You can m odify the realization properties from the list. v To modify realization properties from the list of realizations: 1 Select Model ➤ Realizations.
Chapter 2 Building an Object- Oriented Model 119 You m odify the display preferences f o r a realization in the Display Preferences dialog box. v To modify the display preferences: 1 Select Tools ➤ Display Preferen ces. or Righ t-click th e diagram backgroun d and select Display P references f rom the contextu al menu.
Defining domains 120 Defining domains Domains help y o u identify the ty p e s o f inf ormation in y o ur project. T hey define the set of valu es for wh ich an attribute is valid. Apply ing domain s to attributes makes it easier to standardize data characteristics for attrib utes in differ ent classe s.
Chapter 2 Building an Object- Oriented Model 121 Creating a domain You create a dom ain from the lis t of dom ains. Accessing the List of Domains You can access the Lis t of Dom ains from the current m odel, or by righ t clicking th e approp r iate model node in the Bro wser, and selecting New ➤ Domain from th e contextual men u.
Defining domains 122 The property sh eet for the new domain appears. 7 Select a data type. Specify length and precisi on as required. $ For information on data types and selecting a data type for a domain see the f o llowin g sections Indicating data ty pe , length, and precision and Selecti ng a data t ype f o r a domain from the list .
Chapter 2 Building an Object- Oriented Model 123 In the list of available data ty pes, a variable indicates where y ou have to type a length or precision, as follow s: Variable Replace with %n Length %s L ength with pre cision %p Decimal precision All ob j ect l a nguages all ow you to selec t the <unde fined> d ata type .
Defining domains 124 4 Select a data type f rom the dropdow n listbox . Undefined data type If y o u do not want to select a data type im mediately , you can choose the <Undefin ed> data type. When y ou generate Java or PowerBuilder objects, this data ty pe is replaced by the default data ty pe for your targe t ob j ect l anguage.
Chapter 2 Building an Object- Oriented Model 125 The change of data ty pe appears in the list of domains. Undefined data type If y o u do not want to select a data type im mediately , you can choose the <Undefined> data ty p e.
Defining domains 126 Conceptual data ty pe What it stores Length? Precision? Integer 32-bit integer —— Short Integer 16-bit integer —— Long Inte ger 32-bit integer —— By te 256 value s —.
Chapter 2 Building an Object- Oriented Model 127 Conceptual data ty pe What it stor es Date Day , month, y ear Tim e Hour, m inute, and sec ond Date & T ime Date and time Tim estamp Sys tem da te .
Defining domains 128 A lis t of standard data t ypes appears. 5 Click the radio button corresponding to the data type you w ant to apply. The code for the dat a type appears in the Code box. Undefined data type If y o u do not want to select a data type im mediately , you can choose the Un define d data ty pe.
Chapter 2 Building an Object- Oriented Model 129 Modifying domain properties You can m odify domai n properties from its property sheet. When y o u modify a domain, y o u can choose to autom atically .
Defining check par ameters 130 Defining check parameters Check parameters are set of conditions w hich data must satisfy to remain valid. They are u sed principally in f or use in a CD M or a PDM.
Chapter 2 Building an Object- Oriented Model 131 v To set standard parameters: 1 Click th e Standard Check s tab in the property sheet of a dom ain or an attribute. The Standard Check s page appears. 2 Type y our choice of Stan dard P arameters . 3 Click OK.
Defining check par ameters 132 You define additional check parameters f or data constraints where stan dard check param eters are not suffi cient. v To define additional check parameters: 1 Click the A dditional Checks tab in the proper ty sheet of an attribute or domai n.
Chapter 2 Building an Object- Oriented Model 133 At generation, validation rule variables are instantiated w ith the following values: Variable Value %A TTRIBUT E% Code of the attribute to w hich the .
Defining check par ameters 134.
135 CHAPTER 3 Managing Object-Oriented Models This chapter describes h o w to compare an d merg e Obj ect-Oriented Models as w ell as how to check the validity of a Object-Oriented Model (OOM).
Checking an OOM 136 Checking an OOM The procedure that gen erates .java Java source f iles or PowerBuilder objects starts by checkin g the validity of the OOM.
Chapter 3 Managing Object-Or iented Models 137 OOM check options When y ou check an OOM, if a p arameter is f ound to be invalid, it can be display ed wi th on e of tw o types of m essages: Message De.
Checking an OOM 138 Object selection in the Check Model You select objects to check from the Selection page. You can list all objects in th e current model, or packag e, by selecting the Include Sub- packages tool.
Chapter 3 Managing Object-Or iented Models 139 The object parameters w hich are verifi ed by th e Check Model are display ed wit h the s ym bols indicat ing a deg ree of problem s everity . 3 If y o u want to ch ange a degree of problem severity, select th e obj ect parameter an d then select either the Error or Warnin g tool.
Checking an OOM 140 The Selection page appears. 6 Select a m odel from the dropdow n list at t he top of the dialog box. 7 Click an object tab. The corresponding object page displays all the objects in the cu rrent OOM. 8 Select checkbox es for objects that you w ant to be checked.
Chapter 3 Managing Object-Or iented Models 141 The Check Model Resu lt List dis plays errors and warn ings based on the check o ptio ns you have d efined . Dockable result w indow When y o u right click an object param eter, a menu appears listin g correction options.
Checking an OOM 142 The Check tool bar also con tains nav igation tools that y ou can use to m ove to the first, previous, n e xt, or last er r o rs that are listed.
Chapter 3 Managing Object-Or iented Models 143 6 Right -click the object param eter and select Re-check from the contex tual menu. Verify that the problem has been corrected.
Merging two OOM 144 Merging tw o OOM You can m erge two OOM. The m erge makes it possible to form a single model that com bines design efforts perform ed independent ly by s everal team memb e rs .
Chapter 3 Managing Object-Or iented Models 145 Opening a Rose model in an OOM You can import a .m dl models built with Rational Rose in PowerDesigner. A new OOM is created for the Rose m odel, and the objects of the Rose m odel are translated in to OOM objects.
Opening a Rose model in an OO M 146 Objects imported The following Rose objects are imported directly into the new OOM: Package Diagram Class Interf ace Attribute Operation Generalization Association .
Chapter 3 Managing Object-Or iented Models 147 Objects not imported When you open a Rose m odel, the following properties are not imported into the new OOM: Global Rose Property Rose Sub-property Type.
Opening a Rose model in an OO M 148 Default Values of A rguments Protocol Quali fi c atio n (langua ge -spec i fi c) Exceptions Size (amou nt of s torage) Time (to complete operation) Concur rency (se.
149 CHAPTER 4 Reverse Engineering This chapter describes Jav a, PowerBuilder, an d XML reverse en gineering fun ctions for an Object-Oriented Model (OOM).
What is revers e engineering? 150 What is rev erse engineering? Reverse en gineering is th e process of ex amining an d recovering data or source code from a file that is th en used to build or upd ate an OOM. You reverse eng ineer objects to an OOM via a diagram .
Chapter 4 Revers e Engineering 151 Rev erse engineering Jav a You can revers e engin eer files that con tain Java classes into an OOM. For each existin g class in a Java file, a correspondin g class is created in the model, w ith the same nam e and containing the sam e information.
Reverse engineer ing Java 152 When you r everse engineer Java fi les, so me c o mm ents may change fo rm or position within the code. Comment in original Java file After rev erse Before the import dec.
Chapter 4 Revers e Engineering 153 The Options page appears . 3 Select or clear options. 4 Click Apply . 5 Click Cancel. Loading a JDK library model in the w orkspace When y o u reverse engin eer Java files, y ou can, at the sam e time, load one of the JDK models that contain s the class libraries of a particular v ersion of JDK.
Reverse engineer ing Java 154 The available library files are listed. Each JDK file corresponds to a par ticula r versi o n of J D K. 3 Select th e file JDK-1_1_8.OOM . This fi le contai ns all t he library class fil es of v ersion 1_1_8 of JDK. 4 Click Open.
Chapter 4 Revers e Engineering 155 3 Click the A dd button. A st andard Open dial og box appears . 4 Select the files that y ou w ant to reverse an d click Open. You return to the Reverse Java dialog box. It displays the files y ou selected. 5 Click the Options tab.
Reverse engineer ing Java 156 6 Select th e Ignore operation body checkbox . 7 Click OK. The classes rev ersed with out the body of the code. The clas ses are autom atically added to y our model and are v isible in th e diagram . Reverse engineering Jav a source files Each .
Chapter 4 Revers e Engineering 157 2 Select the .java radio button . Reversing w ithout the body of the code You can ch oose reverse .jav a source fi les w ithout th e body of the code of th e class by selecting t he Ign ore operation body checkbox in the Options page.
Reverse engineer ing Java 158 4 Select the files that y ou w ant to reverse an d click Open. Multi-selection You can select several files sim ultaneously by usin g the CTRL or SHIFT keys. 5 Click OK. A Progres s box appears and th e classes are added to you r model.
Chapter 4 Revers e Engineering 159 2 Select the .class radio bu tton. 3 Click the A dd button. A st andard Open dial og box appears . 4 Select the files that y ou w ant to reverse an d click Open. Multi-selection You can select several files sim ultaneously by usin g the CTRL or SHIFT keys.
Reverse engineer ing Java 160 You return to the Reverse Java dialog box. It displays the files y ou selected. 5 Click OK. A Progres s box appears and th e classes are added to you r model.
Chapter 4 Revers e Engineering 161 Reverse engineering Jav a files from a source directory Reverse en gineering .java source f iles from a source directory requires that you follow the sam e procedure as wh en y ou reverse en gineer in dependent .java files, the on ly dif ference being that you select a directory in which several .
Reverse engineer ing Java 162 Reversing w ithout the body of the code You can ch oose reverse .jav a source fi les w ithout th e body of the code of th e class by deselecting t he Ign ore operation body checkbox. 3 Click the A dd button. The Brow se for Fol der dialog box appears.
Chapter 4 Revers e Engineering 163 5 Click OK. A Progres s box appears and th e classes are added to you r model. The classes are vi sible in the diag ram and in the Brow ser. The reversed classes are listed in the R everse page of the Output win d ow, situ ated in the bottom part of the PowerDesigner m ain window .
Reverse engineer ing Java 164 2 Select the A rchive radio button . 3 Click the A dd button. A st andard Open dial og box appears . 4 Select the files that y ou w ant to reverse an d click Open. Multi-selection You can select several files sim ultaneously by usin g the CTRL or SHIFT keys.
Chapter 4 Revers e Engineering 165 The Reverse Java dialog box display s the files y ou selected. 5 Click OK. A Progres s box appears and th e classes are added to you r model.
Reverse engineer ing PowerBuilder 166 Rev erse engineering Pow erBuilder You can reverse eng ineer Po werBuilder NVO (non-visu al objects) into an OOM from either of th e follo wing sources: ♦ Power.
Chapter 4 Revers e Engineering 167 You c a n define the fol lowing Po werBuild er r everse enginee r ing op tions: Option Result of selection Ignore operation body Reverse s Power Builder objec ts wit.
Reverse engineer ing PowerBuilder 168 The Options page appears . 3 Select PowerBuilder rev erse options. 4 Click Apply . 5 Click Cancel. Loading a PowerBuilder library model in the workspace When y o .
Chapter 4 Revers e Engineering 169 The available library files are listed. Each PB file correspo nds to a particular version of PowerBuilder. 3 Select the file PB7.OOM. This file contains all the library class files of PowerBuilder version 7. 4 Click Open.
Reverse engineer ing PowerBuilder 170 2 Select the PBL radio button . 3 Select a Pow erBuilder appli cation f rom t he PB Appl ication dropdow n listbox. 4 Click the A dd button. A st andard Open dial og box appears . 5 Select the file th at you wan t to reverse and click Open.
Chapter 4 Revers e Engineering 171 You return to the Reverse PowerBuilder dialog box. It displays the f iles you s elected. 6 Click OK. A Progres s box appears and th e classes are added to you r model. The classes are vi sible in the diag ram and in the Brow ser.
Reverse engineer ing PowerBuilder 172 2 Select the SRU radio bu tton. 3 Click the A dd button. A st andard Open dial og box appears . 4 Select the SRU f iles that y o u w ant to reverse and click Open . Multi-selection You can select several files sim ultaneously by usin g the CTRL or SHIFT keys.
Chapter 4 Revers e Engineering 173 You return to the Reverse PowerBuilder dialog box. It displays the f iles you s elected. 5 Click OK. A Progres s box appears and th e classes are added to you r model. The classes are vi sible in the diag ram and in the Brow ser.
Reverse engineer ing XML 174 Rev erse engineering XML You can rev erse engin eer one of the follow ing types of XML f ile to an OOM: ♦ XML - DTD Provides an overall st ructure for an XML file in DTD for mat. ♦ XML - Schem a Pr ovides an overall structu re for an XML file in Schema form at.
Chapter 4 Revers e Engineering 175 v To define XM L reverse engineering options: 1 Selec t Language ➤ Reverse Enginee r XML. The Revers e XML dial og box open s. 2 Click the Options tab. The Options page appears . 3 Select XML rev erse options. 4 Click Apply .
Reverse engineer ing XML 176 v To reverse engineer an XML file: 1 Sel e ct Langua ge ➤ Rever se Engine er XM L. The Revers e XML dialog box opens to the S election pag e. 2 Click the A dd button. A st andard Open dial og box appears . 3 Select the files that y ou w ant to reverse an d click Open.
Chapter 4 Revers e Engineering 177 Rev erse engineering into a new OOM You c a n rever se engine er o bje ct langua ge files ( Java , Po werBuil d er, XML) into a new OOM. v To reverse engineer object language files into a new OOM : 1 Select File ➤ Reverse Enginee r ing ➤ Obj ect La nguage.
Reverse engineer ing into a new OOM 178 This product includes XM L4C 3.0.1 softw are developed by the Apache Software Foundation (http: // www. ap a c h e. or g/ ) Copy right (c) 1999 The Apach e Softw are Foundation . All ri ghts reserved. THE XML4C 3.
179 CHAPTER 5 Generating Objects from an OOM This chapte r describes h ow t o generate objects from an OOM. Topic Page Ge nerating objects 180 Ge nerating Java source file s 182 Ge nerating objects fo.
Generating objects 180 Generating objects You can g enerate the f ollowin g types of objects f rom an OOM: Object ty pe What is generated Java source files .
Chapter 5 Generating O bjects from an OO M 181 You ha ve the fol l o wing selecti o n op t i ons: Parent object Include Sub- Packages Display s Model Sel ected All obje cts in model inc luding all obj.
Generating Jav a source files 182 Generating Jav a source files You gen erate Java source files f rom the classes and interfaces of a m odel. A separate file, w ith the file exten sion .java, is gen erated for each class or interface th at you s elect from the m odel.
Chapter 5 Generating O bjects from an OO M 183 You can sort th e order that attributes and operations are arran ged in th e code of the class es of the m odel.
Generating Jav a source files 184 Generating Java class definition files PowerDesigner g enerates a Java class definition file f or each of the classes you s elect to generate in the Java Generation dialog box. You can select any of the class es from the model, includin g those th at are contained w ithin packages or sub-packages.
Chapter 5 Generating O bjects from an OO M 185 4 Select the classes that y o u want to generate from the list. Select Tools All the clas ses and interf aces of the model, in cluding thos e that are grouped in to packages, are s elected and display ed by default.
Generating Jav a source files 186 The Options page appears . 7 Select the Select Java gen eration options. Navigating between pages Use CTRL + P AGEDO WN or CTRL + PAGE UP to move to th e next or to the previous tab and display the correspondin g page.
Chapter 5 Generating O bjects from an OO M 187 A BeanInf o class can only be created f rom a class if its ty pe is Java Bean. You can def ine th e ty pe of a class from its property sheet: v To create Java BeanInfo classes: 1 Selec t Language ➤ Create BeanInf o Classes.
Generating Jav a source files 188 3 Click OK. A BeanInf o class is created in the m odel for each of the classes y ou selected..
Chapter 5 Generating O bjects from an OO M 189 Generating objects for Pow erBuilder You can generate Pow erB uilder NVO (non-v isual ob j ects) from th e classes of an OOM to either of the f ollowing .
Generating objects for PowerBuilder 190 When ge ne rati ng o bj ects fo r a Po werBuild er a p plic ation, you must make a selection in both the PB library and PB app lication fields. If Pow erBuilder is not inst a lled o n your machine, you cannot ge nerat e obj ect s fo r a PowerBuilder applicatio n.
Chapter 5 Generating O bjects from an OO M 191 4 Click A p p ly. 5 Click Cancel. Generating objects for a PowerBuilder application When you gene rate P owerB uilder obj ects, you must specify bo t h the PowerBuilder library and the application that will u se the objects, otherwise you w ill not be able to use them in Pow erBuilder.
Generating objects for PowerBuilder 192 Select Tools All the classes of th e model, including th ose that are grouped into packages, are s elected and display ed by default. You can use th e Select tool s to the ri ght of the F older Selection dropdown lis tbox to modif y the selection.
Chapter 5 Generating O bjects from an OO M 193 Generating PowerBuilder objects in sru files When you g e nerate P owerBuilder objects in sru files, a separate file is created for each of th e classes that y ou select in the OOM. You d o not ha ve to ha ve Po werBuild er inst a lled o n your machine t o gener ate sru files.
Generating objects for PowerBuilder 194 The Options page appears . 5 Select the SRU option. 6 Select a directory in w hich you w ant to generate the .sru files. 7 Click OK. A PowerBuilder User Object is generated with the f ile extension .sru for each of the clas ses that you selected.
Chapter 5 Generating O bjects from an OO M 195 Generating for XML You can gen erate an XML DTD file from an OOM. A DTD file provides an overall structure for an XML file. T he DT D file can be used as a s tandard for validatin g data in XML files or f o r exchanging data in XML form at.
Generating for XML 196 The Options page appears . 3 Sele ct XM L genera tion o ptio ns. 4 Click Apply . 5 Click Cancel. Generating XML objects When y o u generate XML from an OOM, PowerDesign er creates an XML f ile containing th e d efinition of each of the classes y ou select to generate in the XML Generation dialog box.
Chapter 5 Generating O bjects from an OO M 197 v To generate XM L files: 1 Selec t Language ➤ Generate XML. The XML Gen eration dialog box opens. 2 Type a destination directory for generated XML file in th e Directory box. or Click the Browse to Folder button to the right of the Directory box and brow se to select a directory path.
Generating for XML 198 6 Click OK. An XML file is generated w ith the file extension .x ml..
Chapter 5 Generating O bjects from an OO M 199 Customizing scripts You can cus tomize scripts as f ollows : ♦ Insert s cripts at the beg inni ng an d end of a s cript ♦ Insert scripts before and a.
Customizing scripts 200.
201 CHAPTER 6 Generating a Conceptual Data Model from an Object-Oriented Model This chapter describ e s how to generate a Conceptual Data Model (CDM) from an Object-Oriented Model (OOM).
Generating OO M objects to a CDM 202 Generating OOM objects to a CDM When y o u generate a Conceptual Data Model (C DM) from an Object- Oriented Model (OOM), Pow erDesigner tran slates OOM objects and data ty pes to CDM objects an d data types. The curre nt ob j ect l anguage o f an OOM ha s no effec t on the ge nerat ion to a CDM.
Chapter 6 Generating a Conc eptual Data Model from an Object-Oriented Model 203 Translating OOM data types for a CDM Pow erDesig ner su pports both Java and con ceptual data ty pes. When y o u generate objects f rom an OOM to a CDM, Java data ty pes are translated by PowerDesig ner into conceptu al data types.
Generating a CDM from an OOM 204 Generating a CDM from an OOM You can ge nerate a CDM from a global OOM or from a package w ithin the model. Limiting CDM ge nerat i on to a single p a ckage i s use ful when differ e nt design ers ow n packag es of the s ame OOM.
Chapter 6 Generating a Conc eptual Data Model from an Object-Oriented Model 205 You mu st indicate the follow ing parameters w hen you u p date an existing CDM: Parameter Description Select Mode l Target Conce ptual Data Model.
Generating a CDM from an OOM 206 Check model before generation If y o u select the Check Model option , the procedure to gen erate a CDM starts by checking the v alidity of the OOM or package. A CDM results w hen no errors are f ound. You can set check options by selectin g Tools ➤ Check Model.
Chapter 6 Generating a Conc eptual Data Model from an Object-Oriented Model 207 Generating a new CDM When y o u generate from an OOM to a new C DM, PowerDesig ner creates a new CDM containing all th e objects that you s elected to generate in th e OOM.
Generating a CDM from an OOM 208 The Detail page appears. 5 Select or clear CDM gen eration options. 6 Click the Selection tab. The Selection page appears.
Chapter 6 Generating a Conc eptual Data Model from an Object-Oriented Model 209 Generating a CDM from a package To generate a CDM from a package, select the packag e name from the Sel ect Location dropdown lis tbox at the top of the page.
Generating a CDM from an OOM 210 Updating an existing CDM There are two w ays to u pdate an existin g CDM dependin g on w hether the Preserve Modification s options is s elected or not selected: Prese.
Chapter 6 Generating a Conc eptual Data Model from an Object-Oriented Model 211 3 Select a targ et model from the Select Model dropdown listbox. This is the existing m odel that you wan t to update. Preserve modifications If you w ant to preserve the existing objects in the CDM, then the Preserve m odifications checkbox m ust be selected.
Generating a CDM from an OOM 212 The Detail page appears. 5 Select or clear CDM gen eration options. 6 Click the Selection tab. The Selection page appears. 7 Select th e name of an OOM from th e Select Locat ion dropdow n list. The default CDM is generated from this OOM.
Chapter 6 Generating a Conc eptual Data Model from an Object-Oriented Model 213 Generating a CDM from a package To generate a CDM from a package, select the packag e name from the Sel ect Location dropdown lis tbox at the top of the page.
Generating a CDM from an OOM 214.
215 CHAPTER 7 Generating a Phy sical Data Model from an Object-Oriented Model This chapter describ es how to generate a Physical Data Model (PDM) from an Object-Oriented Model (OOM).
Generating OO M objects to a PDM 216 Generating OOM objects to a PDM When y o u generate a Phys ical Data Model (PDM) from an Object-Oriented Model (OOM), PowerDesig ner transl ates OOM objects and data ty pes to PDM objects and data types supported by t he current DBMS.
Chapter 7 Generating a Phy sical Data Model from an Object-O riented Model 217 Translating OOM data types for a PDM Pow erDesig ner su pports both Java and ph ysical data types . Data types that you select in the OOM are n ot alw ays support ed by t he current DBMS.
Generating a PDM from an OOM 218 Generating a PDM from an OOM You can ge nerate a PDM from a global OOM or from a package w ithin the model. Limiting PD M gener atio n to a singl e pac kage is use ful when differ e nt design ers ow n packag es of the s ame OOM.
Chapter 7 Generating a Phy sical Data Model from an Object-O riented Model 219 You mu st indicate the follow ing parameters w hen you u p date an existing PDM: Parameter Description Select Mode l T arget Physica l Data Model.
Generating a PDM from an OOM 220 Defining PDM generation options You c a n set the fo llowing gener al gene r atio n opti ons: Option Description Check model Check s the m odel before g enerating the .
Chapter 7 Generating a Phy sical Data Model from an Object-O riented Model 221 You ha ve the fol l o wing selecti o n op t i ons: Parent object Include Sub- packages Display s Model Selected All objec.
Generating a PDM from an OOM 222 The PDM Generat ion Option s dialog box appears. 2 Click the Generate n ew Phy sical Data Mod el r adio button. 3 Select the DBMS y ou w ant to be associated to y our model from the DBMS dropdow n listbox . 4 Type a new name and code, otherwise, the PDM w ill have the same nam e and code as the OOM.
Chapter 7 Generating a Phy sical Data Model from an Object-O riented Model 223 6 Select or clear PDM generation options. 7 Click the Selection tab. The Selection page appears.
Generating a PDM from an OOM 224 The Output w indow show s the progress of the generati o n process. The new P DM appears in the diagram window . Updating an existing PDM There are two w ays to u pdat.
Chapter 7 Generating a Phy sical Data Model from an Object-O riented Model 225 The P DM G e nerat i on Opt ions di a log bo x app ears. If you do no t have a PDM in the current Workspace, th e Update existing Phy sical Data Model optio n is not available.
Generating a PDM from an OOM 226 The Detail page appears. 5 Select or clear PDM generation options. 6 Click the Selection tab. The Selection page appears. 7 Select th e name of an OOM from th e Select Locat ion dropdow n list. The default PDM is generated from this OOM.
Chapter 7 Generating a Phy sical Data Model from an Object-O riented Model 227 Generating a CDM from a package To generate a CDM from a package, select the packag e name from the Sel ect Location dropdown lis tbox at the top of the page.
Generating a PDM from an OOM 228.
229 CHAPTER 8 Using Object Languages Thi s c hapte r expl a ins how to use a n obj ect la nguage in an O OM. Topic Page Object la nguages 230 Using the object languag e editor 239 Object lan guage edi.
Object languages 230 Object languages An obj ect l a nguage co ntains sp ecific a tions fo r a p a rtic ul ar la ngua ge. It provides Pow erDesigner w ith the sy ntax and guidelin es for implem enting stere o types, d a ta types, sc ripts a nd const a nts for a n o bj e ct language .
Chapter 8 Using Objec t Languages 231 A ccessing object language properties There are two different ways of accessing and m odifying an object language properties: Object language Menu item Descriptio.
Object languages 232 The O bj e ct Language s Pro per ties di alog b ox ap p ears. In the l e ft pane i s a list of categories and sub- categories in wh ich are contained the valu es that y ou can m odify. 3 Expand a category node (and its sub- category if it h as one), and s elect a value.
Chapter 8 Using Objec t Languages 233 The next tim e you open an OOM, th e modifications that you made in the obj ect language editor w ill remain the same for the ne wly o pened mod el. Modifying linked object language properties You c a n change a ny of the par a meters o f e xisting linke d ob jec t language s.
Object languages 234 The O bj e ct Language s Pro per ties di alog b ox ap p ears. In the l e ft pane i s a list of categories and sub- categories in wh ich are contained the valu es that y ou can m odify. 4 Expand a category node (and its sub- category if it h as one), and s elect a value.
Chapter 8 Using Objec t Languages 235 Changing the object language of an OOM You c a n change t he ob j ect language fo r an O O M, d efining the ne w obje ct language as bei ng loca l to the model o r as b eing linke d to the model. v To change the object language of an OOM: 1 Open an OOM.
Object languages 236 The O bj e ct Language s window appe a rs. 3 Click the New tool. The New Obj ect Langua ge window app ears. 4 T ype a name fo r the new ob jec t language in the Na me box. 5 Sele ct an e xisting o b je ct langua ge fro m the Co py fro m dr opdow n listbox if you want the new obj ect l anguage to be b ased o n an exist ing one.
Chapter 8 Using Objec t Languages 237 The O bje ct Language s Pro per t ies dia log bo x app e ars. 7 Expand t he category nodes as appropriat e and m odify com ments or values as required. 8 Click OK. A st andard Win dow s Save As box appears. 9 Type the filenam e and click Save.
Object languages 238 10 Cli ck Close. $ For info rmation o n how to asso c iate an o bj ect langua ge to a n O O M, see the sec t ion Changing t he ob j ect l anguage o f an OOM.
Chapter 8 Using Objec t Languages 239 Using the object language editor You use t he ob j ect l anguage e d itor to co nsult or modify par ameters t ha t appear in categories or s ub-categ ories of an Object- Oriented Model. The o bj ect la ngua ge edi tor i s mad e up o f a numbe r of ca tegor ies, sub - categories, that con tain param eters.
Using the object language editor 240 Modifying v alues in the object language editor You ha ve to use t he ob j ect language e dito r fro m an Obj ect-O r iente d Mod el. The modific a tions tha t you make to va lues in the obj ect l anguage e d itor will apply to the current m o d e l, as well as to all new Object-Oriented Models.
Chapter 8 Using Objec t Languages 241 Object language editor categories The values you defin e as parameters fall into three categories: Category Description Gene ral Object la nguag e identific ation.
Object language editor c ategories 242 The followi ng objects hav e existing default stereoty pes that you can modify : ♦ Class ♦ Operation ♦ Generalization ♦ Dependency ♦ Realization ♦ Pa.
Chapter 8 Using Objec t Languages 243 Operation stereoty pes An operation has the followin g default stereotype: Stereoty pe Description constructor Opera tion that cre ates a nd initializes a n insta.
Object language editor c ategories 244 Dependency st er eot y pes A dependen cy has the followin g default s tereotypes : Stereoty pe Description access P ubl i c conten ts of the target package that .
Chapter 8 Using Objec t Languages 245 Package stereotypes A packag e has the f o llow ing default stereoty pes: Stereoty pe Description Facade P ackage that i s a vi ew of another p ackage Framework P.
Object language editor c ategories 246 Default const ant s The follo wing constant va lues ar e de fined b y default : Constant Default value Null 0 Tru e TRUE False FA LSE Void void Bool boolean Object scripts Dep ending o n the o b je ct langua ge family (J ava, X ML, … ) some pieces of generated code can be parameterized in this section.
Chapter 8 Using Objec t Languages 247 The followi ng table lists all th e obj ects that can be cu stom ized, with an exam ple for each object specification.
Object language editor c ategories 248 XML M apping The reverse eng ineering of XML Data docu men ts needs a m apping table to identify which elem ent or attribute becom es a class, attribute or as sociation in the revers ed OOM.
Chapter 8 Using Objec t Languages 249 Namings You can m odify the f ollowing defau lt names f o r Getter and Setter oper atio ns: Name Default value * set% Code% Name Default value boolean is% Code% * get %Code% Event You can u se this su b-category to def ine even ts on operations .
Object language editor c ategories 250.
251 CHAPTER 9 Using Business Rules This chapter de scr ibes how business rules help y o u m odel information. Topic Page What is a busine ss rule? 252 Def ining business rule s in an OOM 253 Apply ing.
What is a business r ule? 252 What is a business rule? A business rule is a w ritten statement specify ing w hat the information sy stem mu st do or how it m ust be struct ured to su pport business needs. A business rule is a r ule tha t your business follo ws.
Chapter 9 Using Busines s Rules 253 Defining business rules in an OOM You can def ine a busi ness ru le w hich can be attach ed to the followin g objects in an OOM: Domains Classes Interfaces Attribut.
Defining business r ules in an OOM 254 Business rule properties A business rule definition includes the f o llowing prope r ties: Property Description Maximum length Name Name for the rule 254 Code Re.
Chapter 9 Using Busines s Rules 255 v To create a business rule: 1 Select Model ➤ Business Rules. The List o f Rules appe a rs. It d isplays the business r ule s d efined fo r the model . 2 Click a blank line in the list. or Click the Add a Row tool.
Applying business rules to objects 256 A pplying business rules to objects From the list of business rules, y ou can app ly a business rule to existing objects.
Chapter 9 Using Busines s Rules 257 The Selection w indow appears. It contains a list of all the busin ess rules that exist in th e model, w ith the exception of those th at already belong to the object. 4 Select the bus iness ru les that you w ant to add to the object.
Applying business rules to objects 258.
259 Glossary A class th at cannot have an y direct instances An f o rm of association th at specifies a part-w hole relationship betw een a compon ent class an d an aggreg ate class A stru ctural rela.
Glossary 260 A class diag ram is a view of a model th at show s a set of packages , classes, interfaces, an d their relationships that tog ether represent th e logical static design view of a system .
Glossary 261 A specification of the rang e of allowable cardinalities that a set m ay assum e Class s tructure that is the logical desig n view of a software sy stem. A n OOM is essentially a static conceptual m odel o f a softw are system Contai ns the spe c ificat i o ns for a par t icular language.
Glossary 262 An ex tension of the vocabu lary of the UML, wh ich allow s you to create new kinds of building blocks t hat are deriv ed from existing ones but that are specific to y our problem An obje.
Index 263 A abstract class 18 operation 67 abstract class 2 59 access depende ncy 109 actor class 20 add attribute 59 construc tor 73 operation 84 add objec t class 29 interface 41 add opera tion attr.
264 attribute ( continue d ) detail 58 diagra m 53 display 60 doma in 49, 57 dup licate 59 enforce coh eren ce 9 icon 60 identifier 49 initial value 49 interface 42 key words 60 length 49 list 52, 56 .
265 changeability ( continued ) attribute 49 check assoc iation 136 attribute 136 automa tic correction 137 BeanInf o 136 class 136 correc t 141, 142 error list 142 gene raliza tion 136 interface 136 .
266 class ( continued ) operation 67 package 14 parameter 88 previe w from class 33 preview from interface 45 realiz ation 114 co mmen t assoc iation 98 attribute 49 class 18 depende ncy 108 doma in 1.
267 data ty pe ( continued ) script 248 selec t 123 seria l 126, 217 short 203 time 127 transla te 203, 217 txt 203 undef ined 123 dataty pes options 9 date data ty pe 127 decimal data ty pe 126, 217 .
268 display ( continued ) realiz ation 118 diverg e from domain 9 docum entation Rose im port 146 doma in 260 access list 12 1 attribute 49, 57 check 12 0 check parame ter 130, 132 code 120 com me nt .
269 gene ralization ( continued ) display 95 imple me ntation 92 list 95 modif y 94, 95 nam e 91 parent 91 property 91, 94 Rose im port 146, 148 stere otype 91, 92, 243 sy mbol 95 tool 5 virtua l 91 v.
270 initial value attribute 49 inner cla ss 23, 260 attach 2 4 detach 26 interface 41 reverse engi neerin g Java 1 51 InOut param eter direction 88 instantiate depende ncy 109 integer data ty pe 126, .
271 linked object la nguag e 231 list association 104 attribute 52, 56 class 22, 28 depende ncy 112 gene ralization 95 identifier 66 interface 38, 40 operation 69, 72 realiz ation 118 load JDK 153 Pow.
272 new mode l 6 object la nguag e 235 OOM 6 new CDM gene rate 207 new PDM gene rate 221 notation Entity/Re lationship 205 me rise 205 numbe r data ty pe 126, 217 O object business rule 256 gene rate .
273 open ( continue d ) OOM 8 PowerBuilder 168 Rose m odel 145 operation 261 abstract 6 7 add 84 attribute 79 Brow ser 68 check 13 6 class 31, 77 code 67 com ment 67 construc tor 68, 73 create 68, 84 .
274 pare nt depende ncy 108 gene ralization 91 operation 67 parameter 88 parent c lass operation 78 PDM data ty pe 217 gene rate 216, 218 gene rate f rom assoc iation 216 gene rate f rom clas s 216 ge.
275 R realiz ation 261 check 13 6 class 114 code 114 com me nt 114 create 115 def ine 114 display 118 interface 114 link 114 list 118 modif y 116, 118 nam e 114 property 114, 116 stere otype 114 sy mbol 118 tool 5 recheck check option 141 refine depende ncy 109 return ty pe 261 operation 67 reverse engineeri ng .
276 severity error 137 show attrib u te preference 6 0 operation 85 signal class 20 signa ture 261 sorted assoc iation 101 source f ile reverse engi neerin g Java 1 56 sru generate 193 PowerBuilder 19.
277 V validate OOM 136 validation rule 130 apply 132 attribute 132 business rule 132 check parameter 132 def ine 132 doma in 132 gene rate 132 value object la nguag e 239 variabl e attribute 132 doma .
278.
Ein wichtiger Punkt beim Kauf des Geräts Sybase 7.5 (oder sogar vor seinem Kauf) ist das durchlesen seiner Bedienungsanleitung. Dies sollten wir wegen ein paar einfacher Gründe machen:
Wenn Sie Sybase 7.5 noch nicht gekauft haben, ist jetzt ein guter Moment, um sich mit den grundliegenden Daten des Produkts bekannt zu machen. Schauen Sie zuerst die ersten Seiten der Anleitung durch, die Sie oben finden. Dort finden Sie die wichtigsten technischen Daten für Sybase 7.5 - auf diese Weise prüfen Sie, ob das Gerät Ihren Wünschen entspricht. Wenn Sie tiefer in die Benutzeranleitung von Sybase 7.5 reinschauen, lernen Sie alle zugänglichen Produktfunktionen kennen, sowie erhalten Informationen über die Nutzung. Die Informationen, die Sie über Sybase 7.5 erhalten, werden Ihnen bestimmt bei der Kaufentscheidung helfen.
Wenn Sie aber schon Sybase 7.5 besitzen, und noch keine Gelegenheit dazu hatten, die Bedienungsanleitung zu lesen, sollten Sie es aufgrund der oben beschriebenen Gründe machen. Sie erfahren dann, ob Sie die zugänglichen Funktionen richtig genutzt haben, aber auch, ob Sie keine Fehler begangen haben, die den Nutzungszeitraum von Sybase 7.5 verkürzen könnten.
Jedoch ist die eine der wichtigsten Rollen, die eine Bedienungsanleitung für den Nutzer spielt, die Hilfe bei der Lösung von Problemen mit Sybase 7.5. Sie finden dort fast immer Troubleshooting, also die am häufigsten auftauchenden Störungen und Mängel bei Sybase 7.5 gemeinsam mit Hinweisen bezüglich der Arten ihrer Lösung. Sogar wenn es Ihnen nicht gelingen sollte das Problem alleine zu bewältigen, die Anleitung zeigt Ihnen die weitere Vorgehensweise – den Kontakt zur Kundenberatung oder dem naheliegenden Service.