Sybase Powerdesigner 7.5 Скачать руководство пользователя страница 60

Defining attributes

50

An attribute definition also includes business rules, which are defined on
associated property sheets.

Analyzing attribute properties

The following attribute properties each have several default values from
which you can select from:

Data Type

Visibility

Multiplicity

Data Type

You can select one of the following instances as a data type for an attribute:

Boolean
Byte
Char
Double
Float
Int
Long
Short

Visibility

Property

Visible

Private

Only to the attribute itself

Protected

Only to the attribute and its inherited objects

Package

To all objects contained within the same package

Public

To all objects

Содержание Powerdesigner 7.5

Страница 1: ...OBJECT ORIENTED MODEL User s Guide POWERDESIGNER 7 5...

Страница 2: ...O DEVICE OASiS OASiS logo ObjectConnect ObjectCycle OmniConnect OmniSQL Access Module OmniSQL Toolkit Open Client Open ClientConnect Open Client Server Open Client Server Interfaces Open Gateway Open...

Страница 3: ...properties 14 Displaying text in package symbols 15 Defining classes 17 Class properties 18 Analyzing class properties 19 Creating a class 21 Inner classes 23 Classifiers 27 Modifying class properties...

Страница 4: ...3 Adding operations to a class 77 Adding Getter and Setter operations to a class 79 Creating an implementation operation 81 Modifying the code of an implementation operation 83 Copying an operation to...

Страница 5: ...rule in check parameters 132 3 Managing Object Oriented Models 135 Checking an OOM 136 Object parameters verified by Check model 136 OOM check options 137 Indicating error severity 137 Object selecti...

Страница 6: ...werBuilder 189 Defining PowerBuilder generation options 189 Generating objects for a PowerBuilder application 191 Generating PowerBuilder objects in sru files 193 Generating for XML 195 Defining XML g...

Страница 7: ...object language properties 233 Changing the object language of an OOM 235 Creating a new object language 235 Using the object language editor 239 Modifying values in the object language editor 240 Obj...

Страница 8: ...viii...

Страница 9: ...ing or building an OOM with PowerDesigner Object Oriented Model will find this book useful It requires an understanding of object modeling as well as familiarity with UML theory Some experience with d...

Страница 10: ...hese parts of the book Learn about the environment Object Oriented Model Basics Build an object oriented model Building a Object Oriented Model Verifying the model and importing a Rose model Managing...

Страница 11: ...ntroduction to the basic notions of object oriented modeling and the Unified Modeling Language UML Topic Page Functional overview 2 UML and object oriented modeling 3 What is an OOM 4 Objects in an OO...

Страница 12: ...an Object Oriented Model OOM Generate Java class source files java Generate PowerBuilder objects Reverse engineer Java files class java or jar Reverse engineer PowerBuilder objects Import a Conceptua...

Страница 13: ...sentation of a system You use UML symbols and notations to create your models and diagrams in an OOM UML has a well defined syntax and semantics that is clear and easy to use in object modeling All of...

Страница 14: ...m an OOM in a Physical Data Model PDM for relational database design analysis When modeling objects graphically you use diagrams such as the class diagram You can use an OOM to Represent the physical...

Страница 15: ...nally visible behavior of a class object or other entity Attribute Named property of a class Operation Service that can be requested from a class Association Structural relationship between objects of...

Страница 16: ...1 Select File New or Click the New button in the toolbar The New window appears 2 Select Object Oriented Model and click OK The Choose Object Language window appears Every OOM is attached by default t...

Страница 17: ...r opens an new OOM If there was no workspace open PowerDesigner opens a new workspace and a new OOM 5 Select Model Model Properties or Right click any empty space in the diagram and select Model Prope...

Страница 18: ...An OOM has the file extension OOM v To open an existing OOM 1 Select File Open or Click the Open tool A standard Windows file selection dialog box appears 2 Select a file with the OOM extension 3 Clic...

Страница 19: ...parameters The default data type is the data type that applies to attributes operations and parameters if no data type is selected You can set the following options for default data type in an OOM Opt...

Страница 20: ...or certain attribute properties must be detached from the domain If you modify domain non divergence options these changes apply only to the current OOM For more information on PowerDesigner model opt...

Страница 21: ...for the model This code is generated in database scripts 254 Comment Descriptive label for the model Object language Current object language for the model You can open the property sheet for the curre...

Страница 22: ...Defining OOM properties 12...

Страница 23: ...reate and modify objects Topic Page Defining packages 14 Defining classes 17 Defining interfaces 36 Defining attributes 48 Defining identifiers 62 Defining operations 67 Defining parameters 88 Definin...

Страница 24: ...n depth At each level of decomposition you can create several diagrams Packages work as models they can contain the following items Model objects Other packages Diagrams in order to have different vie...

Страница 25: ...selected displays the constraints types of business rule that are attached to the package You modify the display preferences for a package in the Display Preferences dialog box v To modify the package...

Страница 26: ...Defining packages 16 The package display preferences page appears 4 Modify the package display preferences 5 Click OK...

Страница 27: ...ics A class usually implements one or more interfaces Classes are the main building blocks of an OOM Classes and the relationships that you create between them form the basic structure of an OOM Typic...

Страница 28: ...ss An object can be persistent or transient If it is persistent it continues to exist after the process that created it has ceased to exist If it is transient then it ceases to exist when the process...

Страница 29: ...ucture In this way stereotypes must be based on existing classes but they allow you to provide additional distinctions for these classes Stereotypes can be predefined or user defined They allow you to...

Страница 30: ...f a class as implemented in traditional programming languages process Heavyweight flow that can execute concurrently with other processes signal Specification of an asynchronous stimulus communicated...

Страница 31: ...cted Only to the class and its inherited objects Package To all objects contained within the same package Public To all objects in the model Cardinality The cardinality of a class specifies the number...

Страница 32: ...ist of classes appears Accessing the list of classes The list of classes is accessible only from a diagram If the current diagram is of a package the list contains all the classes that exist in the pa...

Страница 33: ...ick the Pointer tool in the palette toolbar 4 Double click the new class symbol in the diagram The class property sheet appears 5 Type a class name and a class code 6 Click OK The newly created class...

