Tomato

Tomato is a zero dependency java ORM persistence library.

Download .zip Download .tar.gz View on GitHub

Tomato is the ORM framework for the modern development world.

    When using Tomato...
  • you will never generate nor write entity classes.
  • You will not write repository classes.
  • You will not write service classes.
  • You will not need to configure a persistence context.
  • You will not need to work with EntityManager instances.

Tomato reduces the size and complexity of your data access code by at least 98%.

    Gone are all those cumbersome...
  • @Entity classes
  • @Repository classes and interfaces
  • @Service classes
  • @Controllers classes

Tomato provides the only Entity class you need, as well as the only REST service you need to do all your database work.

  • Tomato is also completely thread safe without any modifications
  • Tomato is a great choice for embedded systems - nothing is smaller or faster

Getting Started!

  1. Download the Tomato source.
  2. Unpack it into a new Java Project in whatever IDE you desire.
  3. Modify the EntityDataSource class so that it initializes a properly configured DataSource instance for the database you desire Tomato to connect to.
  4. Build the project into a jar file.
  5. Include the jar in the project of your choice.
  6. Check out the code in the EntityTest.java class. This includes samples for how to use all of Tomatos functionality.

How easy is it, really?

The following is the code needed to retrieve all records in any table...
Entity e = Entity.createEntityOrView("Schema.tableName");
e.setFilter("1=1");
e.load();
Want to load and save a hierarchy? Like say, employees and their addresses? The following will load all employee records with nested addresses under each. Entity e = Entity.createEntityOrView("schema.employee"); e.setFilter("1=1"); ChildData cd = new ChildData("schema.address", "address_id", false, false); e.getChildList().add(cd); e.load();

Are you doing web form development?

an also download the companion project Basil. Basil provides dynamic forms and tables for any Tomato entity instance. Basil is written in Angular 1.5 and provides for simply injection of custom HTML where ever needed in a dynamic form or table.

Authors and Contributors

Tomato was created by Rodney P. Barbati.
He has felt that since we have been reading and writing data from tables for decades, it should be easier. Now it is.

Support or Contact

Feel free to contact me with questions, feature requests or just to let me know how Tomato is working for you!
rodney.barbati@gmail.com.