sormula simple (easy) object relational mapping
Zero Configuration:
Sormula never needs configuration files, SQL, inheritance, or interfaces. Annotations are optional when:
  • Table name and class name are the same
  • Column names and class field names are the same
  • First field of class corresponds to primary column
  • All fields in class are columns in table

You can override the defaults as needed with annotations.

Example:
Database database = new Database(connection);
Table<Inventory> inventoryTable = database.getTable(Inventory.class);

// insert
Inventory inventory = new Inventory();
inventory.setPartNumber(partNumber);
inventory.setManufacturerId("Acme");
inventory.setQuantity(99);
inventoryTable.insert(inventory);

// select
inventory = inventoryTable.select(partNumber);

// update
inventory.setQuantity(1000);
inventoryTable.update(inventory);

// delete
inventoryTable.delete(inventory);
INVENTORY DDL
CREATE TABLE INVENTORY
(
    PARTNUMBER INTEGER PRIMARY KEY,
    QUANTITY INTEGER,
    MANUFACTURERID VARCHAR(40)
)
Inventory.java
public class Inventory
{
    int partNumber;
    int quantity;
    String manufacturerId;
    
    
    public int getPartNumber()
    {
        return partNumber;
    }
    public void setPartNumber(int partNumber)
    {
        this.partNumber = partNumber;
    }
    
    
    public int getQuantity()
    {
        return quantity;
    }
    public void setQuantity(int quantity)
    {
        this.quantity = quantity;
    }
    
    
    public String getManufacturerId()
    {
        return manufacturerId;
    }
    public void setManufacturerId(String manufacturerId)
    {
        this.manufacturerId = manufacturerId;
    }
}
See ZeroConfigExample.java in the Zero Config Example.