Страница 34: ...ral page Opening property sheets at last accessed page Property sheets open to the General page by default However you can choose to open property sheets at the last page accessed by selecting Tools O...

Страница 35: ...e classes appear in the list of inner classes for the current class and the definition of the classes are added to the current class definition 6 Click the Code Preview tab to visualize the inner clas...

Страница 36: ...page Property sheets open to the General page by default However you can choose to open property sheets at the last page accessed by selecting Tools Options Dialog and selecting the option Keep Last...

Страница 37: ...re classifiers Modifying class properties There are two approaches to modifying class properties Modify the property sheet of the class Modify an entry in the list of classes Modifying class propertie...

Страница 38: ...uired 3 Click OK Modifying class properties from the list of classes The list of classes includes all classes attached to the current model or package You can modify the class properties from the list...

Страница 39: ...defines the characteristics of a class Operation Implementation of a service that can be requested from any object of the class in order to affect behavior Business rule Written statement specifying w...

Страница 40: ...he characteristics of the object You can add attributes that already exist in the model and which belong to other objects v To add an attribute to a class 1 Double click a class in the model The class...

Страница 41: ...tributes in the list to the class 5 Click OK The attributes are added to the class and appear at the end of the list 6 Click OK Adding an operation to a class An operation is the implementation of a s...

Страница 42: ...ick the Add Operations tool The Selection window appears It contains a list of all the operations that exist in the model with the exception of those that already belong to the class 4 Select the oper...

Страница 43: ...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 class or an interface You cannot edit the code in this window v To pr...

Страница 44: ...at you specify in the Limit box Show stereotypes When selected displays the stereotype of the class Show constraints When selected displays the constraints types of business rule that are attached to...

Страница 45: ...Chapter 2 Building an Object Oriented Model 35 The class display preferences page appears 4 Modify the class display preferences 5 Click OK...

Страница 46: ...limited part of the behavior of a class A class can implement one or more interfaces The following example shows a Name interface that realizes the action GetName for an Employee class Interface prop...

Страница 47: ...visible to another object may influence the structure or behavior of the object or similarly its own properties may be affected by the other object Property Visible Private Only to the interface itse...

Страница 48: ...the list contains all the interfaces that exist in the package If the current diagram is of the model the list contains all the interfaces that exist in the model 2 Click a blank line in the list or C...

Страница 49: ...ace code 6 Click OK The newly created interface is visible in the Browser Modifying interface properties There are two approaches to modifying interface properties Modify an interface property sheet M...

Страница 50: ...Dialog and selecting the option Keep Last Tab in the Property Sheets groupbox 2 Type or select interface properties or Click on a page tab Type or select interface properties as required 3 Click OK M...

Страница 51: ...class definition that is defined within another outer class definition Inner classes are commonly used in Java They help you to improve the overall visibility of your model by allowing you to group t...

Страница 52: ...from the list in the page corresponding to the object in the interface property sheet When you add an object to an interface in this way you in fact create a copy of the object The new object exists a...

Страница 53: ...on window appears It contains a list of all the attributes that exist in the model with the exception of those that already belong to the interface 4 Select the attributes that you want to add to the...

Страница 54: ...any object of the class in order to affect behavior You can add operations that already exist in the model and which belong to other objects v To add an operation to an interface 1 Double click an in...

Страница 55: ...terface 5 Click OK The operations are added to the interface and appear in the list of operations for the interface 6 Click OK Preview the code of an interface You can preview the code of an interface...

Страница 56: ...mber displayed to a maximum that you specify in the Limit box Show operations Displays all the operations of the interface or limits the number displayed to a maximum that you specify in the Limit box...

Страница 57: ...Select Tools Display Preferences or Right click the diagram background and select Display Preferences from the contextual menu The Display Preferences dialog box appears 2 Expand the Object View node...

Страница 58: ...values that instances of the property may hold Each object in a class has the same attributes but the values of the attributes may be different Attribute names within a class must be unique You can g...

Страница 59: ...denotes how it may be seen outside its enclosing name space Multiplicity Specification of the range of allowable cardinalities that a set may assume Initial value Initial value of the attribute Change...

Страница 60: ...ult values from which you can select from Data Type Visibility Multiplicity Data Type You can select one of the following instances as a data type for an attribute Boolean Byte Char Double Float Int L...

Страница 61: ...alities from the registry HKEY_CURRENT_USER Software Sybase PowerDesigner 7 ModelOptions Cld MultiplicityNotation 1 0 1 or 2 0 1 Creating an attribute There are three ways to create an attribute Creat...

Страница 62: ...in the list 1 Select Model Attributes The list of attributes appears Accessing the list of attributes The list of attributes is accessible only from a diagram If the current diagram is of a package t...

Страница 63: ...Visibility dropdown listbox 10 Click the Multiplicity column 11 Select a cardinality value from the Multiplicity dropdown listbox or Type a cardinality value in the Multiplicity column 12 Type the na...

Страница 64: ...ars at the beginning of the line 4 Type an attribute name and an attribute code 5 Click OK The attribute is created for the class and appears in the list of attributes for the class 6 Click OK Modifyi...

Страница 65: ...rty sheet 1 Double click the attribute in the model The attribute property sheet appears Opening property sheets at last accessed page Property sheets open to the General page by default However you c...

Страница 66: ...ect attribute properties as required 5 Click OK Modifying attribute properties from the list of attributes The list of attributes includes all attributes attached to the current model You can modify t...

Страница 67: ...ute to a domain the domain supplies the data type and related data characteristics It may also indicate check parameters and business rules v To attach an attribute to a domain 1 Double click a class...

Страница 68: ...ty sheets at the last page accessed by selecting Tools Options Dialog and selecting the option Keep Last Tab in the Property Sheets groupbox 5 Click the Detail tab 6 Select a domain from the Domain dr...

Страница 69: ...renamed PERIPHLD2 when it is copied to a class which already contains an attribute PERIPHLD v To copy an attribute to another class 1 Double click a class in the model The class property sheet appears...

