Data Access Object Code Generator
An open source Java tool for PostgreSQL databases.
- Overview
- About DAO
- Usage
- Screenshots
- Demo
- Downloads
- Developer Docs
- FAQs
- Help Forum
- Discussion Forum
- Bugs
- Feature Requests

Using Netbeans to Obtain and Develop MDAOG

This page describes how you can use the Netbeans Java IDE to obtain the MDAOG source files from CVS to make changes to MDAOG.

You'll be access the public CVS server anonymously. You won't have commit access. If you would like to contribute modifications back let me know.

About Netbeans

Netbeans is an open source Integrated Development Environment for developing Java applications. It is a great tool for developing J2EE (JSP, EJB and Web Services) applications. It comes bundled with a servlet engine (Tomcat) and J2EE app server (Sun One App Server Platform Edition) for easy setup and use. It also has very good integration for developing J2ME applications. You can download Netbeans from their website I used versions 4.0 and 4.1 to initially develop MDAOG.

Getting the Source

Once you've installed Netbeans (and a JDK 1.4.2 or higher preferred) you can set up netbeans to check out the files from the cvs repository.

Select the Versioning menu in Netbeans. Then the CVS sub menu and finally Check Out...

A dialog box will pop up titled Enabling Advanced CVS Command Options. This is an informational message. You can choose to keep it from showing again.

After you click the Check Out... button you will see the Check Out dialog box where you'll need to enter specific information regarding the cvs connection as well as where you would like the files to be saved to on your local drive.

You will need to provide/select the following input:

  • Working Directory: This is the path on your system to save the files. Ex: c:\mdaog\
  • CVS Server Type: pserver
  • CVS Server Name:
  • Port: 2401
  • User Name: anonymous
  • Repository Path: /cvsroot/mdaog
  • Use Built-In CVS Client should be selected
  • Module(s): mdaog (if you try and use the select button, for some reason it doesn't list the modules. just type in mdaog)
  • Revision or Tag: (leave blank)

Now click on the Login button to make sure you can connect. After you click the Login button you should see a message that says "You are logged in", right underneath the password field.

After you verified you can connect, click the OK button and the sources should start being checked out from the cvs repository.

Once all the files have finished being checked out you can open the project.

From the File menu in Netbeans, select Open Project... then navigate to the directory you specified as the Working Directory in the CVS Check Out Dialog. In that directory should be a directory named mdaog. Click on it to select it and then click on the Open Project button.

After the project is open, right click on it and select Properties. In the Properties Dialog, select the Libraries Category (in the tree on the left). On the right, select the Run tab then click on Add Jar/Folder. Now navigate to where you have your PostgreSQL JDBC driver jar file and include it as a library. MDAOG will still run if you don't perform this step, you just won't be able to connect to the database.

Try running the project to see if everything worked successfully. Right click on the project name (mdaog) and select Run Project. If you get a dialog box asking you to select the Main Class, choose com.menegatos.mdaog.gui.DaoGenerator.

Netbeans will start compiling MDAOG and run it if everything goes well.

Project News

MDAOG's first reported bug was (hopefully) fixed :) Also support for bigserial datatypes has been added. The generated DAO code will recognize bigserial as a java Long and will go fetch the sequence value on inserts.

This new version of MDAOG adds methods to the DTO objects to allow you to easily duplicate them or test for equality. The ability to specify the DataSource name used by the webapp has also been added. Previously if you wanted to make changes to the DSN you had to modify the PostgreSQLFactory.

A few changes to the GUI were made based on some recommendations as well as some code changes and rebuilding the package to be compatible with older JVMs

The first Alpha Release of MDAOG is available for download. This build allows you to connecto to a PostgreSQL database through MDAOG's Swing GUI and generate DAO source files for accessing the database in your Java web applications. Though it is an Alpha release, the generated code is of high quality and fairly well tested.

The MDAOG Java DAO Code Generator Project is coming to SourceForge. The project home page is up with a bit of information to give you an idea about what it's all about. Jar files and source code will be available soon. If you're interested in the project please leave a comment.

Hosted on: Logo