Object-Oriented Modeling SAP® Sybase® Powerdesigner® 16.5 SP02
Total Page:16
File Type:pdf, Size:1020Kb
Object-Oriented Modeling SAP® Sybase® PowerDesigner® 16.5 SP02 Windows DOCUMENT ID: DC38086-01-1652-01 LAST REVISED: May 2013 Copyright © 2013 by SAP AG or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Please see http://www.sap.com/corporate-en/legal/copyright/ index.epx#trademark for additional trademark information and notices. Contents PART I: Building OOMs ..................................................1 CHAPTER 1: Getting Started with Object-Oriented Modeling .......................................................................3 Creating an OOM ...................................................................5 OOM Properties ..............................................................7 Previewing Object Code ........................................................8 Customizing Object Creation Scripts ................................10 Customizing your Modeling Environment .........................11 Setting OOM Model Options .........................................11 Setting OOM Display Preferences ................................13 Viewing and Editing the Object Language Definition File ............................................................................13 Changing the Object Language ..........................13 Extending your Modeling Environment .........................14 Linking Objects with Traceability Links .........................15 CHAPTER 2: Use Case Diagrams ................................17 Use Case Diagram Objects .................................................18 Use Cases (OOM) .................................................................18 Creating a Use Case ....................................................19 Use Case Properties ....................................................19 Actors (OOM) .......................................................................20 Creating an Actor ..........................................................22 Actor Properties ............................................................22 Reusing Actors .............................................................24 Use Case Associations (OOM) ...........................................24 Creating a Use Case Association .................................25 Use Case Association Properties .................................25 Object-Oriented Modeling iii Contents CHAPTER 3: Structural Diagrams ...............................27 Class Diagrams ....................................................................27 Class Diagram Objects .................................................28 Composite Structure Diagrams ..........................................29 Composite Structure Diagram Objects .........................30 Package Diagrams ...............................................................31 Package Diagram Objects ............................................32 Object Diagrams ..................................................................32 Object Diagram Objects ................................................33 Classes (OOM) .....................................................................34 Creating a Class ...........................................................34 Class Properties ...........................................................35 Creating Java BeanInfo Classes ...................................39 Creating a Java BeanInfo Class from the Language Menu ..............................................41 Creating a Java BeanInfo Class from the Class Contextual Menu .............................................42 Generic Types and Methods .........................................42 Creating Generic Types .......................................42 Creating Generic Methods ...................................43 Creating a Specialized Classifier .........................43 Creating a Bound Classifier .................................45 Generic Type Example.........................................45 Composite and Inner Classifiers ...................................46 Creating Inner Classifiers ....................................46 Creating a Composite Classifier Diagram ............47 Specifying a Classifier as a Data Type or Return Type ..................................................................................47 Viewing the Migrated Attributes of a Class ...................48 Packages (OOM) ..................................................................49 OOM Package Properties .............................................50 Defining the Diagram Type of a New Package ..............51 Interfaces (OOM) ..................................................................51 iv SAP Sybase PowerDesigner Contents Creating an Interface ....................................................51 Interface Properties ...................................................... 52 Objects (OOM) ......................................................................54 Creating an Object ........................................................56 Object Properties ..........................................................56 Linking a Classifier to an Object ...................................57 Parts (OOM) ..........................................................................58 Creating a Part ..............................................................59 Part Properties ..............................................................59 Ports (OOM) ..........................................................................60 Creating a Port ..............................................................61 Port Properties ..............................................................61 Redefining Parent Ports ................................................63 Attributes (OOM) ..................................................................63 Creating an Attribute .....................................................64 Copying an Attribute to a Class, Interface, or Identifier ...........................................................65 Overriding an Attribute in PowerBuilder ...............66 Adding Getter and Setter Operations to a Classifier ..........................................................66 Attribute Properties .......................................................67 Setting Data Profiling Constraints .................................70 Creating Data Formats For Reuse .......................71 Specifying Advanced Constraints ........................72 Identifiers (OOM) ..................................................................72 Creating an Identifier .................................................... 73 Creating a primary identifier when you create the class attributes ................................................ 73 Defining the Primary Identifier from the List of Identifiers .........................................................74 Identifier Properties ...................................................... 74 Adding Attributes to an Identifier ...................................75 Operations (OOM) ................................................................76 Creating an Operation .................................................. 76 Copying an Operation From Another Classifier ...77 Object-Oriented Modeling v Contents Inheriting and Overriding Operations from Parent Classifiers ............................................ 77 Creating a Standard Operation ............................77 Implementing Operations from an Interface .........78 Operation Properties ....................................................79 Parameters (OOM) .......................................................83 Associations (OOM) ............................................................84 Creating an Association ................................................86 Association Properties ..................................................86 Association Implementation ..........................................89 Understanding the Generated Code ....................91 Creating an Association Class ......................................92 Migrating Association Roles in a Class Diagram ..........93 Migrating Navigable Roles ...................................93 Rebuilding Data Type Links ..........................................94 Linking an Association to an Instance Link ...................94 Generalizations (OOM) ........................................................95 Creating a Generalization .............................................96 Generalization Properties .............................................96 Dependencies (OOM) ..........................................................98