Страница 70: ...erface can be displayed in one of the following ways Visibility When selected Icon Displays the attribute as an icon Markers Displays the visibility of the attribute as a marker private protected publ...

Страница 71: ...Chapter 2 Building an Object Oriented Model 61 3 Select Attribute 4 Modify the attribute display preferences 5 Click OK...

Страница 72: ...identifier Identifier properties An identifier has the following properties Property Description Maximum length Name Name of the identifier 254 Code Reference name for the identifier 254 Comment Descr...

Страница 73: ...ate an identifier 1 Double click a class in the model The class property sheet opens to the General page 2 Click the Identifier tab The Identifier page appears 3 Click a blank line in the list or Clic...

Страница 74: ...an identifier v To add attributes to an identifier 1 From the identifier property sheet click the Attributes tab The Attributes page appears It lists the attributes currently defined for the identifie...

Страница 75: ...two approaches to modifying identifier properties Modify the property sheet of an identifier Modify an entry in the list of identifiers Modifying identifier properties from its property sheet The ide...

Страница 76: ...r properties as required 3 Click OK Modifying identifier properties from the list of identifiers The list of identifiers includes all identifiers attached to the current model You can modify the ident...

Страница 77: ...e comment for the operation Stereotype Subclassification of an operation derived from an existing one Extends the semantics of an operation without changing it s structure Return Type A list of values...

Страница 78: ...kage Public To all objects Stereotype Stereotype Description constructor Operation that creates and initializes an instance of a class Creating an operation There are three ways to create an operation...

Страница 79: ...at exist in the package If the current diagram is of the model the list contains all the operations that exist in the model 2 Click a blank line in the list or Click the Add a Row tool An arrow appear...

Страница 80: ...ck a class in the model The class property sheet appears 2 Click the Operations tab The Operations page appears It lists operations defined for the class 3 Click a blank line in the list or Click the...

Страница 81: ...ation property sheet displays the definition of the operation that you can modify v To modify operation properties from its property sheet 1 Double click a class in the model The class property sheet...

Страница 82: ...Dialog and selecting the option Keep Last Tab in the Property Sheets groupbox 5 Type or select operation properties or Click on a page tab Type or select operation properties as required 6 Click OK M...

Страница 83: ...s an instance of a class A destructor on the other hand is the complement of a constructor in that it is an operation that it deinitializes and destroys the class instance You can only create a defaul...

Страница 84: ...an create only one Default constructor and no Default destructor for a class The constructor has the same name as the class to which it belongs If the current object language of the OOM is PowerBuilde...

Страница 85: ...is created at the end of the list of operations for the class It has the same name as the class to which it belongs If the current object language of the OOM is PowerBuilder a Default constructor and...

Страница 86: ...can add other parameters If the class is an instance of another class the attribute names within the body of the Copy constructor operation are the same as those in the parent class You can define on...

Страница 87: ...eates and initializes an instance of a class within the class When you create a duplicate operation it has the name Duplicate which you can modify You can define only one duplicate operation to any gi...

Страница 88: ...peration to a class in this way you can modify only the code implementation of the operation You cannot modify the signature of the operation v To add an inherited operation to a class 1 Double click...

Страница 89: ...tes of a class For each attribute you can create one Getter one Setter operation or both a Getter and a Setter operation You create Getter or a Setter operations for sending a receiving data values be...

Страница 90: ...s 80 4 Click the Add button 5 Select Get Set Operations from the dropdown listbox The operations are created for the attributes You can visualize them in the list of operations of the class 6 Select t...

Страница 91: ...erations for the class They are grayed indicating that their names can not be modified 7 Click OK Creating an implementation operation When you create a realization link between a class and an interfa...

Страница 92: ...ion link 2 Click the Operations tab 3 Click the To be implemented button The To Be Implemented Operations window appears It contains a list of all the operations of the interface that can be implement...

Страница 93: ...plementation operation You can modify the code of an implementation operation from the Implementation page of the operation property sheet For information on how to create an implementation operation...

Страница 94: ...t to another class If the class already contains an operation with the same name or code as the copied operation the copied operation is renamed For example the operation testPort is renamed testPort2...

Страница 95: ...of operations for the current class 6 Click OK Displaying text in operation symbols An operation has the following display preferences Preference Description Show visibility Displays the operation as...

Страница 96: ...or package Keywords Displays the visibility of the operation as a word private protected public or package You modify the display preferences for an operation in the Display Preferences dialog box v...

Страница 97: ...Chapter 2 Building an Object Oriented Model 87 4 Modify the operation display preferences 5 Click OK...

Страница 98: ...nd relationships and semantics Array Used in generating and reverse engineering for Java and PowerBuilder When selected arranges attributes into table format Parameter Type Direction of information fl...

Страница 99: ...operation property sheet v To create a parameter 1 Double click an operation in the model 2 Click the Parameters tab The Parameters page appears 3 Click the Add a Row tool or Click the first row A pa...

Страница 100: ...neral page by default However you can choose to open property sheets at the last page accessed by selecting Tools Options Dialog and selecting the option Keep Last Tab in the Property Sheets groupbox...

Страница 101: ...shortcut You can create only one generalization between two given objects Generalization properties A generalization has the following properties Property Description Maximum length Name Name of the g...

Страница 102: ...Public To all objects Stereotype Stereotype Description implementation Specifies that the child object inherits the implementation of the parent object but that it does not make public its interfaces...

Страница 103: ...ointer tool in the palette toolbar or Click the right mouse button You release the Generalization tool 4 Double click the new generalization in the model The generalization property sheet opens to the...

Страница 104: ...generalization properties from its property sheet The generalization property sheet displays the definition of the generalization which you can modify v To modify generalization properties from its p...

Страница 105: ...Generalizations The list of generalizations appears 2 Click the generalization that you want to modify An arrow appears at the beginning of the line 3 Modify any of the properties of the generalizatio...

Страница 106: ...es 1 Select Tools Display Preferences or Right click the diagram background and select Display Preferences from the contextual menu The Display Preferences dialog box appears 2 Expand the Object View...

