Add User-Defined Methods
You can define your own methods in a Data
Access Builder session and code will be generated for them. The
method is added to the generated classes for a mapping. Do the
following steps to add a method:
- From the Data Access Builder window, open
the Methods or Manager Methods window to add a
user-defined method:
- Select the mapping icon
to which you want to add the method.
- Select either Methods
or Manager Methods from the
icon's popup menu. Data Access Builder generates <class> classes that provide database access to
handle a single object and it generates the <class>Manager classes to handle a collection
of objects (returns a result set). If you want to
add your method to the <class> class, select Methods.
If you want to add your method to the <class>Manager class, select Manager
Methods.
- Either in the Methods window or
the Manager Methods window is opened for you to
add the method.
- Indicate whether your method is specified
with a customized SQL statement, as a stored procedure
call, or with an SQL predicate.
- In the Methods window or Manager
Methods window, click Add under
the appropriate container to indicate the method
that you want to add. For example, click Add
under the Customized SQL Statement
container when you want to add a method by typing
the SQL statement for it.
- A window is opened for you to add
your method.
- Perform the steps in one of the following
user-defined methods:
- Add
User-Defined Methods with Customized SQL
Statements
- Add
User-Defined Methods That Are Stored Procedure
Calls
- Add
User-Defined Methods with SQL Predicates
- Click Close to close the
Methods or Manager Methods window.
When you generate code for the mapping, the
method you have defined will be included in the appropriate
class.

User-Defined
Methods

Modify User-Defined
Methods
Delete User- Defined
Methods
Copy
User-Defined Methods

Support for
Non-Nullable Columns with Default Values