Download Latest Version daomedgegen-12.2.1.zip (3.0 MB)
Email in envelope

Get an email when there's a new version of DAOMedge

Home / 12.2.1
Name Modified Size InfoDownloads / Week
Parent folder
daomedgegen-12.2.1.zip 2026-06-30 3.0 MB
reservedwordsmap.properties 2026-06-30 1.4 kB
README.md 2026-06-30 8.4 kB
lgpl.txt 2026-06-30 7.4 kB
daomedge-src-12.2.1.zip 2026-06-30 192.9 kB
examplecodedtypes.zip 2026-06-30 26.3 kB
daomedge-javadoc-12.2.1.zip 2026-06-30 798.4 kB
daomedgegen-src-12.2.1.zip 2026-06-30 3.0 MB
daomanual-12.2.1.pdf 2026-06-30 3.2 MB
daomedge-12.2.1.jar 2026-06-30 226.6 kB
daomanual-12.2.1.odt 2026-06-30 2.9 MB
dao.png 2026-06-30 1.8 kB
Totals: 12 Items   13.3 MB 2

NOTE:

This is a simple, fully documented, POJO using, light weight, fast, thoroughly tested, data access library with a code generator.

DAOMedge targets Java 17 and doesn't, strictly speaking, conform to the DAO pattern. It was developed over many years and simply works well as it is. Although DAOMedge is compiled to Java 17, you can run it using later JDKs and it will compile to that JDK (see the status label on the bottom of the screen).

For convenience the daomedgegen uses the latest daomedge.jar, but without the version number and date. This is useful to keep the projects together. You just really need the generator binary (currently daomedgegen-11.0.2-28022026.zip) as that has daomedgegen.jar, daomedge.jar (in lib/), the reservedwordsmap.properties (for syntax highlighting and reserve word avoidance), documentation, and a slightly less cheesey icon than earlier.

The actual daomedge.jar has a version number in the file name but you can use either one.

I've attempted to ensure the documentation is extensive and up to date. You can grab either the source (daomedge.odt) or the compiled version (daomedge.pdf).
They are also in the source and compiled zips respectively.

There are entries in the supporting documents (manual and READMEs) that might sound condescending but that is because I have made these mistakes so I keep adding to the documentation to remind me.

Known Issues
There is a weird issue when adding the first interface, sometimes it works, other times it fails and doesn't show up even though it is there (if you attempt to add the interface again it tells you that it is already there) I think it is a race condition, but am not sure. If you attempt to add another interface it fails with an index out of bounds exception. To get around this simply exit and restart.

Bash script to run the generator:

  #!/bin/bash  
  cd /folder/daomedge/daomedgegen/  
  java -Xmx2g -jar daomedgegen.jar

Bash script to run the generator command line interface:

  #!/bin/bash  
  cd /folder/daomedge/daomedgegen/  
  java -Xmx2g -jar daomedgegen.jar my_database

Or even:

  #!/bin/bash  
  cd /folder/daomedge/daomedgegen/  
  java -Xmx2g -jar daomedgegen.jar $*

Sample Code


Simplest:
List<Customer> customers = dao.select(Customer.class);

Pattern Matching:
Customer c = new Customer();
c.setSurname("Smith");
List<Customer> customers = dao.select(c);

Sort and Filter:
daotable table = dao.getTable(Customer.class);
daoproperty property1 = dao.getProperty(Customer.class, Customer.SURNAME);
daoproperty property2 = dao.getProperty(Customer.class, Customer.GIVENS);
OrderBy orderBy2 = new OrderBy(property2);
SelectColumn column1 = new SelectColumn(property1);
SelectColumn column2 = new SelectColumn(property2);
Filter filter = new PropertyFilter(table, property1, "Smith");
List<Customer> customers = dao.select(table, new SelectColumn[]{column1, column2}, filter, new OrderBy[]{orderBy2});

NotSQL Limits Simple queries can only have one table's columns in the get clasue.
Multi-table queries cannot use the * syntaxt.
Aggregate queries need the operand and value (even if it is != null or similar)