Страница 107: ...of classes You can define an association between two classes or between a class and an interface An association may have a name to clarify the nature of the relationship between the associated classe...

Страница 108: ...can make a role navigable or not or change its visibility 254 Role B One end of an association Each role can have a name and a cardinality You can make a role navigable or not or change its visibilit...

Страница 109: ...d by the association v To create an association in a diagram 1 Click the Association tool in the palette toolbar 2 Drag the association link from one class to another The link appears between the two...

Страница 110: ...accessed by selecting Tools Options Dialog and selecting the option Keep Last Tab in the Property Sheets groupbox 5 Type an association name and an association code 6 Type a name and code for Role A...

Страница 111: ...r of values each role can have Cardinality Number of instances 0 0 None 0 1 None or one 0 None to infinity 1 1 One to one 1 One to infinity Infinity Ordering You can define the ends of an association...

Страница 112: ...orm of association that specifies the relationship between two classes of the same level Composition A form of aggregation of an association in which the class attached to the association role may be...

Страница 113: ...odifying association properties Modify the property sheet of an association Modify an entry in the list of associations Modifying association properties from its property sheet The association propert...

Страница 114: ...associations 1 Select Model Associations The list of associations appears 2 Click the association that you want to modify An arrow appears at the beginning of the line 3 Modify any of the properties...

Страница 115: ...he 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 Aggregation Composition checkbox 5 Select Aggr...

Страница 116: ...ached to it when it is moved When not selected role name can be moved anywhere in the model Multiplicity Displays the cardinality of the relationship You can choose between showing the actual number o...

Страница 117: ...Chapter 2 Building an Object Oriented Model 107 The Association display preferences appears 4 Modify the association display preferences 5 Click OK...

Страница 118: ...has the following properties Property Description Maximum length Name Name of the dependency 254 Code Reference name for the dependency 254 Comment Descriptive comment for the dependency Independent...

Страница 119: ...rce object definition include Source use case incorporates the behavior of another use case at a location that is specified by the source instantiate Specifies that operations on the source class crea...

Страница 120: ...the right mouse button You release the Dependency tool 4 Double click the new dependency in the model The dependency property sheet opens to the General page Opening property sheets at last accessed p...

Страница 121: ...you can modify v To modify dependency properties from its property sheet 1 Double click the dependency in the model The dependency property sheet opens to the General page Opening property sheets at...

Страница 122: ...ependencies The list of dependencies appears 2 Click the dependency that you want to modify An arrow appears at the beginning of the line 3 Modify any of the properties of the dependency directly in t...

Страница 123: ...play preferences 1 Select Tools Display Preferences or Right click the diagram background and select Display Preferences from the contextual menu The Display Preferences dialog box appears 2 Expand th...

Страница 124: ...than one realization link between a class and an interface you should create only one because the interface can only realize one action for the class When you generate from an OOM if more than one re...

Страница 125: ...etween the two objects Dragging a realization to a different class You can change the class or interface at either end of a realization by clicking the realization to select it pressing down CTRL and...

Страница 126: ...ab in the Property Sheets groupbox 5 Type a realization name and a realization code 6 Select a stereotype from the dropdown listbox 7 Click OK Modifying realization properties There are two approaches...

Страница 127: ...fy realization properties from its property sheet 1 Double click the realization in the model The realization property sheet appears 2 Type or select realization properties or Click on a page tab Type...

Страница 128: ...The list of realizations appears 2 Click the realization that you want to modify An arrow appears at the beginning of the line 3 Modify any of the properties of the realization directly in the list 4...

Страница 129: ...lay preferences 1 Select Tools Display Preferences or Right click the diagram background and select Display Preferences from the contextual menu The Display Preferences dialog box appears 2 Expand the...

Страница 130: ...m length Name Name for the domain 254 Code Reference name for the domain 254 Comment Descriptive label for the domain Data type Form of the data corresponding to the domain such as numeric alphanumeri...

Страница 131: ...ew Domain from the contextual menu v To create a domain 1 Select Model Domains The list of available domains appears 2 Click a blank line in the list or Click the Add a Row tool An arrow appears at th...

Страница 132: ...ta type for a domain from the list 8 Click on a page tab Type or select domain properties as required 9 Click OK You return to the List of Domains 10 Click OK or Click another domain line Indicating d...

Страница 133: ...omain in two ways Directly from the List of Domains From the property sheet for the domain When you select a data type for a domain from its property sheet you can choose a data type from a list of st...

Страница 134: ...e An arrow appears at the beginning of the line 3 Click the Properties tool or Double click the arrow at the beginning of the line The domain property sheet appears 4 Select a data type from the Data...

Страница 135: ...data type from a list of standard data types You can select a data type from a list of standard data types This is the same list that is available in the Conceptual Data Model PowerDesigner automatic...

Страница 136: ...ng Float 64 bit floating decimal numbers Money Numbers with a fixed decimal point Fixed Serial Automatically incremented numbers Fixed Boolean Two opposing values true false yes no 1 0 Conceptual data...

Страница 137: ...ser defined data type Undefined Not yet defined data type v To select a data type from a list of standard data types 1 Select Model Domains The List of Domains appears 2 Click the domain to define An...

Страница 138: ...ndefined data type If you do not want to select a data type immediately you can choose the Undefined data type 6 Type the maximum number of characters for the data type in the Length box 7 If the data...

Страница 139: ...he arrow at the start of the line Accessing a property sheet from the Browser You can also access a domain property sheet by double clicking the appropriate domain node in the Browser The Domain prope...

Страница 140: ...alues Attributes Domains Validation rule Business rule that is defined as a server expression and is attached to one of the following listed objects Classes Attributes Domains Setting standard check p...

Страница 141: ...ning additional check parameters for objects You can write an SQL statement using the following standard variables defined as standard check parameters and validation rules Variable Description MINMAX...

Страница 142: ...r domain The Additional Checks page appears 2 Type SQL expression using the variables MINMAX LISTVAL and RULES 3 Click OK Using a validation rule in check parameters A validation rule is a rule that v...

Страница 143: ...ion rules for the entity attribute or domain For more information on defining business rules see the chapter Using Business Rules v To use a validation rule in check parameters 1 Click the Rules tab i...

