Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-09-22 | 4.6 kB | |
Totals: 1 Item | 4.6 kB | 0 |
NOTE:
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.
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 (which will be daomedgegen-10.10.0-31102025.zip when it is released) 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.
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 yuou 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
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 10.10.0 changelog
Removed "Object Browser" as there is plenty of how to connect examples elsewhere and it seemed pointless.
Removed all references to this being a rewrite as everybody either knows already or doesn't care.
Minor refactoring on password and username.
The connector will guess the required adapter from the driver name if you haven't set it.
The connector will guess the required driver name from the url if you haven't set it.
It was annoying to attempt to add a reverse relationship only to be told it is already there. Now the reverse relationship menus are enabled/disabled as required with a tool tip to say why they are set that way.
Added toString() and compareTo() methods on the BaseDatabaseObject. This is why the minor version number has been incremented.
Had another go at the index out of bounds issue when adding an interface and again after the change it worked, but it has done that before.
Fixed issue with data dictionary changes on the individual panels (column, relationship and table) not being reflected back in the data dictionary panel.
Version 10.10.0 will be released 31st October 2025.