The Script
set classbase my.business;

{Query1}
get database.Customer.*
filter (database.Customer.surname = Smith | database.Customer.surname = 'Jones') & database.Customer.givens = 'John'
sort home.Person.dateOfBirth >;

{Query2}
sort home.Person.dateOfBirth >;
filter (database.Customer.surname not in [Smith, Jones) & database.Customer.givens = 'John'
get database.Customer.*

The Code For NotSQL
SimpleNotSQL notsql = new SimpleNotSQL(dao, notSQLScriptFromAbove);
List<Customer> customers = notsql.selectNotSQL("Query1");
customers = notsql.selectNotSQL("Query2");
// OR
customers = notsql.selectNotSQL(0);
customers = notsql.selectNotSQL(1);

Grab the latest documentation for a full list of examples.


Version 12.2.1 changelog


I think some tree types are feeling left out with no menu items attached; so I've added them. New menu items on code panels and a new menu item on relationships. They just do what other menu items are doing now but slightly more contextual.

Cancelling a print is NOT an error.

"Refresh" and "Are you sure" are distinct actions and the dialogs should reflect this so they are now separate.

Any issues with the generation of the coded will be presented as a summary at the end.

Rollback wasn't resetting the auto commit flag, so there were odd locks being introduced. Found this when I was speeding up my testing. No real idea as to why the rollback testing was successful before.

Changed to 3.5.8 of the mariadb jdbc driver and the logins failed. Turns out that 2.7.2 allowed "jdbc:mysql://host" whereas 3.5.8 doesn't. It needs to be "jdbc:mariadb://host".

Never liked the 'As Well' for data dictionary, DBML, and javadoc. So have changed all the names. The first read of the generators.xml file will read the old names but will save using the new names.

Added a line goto in the class previews to assist in build issues.

Removed the throws SQLException when building the primary key as string as it never gets thrown. Means that, if you are using this, then the first compile will have some "exception SQLException is never thrown in body of corresponding try statement" compiler errors.

If you have removed a column or table that is the linking or destination of a relationship, the generator will now remove the relationship and inform you of the removal. As this is also required on the command line interface so the isCLI is now a static on the DAOGenerator class.

I have changed the validators to reflect their purpose. IE validate(obj) is now validateInsert(obj) and validate(obj, obj) is now validateUpdate(obj, obj).

Removed the 'Show Relationships' menu item on the relationship tree type, as it was showing the relationships in the edit frame already.

Divided the 'Show Relationships' menu item on the table level into 'Show Relationships From' and 'Show Relationships To'.

One last 'Copied to clipboard' dialog removed.

Version 12.2.1 was released on 30-June-2026.


Known Issues


In version 11.0.0 I introduced a check against used imports. If you have an import from another jar file that has the same package name, the 'Show Usage' dialog will incorrectly list it as being in use.

e.g. I have two jars, both have the same utilities package so both are flagged as being in use.

I cannot get the JTree to expand to and show the selection of a new node. It selects the new node as the Edit Panel is set correctly it's just the JTree that is failing to show it.

I use Tree Types which extend AbstractTreeType which, in turn, extends DefaultMutableTreeNode.
For example, Adding a new Relationship builds the RealationshipTreeType, adds it to the tree model and calls the selection code inside a SwingUtilities.invokeLater call and, yet, it doesn't seem to work.

Thus:

private void newRelationship() {
    RelationshipTreeType relationshipTreeType = getTreeType().createNewRelationship();
    if (relationshipTreeType != null) {
        RelationshipTypeTreeType parentNode = getTreeType();
        DefaultTreeModel treeModel = getTreeModel();
        treeModel.insertNodeInto(relationshipTreeType, parentNode, parentNode.getChildCount() - 1);
        TreePath path = new TreePath(relationshipTreeType);
        SwingUtilities.invokeLater(() -> {
            getTree().setSelectionPath(path);
            getTree().expandPath(path.getParentPath());
            getTree().scrollPathToVisible(path);
        });
    }
}

Source: README.md, updated 2026-06-30