Страница 144: ...Defining check parameters 134...

Страница 145: ...This chapter describes how to compare and merge Object Oriented Models as well as how to check the validity of a Object Oriented Model OOM Topic Page Checking an OOM 136 Merging two OOM 144 Opening a...

Страница 146: ...t have constructors Attribute Attribute name and code uniqueness and length Data type has a not null and not void data type Attribute must have value assigned Attribute must be initialized Operation O...

Страница 147: ...to achieve in a your model You can also have certain problems automatically corrected Indicating error severity You can use the following tools from the Check Model Parameters dialog box to indicate...

Страница 148: ...kage Selected All objects contained in package including all objects contained in sub packages Package Not selected All objects in package except objects contained in sub packages Objects selected in...

Страница 149: ...blem severity select the object parameter and then select either the Error or Warning tool The symbol changes to the appropriate severity level 4 If you want PowerDesigner to automatically correct a p...

Страница 150: ...ge displays all the objects in the current OOM 8 Select checkboxes for objects that you want to be checked 9 Clear checkboxes for objects that you do not want to be checked Selecting all or clearing a...

Страница 151: ...lts You can use the Check Model to locate and correct problems in the OOM You can choose one of the following correction options from the Check toolbar Symbol Option Description Manual correction Disp...

Страница 152: ...e OOM v To make automatic corrections to an OOM 1 From the Check Result dialog box select an object parameter 2 Right click the object parameter and select Auto Correction from the contextual menu 3 R...

Страница 153: ...Chapter 3 Managing Object Oriented Models 143 6 Right click the object parameter and select Re check from the contextual menu Verify that the problem has been corrected...

Страница 154: ...orts performed independently by several team members When the merge process finds two objects that have the same code you can indicate whether or not the definition of the object in the source model s...

Страница 155: ...m which you can generate Java files or objects for PowerBuilder to create applications You can also use the OOM created from a Rose model to add to an existing OOM or to generate a CDM or PDM for data...

Страница 156: ...lows Property in an Rose model Imported property in a OOM Documentation Comment Export Control Implementation Visibility Package Property in an Rose model Imported property in a OOM Cardinality n Card...

Страница 157: ...d Class Utility Instanciated Class Utility MetaClass Formal arguments Nested Class Concurrency Files Rose Property Rose Sub property Type Class Class Utility Parameterized Class Instanciated Class Par...

Страница 158: ...amount of storage Time to complete operation Concurrency sequential guarded synchronous Preconditions Postconditions Friendship required yes No Keys qualifiers Constraints Stereotype Derived Static Fr...

Страница 159: ...for an Object Oriented Model OOM It also shows you how to create a new OOM by reverse engineering from a database Topic Page What is reverse engineering 150 Reverse engineering Java 151 Reverse engin...

Страница 160: ...l you can choose in an object comparison box either to replace the existing object or to keep the existing object in the model Parsing PowerDesigner uses parser software for reverse engineering XML th...

Страница 161: ...that contain one class definition that has the same name as the file class Directory Folder from which you can reverse all the Java files including all those contained in it s sub directories Archive...

Страница 162: ...Comments Reverses classes without including code comments Create Symbols Creates a symbol for each object in the diagram Otherwise reversed objects are visible in the browser Mark Classifiers not to...

Страница 163: ...You can select to reverse a JDK library model from the Options page of the Reverse Java dialog box The Setup program installs these models in the PowerDesigner LIBRARY folder You can open a JDK libra...

Страница 164: ...can reverse engineer java class source files without the body of the code When you reverse classes in this way the code contained within the operations of the class does not appear in the reversed cl...

Страница 165: ...ick the Add button A standard Open dialog box appears 4 Select the files that you want to reverse and click Open You return to the Reverse Java dialog box It displays the files you selected 5 Click th...

Страница 166: ...e engineering Java source files Each java source file contains information on one or several class definitions When you reverse engineer a java file PowerDesigner creates a class in the model correspo...

Страница 167: ...o button Reversing without the body of the code You can choose reverse java source files without the body of the code of the class by selecting the Ignore operation body checkbox in the Options page 3...

Страница 168: ...Reverse engineering compiled Java files A compiled class file contains the definition of one unique class A compiled class file results from compiling a java file using an independent Java compiler Af...

Страница 169: ...elect the class radio button 3 Click the Add button A standard Open dialog box appears 4 Select the files that you want to reverse and click Open Multi selection You can select several files simultane...

Страница 170: ...files you selected 5 Click OK A Progress box appears and the classes are added to your model The classes are visible in the diagram and in the Browser The reversed classes are listed in the Reverse p...

Страница 171: ...belong to the same model or package Often Java library files are interdependent as they belong to the same model and are therefore located in the same directory In this case if you do not reverse engi...

Страница 172: ...out the body of the code of the class by deselecting the Ignore operation body checkbox 3 Click the Add button The Browse for Folder dialog box appears 4 Select the directory that contains the Java fi...

Страница 173: ...se files can often contain large numbers of class definitions A jar file is a compressed file type that contains one or several Java class definitions When you reverse engineer a jar file PowerDesigne...

Страница 174: ...t the Archive radio button 3 Click the Add button A standard Open dialog box appears 4 Select the files that you want to reverse and click Open Multi selection You can select several files simultaneou...

Страница 175: ...you selected 5 Click OK A Progress box appears and the classes are added to your model The classes are visible in the diagram and in the Browser The reversed classes are listed in the Reverse page of...

Страница 176: ...he same information When you reverse engineer an object that has the same name as a class that already exists in a model you can choose in the Merge Model window either to replace the existing class o...

Страница 177: ...s and interfaces cannot then be generated from the model To be able to generate the classifier you must select the Generate checkbox in its property sheet Create Associations Creates associations betw...

Страница 178: ...s the class libraries of a particular version of PowerBuilder You can select to reverse a PowerBuilder library model from the options page of the Reverse PowerBuilder dialog box The Setup program inst...

Страница 179: ...PowerBuilder application you can select only one PowerBuilder application from the PB application dropdown listbox You can then add objects that belong to this application to the list of objects to r...

