|
|
|
Last
revision of this document: |
Data-Base-Access
(DBA) Objects are classes that perform database-operations for
exactly one database-table.
For
the theory about DBA Objects please consult Using
Data-Base-Access (DBA) Objects for low level access to
database-tables.
Preface:If
you are came to this document to get a guideline for developing a
Data-Base-Access Object, I recommend to start with the document
Using
Data-Base-Access (DBA) Objects for low level access to
database-tables and go directly to the
ToDo-List in this document.
As
classes for Data-Base-Access Objects have a critical mission within
an application, preference was given to performance if there has to
be made a decision between understandability and performance.
I
hope, that the comments placed in the code will help you to
understand what intention is behind the code.
Credits:Too
numerous to mention; the idea is available in dozens of versions –
I refined a lot of ideas into my system.
This step requieres to have the base-classes imported (see Download the jar-file for the base-classes) or written by yourself as guided by the tutorial to develop a Fat-Client application in Java.
Create
the Data-Base-Access (DBA) Object for the database-table 'Project':To
create the class for the Data-Base-Access Object, right click onto
the project 'JS_FC01' and select
>New>Class
Enter
the Package (js_errdb.dba),
the (Class-)Name (JS_ErrDB_Project_DBA),
enter or 'Browse' the Superclass (
and check that no checkbox is selected; then click the [Finish]
button.JSBS_DBA)
Eclipse
has already generated a template and the individual code can be
entered.
Please see the code to be entered at
JS_ErrDB_Project_DBA
- or copy it from there ;-) .
Next
Steps:As
the base for the Server-Side derivation of the Business Object is
finished now, coding of it follows:
JS_FC01o
- Develop the Server-Side Class for the Business Object 'Project'.