21.07.2013 Views

Designing Object Model with UML Class Diagram - Visual Paradigm

Designing Object Model with UML Class Diagram - Visual Paradigm

Designing Object Model with UML Class Diagram - Visual Paradigm

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DB-VA Designer’s Guide Chapter 3 – <strong>Designing</strong> <strong>Object</strong> <strong>Model</strong> <strong>with</strong> <strong>UML</strong> <strong>Class</strong> <strong>Diagram</strong><br />

Adding ORM Implementation <strong>Class</strong><br />

ORM-Persistable class is used to generate the persistent class which has the ability to access the database including the basic<br />

operations for add, update, delete and search. As the generated code provides the basic operations for manipulating the<br />

persistent data, you may find it insufficient and want to add extra logic to it.<br />

DB-VA promotes the use of ORM Implementation <strong>Class</strong> to add extra logic to the ORM-Persistable class. When generating the<br />

persistent code, the ORM implementation class will also be generated, and thus you can implement the logic to the method in<br />

the generated implementation class for manipulating the persistent data.<br />

To add an ORM implementation class:<br />

3-12<br />

1. Create an ORM-Persistable class <strong>with</strong> an operation for adding extra logic.<br />

Figure 3.26 - ORM-Persistable class <strong>with</strong> an operation<br />

2. Mouse over the class and drag the resource of "Create ORM Implementation <strong>Class</strong>" to the diagram pane.<br />

Figure 3.27 - "Create ORM Implementation <strong>Class</strong>" resource<br />

The implementation class is created and connected to the source class <strong>with</strong> generalization stereotyped as . The source class becomes an abstract class <strong>with</strong> an abstract operation.<br />

Figure 3.28 - ORM Persistable <strong>Class</strong> and ORM Implementation <strong>Class</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!