Страница 180: ...a PowerBuilder application from the PB Application dropdown listbox 4 Click the Add button A standard Open dialog box appears 5 Select the file that you want to reverse and click Open Multi selection...

Страница 181: ...w situated in the bottom part of the PowerDesigner main window Reverse engineering objects from SRU files SRU files are text files containing the definition of PowerBuilder User Objects You do not hav...

Страница 182: ...elect the SRU radio button 3 Click the Add button A standard Open dialog box appears 4 Select the SRU files that you want to reverse and click Open Multi selection You can select several files simulta...

Страница 183: ...ays the files you selected 5 Click OK A Progress box appears and the classes are added to your model The classes are visible in the diagram and in the Browser The reversed classes are listed in the Re...

Страница 184: ...s parent element by an aggregation link If an empty element has no child object but has attributes it is reversed as a class and its attributes become attributes of the class Attributes of type ID and...

Страница 185: ...neering options 1 Select Language Reverse Engineer XML The Reverse XML dialog box opens 2 Click the Options tab The Options page appears 3 Select XML reverse options 4 Click Apply 5 Click Cancel Rever...

Страница 186: ...erse and click Open Multi selection You can select several files simultaneously by using the CTRL or SHIFT keys You return to the Reverse XML dialog box It displays the files you selected 4 Click OK A...

Страница 187: ...verse Engineering Object Language The Choose Object Language dialog box appears 2 Click the Link radio button 3 Select an object language in the dropdown list box 4 Click OK Depending on the chosen ob...

Страница 188: ...ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSE...

Страница 189: ...OOM This chapter describes how to generate objects from an OOM Topic Page Generating objects 180 Generating Java source files 182 Generating objects for PowerBuilder 189 Generating for XML 195 Custom...

Страница 190: ...classes Java BeanInfo classes that you generate from the classes in a model XML objects XML definition files and enhanced definition files such as XML schema Selecting objects to include in the gener...

Страница 191: ...del can be automatically selected for generation by clicking the Use Graphical Selection tool in the Selection page tool bar Then you can select the objects that you want to generate using the followi...

Страница 192: ...va class a Java object can be saved as a value in a table Java objects can be inserted into a table SELECT statements can be executed against the fields and methods of objects stored in a table and Ja...

Страница 193: ...ions in the generated class definition Operations Attributes Displays the class operations before the attributes in the generated class definition You define Java generation options from the Java Gene...

Страница 194: ...ained within packages or sub packages The generated files contain the definition of each class and have the file extension java v To generate java files 1 Select Language Generate Java Code The Java G...

Страница 195: ...d into packages are selected and displayed by default You can use the Select tools to the right of the Folder Selection dropdown listbox to modify the selection The Include Sub Packages tool enables y...

Страница 196: ...enerated with the file extension java for each of the classes that you selected Creating Java BeanInfo classes A Java Bean is a reusable software component that can be visually manipulated in a softwa...

Страница 197: ...va Bean You can define the type of a class from its property sheet v To create Java BeanInfo classes 1 Select Language Create BeanInfo Classes A selection window appears It contains a list of all the...

Страница 198: ...Generating Java source files 188 3 Click OK A BeanInfo class is created in the model for each of the classes you selected...

Страница 199: ...erBuilder already installed on your machine You can generate NVOs from the classes in an OOM A separate file with the extension sru is created for each of the classes that you select in the OOM Each f...

Страница 200: ...werBuilder application into which you generate PowerBuilder non visual objects If PowerBuilder is not installed on your machine no application appears in the list v To define PowerBuilder generation o...

Страница 201: ...wise you will not be able to use them in PowerBuilder If PowerBuilder is not installed on your machine you cannot generate objects for a PowerBuilder application v To generate PowerBuilder user object...

Страница 202: ...de in your selection all the classes that are situated within packages 4 Click the Options tab The Options page appears 5 Select the PBL option 6 Type a library directory for generated User Objects in...

Страница 203: ...e PowerBuilder The PowerBuilder User Object Generation dialog box opens 2 Select a model or package from the Folder Selection dropdown listbox 3 Select the classes that you want to generate from the l...

Страница 204: ...94 The Options page appears 5 Select the SRU option 6 Select a directory in which you want to generate the sru files 7 Click OK A PowerBuilder User Object is generated with the file extension sru for...

Страница 205: ...cifications Each class is generated as a type Each attribute is generated as an element XML Data Used for XML Data specification Mapping is defined by the XOL specification Navigable associations are...

Страница 206: ...el including those that are contained within packages or sub packages The generated file has the extension XML however its format depends on the current object language of the model To change the XML...

Страница 207: ...ated XML file in the File name box 4 Select a model or package from the Folder Selection dropdown listbox 5 Select the classes that you want to include in the generated file from the list Select Tools...

Страница 208: ...Generating for XML 198 6 Click OK An XML file is generated with the file extension xml...

Страница 209: ...Insert scripts before and after a class or interface creation command Customizing a creation script allows you to add descriptive information about a generated script or manipulate the script in such...

Страница 210: ...Customizing scripts 200...

Страница 211: ...ct Oriented Model This chapter describes how to generate a Conceptual Data Model CDM from an Object Oriented Model OOM Topic Page Generating OOM objects to a CDM 202 Translating OOM data types for a C...

Страница 212: ...generation to a CDM Translating OOM objects into CDM objects CDM generation translates OOM objects into conceptual objects OOM object CDM object after generation Domain Domain Class Entity only if the...

Страница 213: ...esigner conceptual data types cannot be modified Translating Java data types for a CDM The following table lists the Java data types to which the object language file assigns translations Java data ty...

Страница 214: ...eates a default CDM containing the objects translated from the OOM that is then merged with an existing CDM You can choose to update delete or add objects in the existing CDM target model based on mod...

Страница 215: ...oose which objects to add or delete from the target model you must select Preserve Modifications to compare and merge the two CDM CDM generation options You can set the following general generation op...

Страница 216: ...either all objects in the current model or all objects in a package You have the following selection options Parent object Include Sub packages Displays Model Selected All objects in model including a...

Страница 217: ...ed CDM appears in the browser and the corresponding diagram opens in the main diagram window You can only generate a CDM from the active OOM diagram window v To generate to a new CDM from an OOM 1 Sel...

Страница 218: ...g a CDM from an OOM 208 The Detail page appears 5 Select or clear CDM generation options 6 Click the Selection tab The Selection page appears 7 Select the name of an OOM from the Select Location dropd...

Страница 219: ...ate CDM from a sub package select the Sub Packages Included tool next to the Selection Location dropdown listbox and then select a sub package from the dropdown listbox 8 Select checkboxes correspondi...

Страница 220: ...M has been successfully generated You can use the Merge window to select objects to be updated deleted or added to the target model The target model must be open in the workspace to be merged with a s...

Страница 221: ...s is the existing model that you want to update Preserve modifications If you want to preserve the existing objects in the CDM then the Preserve modifications checkbox must be selected If you clear th...

Страница 222: ...12 The Detail page appears 5 Select or clear CDM generation options 6 Click the Selection tab The Selection page appears 7 Select the name of an OOM from the Select Location dropdown list The default...

Страница 223: ...Clear class checkboxes for each entity that you do not want to generate 9 Click OK If you selected the Preserve Modifications checkbox the Merge Models window appears If you cleared the Preserve Modi...

Страница 224: ...Generating a CDM from an OOM 214...

Страница 225: ...ct Oriented Model This chapter describes how to generate a Physical Data Model PDM from an Object Oriented Model OOM Topic Page Generating OOM objects to a PDM 216 Translating OOM data types for a PDM...

Страница 226: ...bute Column Identifier Identifier Operation Stored Procedure Association Reference or table Dependency Not translated Realization Not translated Generalization Reference For a class to become an table...

Страница 227: ...slating Java data types for a PDM The following table lists the Java data types to which the object language file assigns translations Java data type Code in CDM What it stores Translation example for...

Страница 228: ...delete or add objects in the existing PDM target model based on modifications made in the default PDM source model For more information on merging two PDM see the chapter Comparing and Merging Models...

Страница 229: ...nt System definition DBMS for the existing PDM Preserve Modifications When selected allows a comparison and merge of the newly generated PDM default PDM with the existing PDM Clearing the Preserve Mod...

Страница 230: ...name FK index names Foreign key index name FK threshold Minimum number of estimated records in a table that are necessary before a foreign key index can be created Check model before generation If yo...

Страница 231: ...ed All objects in package except objects contained in sub packages Objects selected in the model Objects selected in your diagram can be automatically selected for generation by clicking the Use Graph...

Страница 232: ...Click the Generate new Physical Data Model radio button 3 Select the DBMS you want to be associated to your model from the DBMS dropdown listbox 4 Type a new name and code otherwise the PDM will have...

Страница 233: ...e To generate a PDM from a package select the package name from the Select Location dropdown listbox at the top of the page To generate PDM from a sub package select the Sub Packages Included tool nex...

Страница 234: ...elected The existing PDM is automatically replaced by the newly generated PDM When Preserve Modifications is selected the Merge Models window appears after the new PDM has been successfully generated...

Страница 235: ...adio button 3 Select a target model from the Select Model dropdown listbox This is the existing model that you want to update The DBMS that is attached to the model appears in the DBMS box Preserve mo...

Страница 236: ...26 The Detail page appears 5 Select or clear PDM generation options 6 Click the Selection tab The Selection page appears 7 Select the name of an OOM from the Select Location dropdown list The default...

Страница 237: ...or Clear class checkboxes for each table that you do not want to generate 9 Click OK If you selected the Preserve Modifications checkbox the Merge Models window appears If you cleared the Preserve Mod...

Страница 238: ...Generating a PDM from an OOM 228...

Страница 239: ...Using Object Languages This chapter explains how to use an object language in an OOM Topic Page Object languages 230 Using the object language editor 239 Object language editor categories 241 About th...

Страница 240: ...nguage You can associate the following standard object languages to an OOM Object language type Description Analysis General language in which you define parameters for models from which you want to g...

Страница 241: ...he object language that is local to the current OOM Modifying the current object language You can modify the properties of the object language that is associated to the current model If the object lan...

Страница 242: ...and sub categories in which are contained the values that you can modify 3 Expand a category node and its sub category if it has one and select a value The name associated comment and value of the fi...

Страница 243: ...anguage properties You can change any of the parameters of existing linked object languages The changes you make apply to all models that are linked to the object language v To modify the parameters o...

Страница 244: ...and sub categories in which are contained the values that you can modify 4 Expand a category node and its sub category if it has one and select a value The name associated comment and value of the fi...

Страница 245: ...e from the Object Language dropdown listbox in the New groupbox 4 Select the Link radio button if you want the new object language to be the general object language available for all models or Select...

Страница 246: ...k the New tool The New Object Language window appears 4 Type a name for the new object language in the Name box 5 Select an existing object language from the Copy from dropdown listbox if you want the...

Страница 247: ...category nodes as appropriate and modify comments or values as required 8 Click OK A standard Windows Save As box appears 9 Type the filename and click Save The object language is saved in a file wit...

Страница 248: ...Object languages 238 10 Click Close For information on how to associate an object language to an OOM see the section Changing the object language of an OOM...

Страница 249: ...contained in these fields Each category and sub category in the object language editor has the following properties Property Description Name Name of category or sub category Comment Description of se...

Страница 250: ...escription Add items Allows you to add a renamed copy of a selected field to the list of fields in a category When you select Add Items a selection window appears It contains a list of fields for the...

Страница 251: ...file the values you define in this category appear at the beginning of the file The following parameters are defined by default in an OOM Parameter Description Default value Product Name of the model...

Страница 252: ...Class Class whose instances are statically typed and that defines the physical data structure and methods of a class as implemented in traditional programming languages process Heavyweight flow that c...

Страница 253: ...that creates and initializes an instance of a class Generalization stereotypes A generalization has the following default stereotype Stereotype Description implementation Specifies that the child obj...

Страница 254: ...ity towards the target import Specifies that everything that is declared as public in the target object becomes visible to the source object as if it were part of the source object definition include...

Страница 255: ...rouping of elements some of which constitute a specification of the behavior offered by the other contained elements System Package that represents the entire system being modeled Script category The...

Страница 256: ...Default value Null 0 True TRUE False FALSE Void void Bool boolean Object scripts Depending on the object language family Java XML some pieces of generated code can be parameterized in this section Ea...

Страница 257: ...interface Public interface CSFRNAME ATTRDEFINITIONS OPERDECLARATIONS Attribute Definition generated code for an attribute ATTRNAME CDATA Reference generated code for a referenced attribute migrated b...

Страница 258: ...contains three maps ClassMapping AttributeMapping and AssociationMapping In each map the ID item specifies the name of the element that will become an object The name item specifies the attribute or s...

Страница 259: ...y to define events on operations The default exisiting events are constructor and destructor Extended Attributes category The Extended Attributes category allows he user to define extended attributes...

Страница 260: ...Object language editor categories 250...

Страница 261: ...usiness Rules This chapter describes how business rules help you model information Topic Page What is a business rule 252 Defining business rules in an OOM 253 Applying business rules to objects 256 A...

Страница 262: ...ased on a credit limit Business rules guide and document the creation of a model For example the rule an employee belongs to only one division can help you graphically build the link between an employ...

Страница 263: ...ypes of business rules Rule type Describes Example Definition Characteristics or properties of an object in the information system A customer is a person identified by a name and an address Fact Certa...

Страница 264: ...ression Presence of associated expression Notes Presence of associated notes Creating a business rule Before you create business rules formulate your rules by asking yourself the following questions W...

Страница 265: ...w appears at the beginning of the line 3 Type a name and a code for the business rule 4 Click Apply The creation of the new business rule is committed 5 Click the new business rule line An arrow appea...

Страница 266: ...business rule to objects from their property sheets or lists Applying a business rule to an object You can add business rules that already exist in the model and which belong to other objects v To ap...

Страница 267: ...and appear in the list of business rules for the object 6 Click OK Attaching an expression to a business rule A business rule typically starts out as a description As you develop your model and analyz...

Страница 268: ...Applying business rules to objects 258...

Страница 269: ...an object that defines the characteristics of the object Reusable software component that can be visually manipulated in a software development tool A written statement specifying what the informatio...

Страница 270: ...ip between two modeling elements in which a change to one modeling element the independent element may affect the semantics of the other modeling element the dependent element Set of values for which...

Страница 271: ...f parameters A general purpose mechanism for organizing elements into groups Specification of a variable that can be changed passed or returned Parameters are used only for operations Lifetime of the...

Страница 272: ...new kinds of building blocks that are derived from existing ones but that are specific to your problem An object that ceases to exist when the process that created it ceases to exist Denotes how an ob...

Страница 273: ...ass 102 cardinality 101 104 change to class 102 changeability 98 check 136 class attribute 102 association continued code 98 comment 98 composition 98 102 create 99 define 97 102 display 106 ends 97 g...

Страница 274: ...dependency 109 bitmap data type 127 boolean data type 126 203 217 Browser attribute 51 class 22 interface 37 operation 68 business rule 259 apply 132 256 check parameter 252 create 254 define 252 exp...

Страница 275: ...ract 18 actor 20 add object 29 associative 102 attribute 30 Browser 22 cardinality 18 21 change from association 102 check 136 classifier 27 code 18 class continued comment 18 create 21 default stereo...

Страница 276: ...ctor 76 correct automatic 142 check 141 142 manual 142 OOM 141 142 create association 99 attribute 51 59 business rule 254 create continued class 21 dependency 109 domain 121 generalization 92 identif...

Страница 277: ...file generate 184 delete rule PDM generation option 220 dependency 260 access 109 bind 109 call 109 child 108 code 108 dependency continued comment 108 create 109 define 108 derive 109 display 112 fr...

Страница 278: ...ditor language 239 object language 239 ends association 97 Entity Relationship notation 205 enumeration class 20 error list check 142 navigate 142 error message OOM 137 141 142 severity 137 event oper...

Страница 279: ...ted 202 options 205 package 213 preserve modifications 211 select objects 206 generate PDM options 220 package 227 preserve modifications 225 select objects 220 Getter operation 79 H hierarchy package...

Страница 280: ...y 36 37 introduction overview 2 J jar reverse engineering Java 163 Java code 154 code comment 152 generate 182 introduction continued reverse engineering 151 reverse engineering inner class 151 revers...

Страница 281: ...138 OOM 138 open 8 options 9 PowerBuilder 168 property 11 model continued sub package 138 model notation generate CDM 205 model option attribute 9 modify association 103 104 attribute 54 55 56 class 2...

Страница 282: ...5 246 type 230 UML 241 value 239 xml mapping 248 object selection check 138 object selection continued model 138 package 138 objects OOM 5 PowerBuilder 166 XML 174 OLE data type 127 OOM 261 business r...

Страница 283: ...05 generate PDM 220 model 9 OOM 9 PowerBuilder 166 reverse engineering 152 166 174 reverse Java 152 options continued XML 174 ordered association 101 ordering association 98 101 role 101 Out parameter...

Страница 284: ...identifier identifier 62 private association visibility 102 private continued attribute visibility 50 class visibility 21 generalization visibility 92 interface visibility 37 operation visibility 68 p...

Страница 285: ...gation 102 association 97 98 100 101 cardinality 101 104 composition 102 define 100 multiplicity 101 ordering 101 role continued property 101 roles OOM 4 Rose import association 146 148 attribute 147...

Страница 286: ...clude 138 Sybase SQL Anywhere data type 217 symbol association 106 attribute 60 class 34 dependency 112 generalization 95 interface 46 operation 85 package 15 realization 118 T table prefix PDM genera...

Страница 287: ...n 132 view check 136 virtual generalization 91 visibility 262 association 98 102 attribute 49 50 60 class 21 generalization 91 92 interface 36 37 keywords 60 86 operation 67 68 86 W warning OOM 137 14...

Страница 288: ...278...

Отзывы: