OrmFactory is a visual desktop data model editor integrated with your ORM. It is tool for single developers and teams, data architect or devops.
What OrmFactory is
- Visual database concept design tool
- Source code generator for your own ORM
- Data management system
- Everyday tool for software developers
What source code generator is
For example, your database looks like sakila database:And your ORM is hibernate. You can run hibernate generator and get these source code files:
Category.java
package com.example.servingwebcontent.model;
import jakarta.persistence.*;
import java.util.List;
@Entity
@Table(name = "category")
public class Category {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name = "category_id")
private Integer categoryId;
@Column(name = "name")
private String name;
@Column(name = "last_update")
private java.time.LocalDateTime lastUpdate;
@OneToMany(mappedBy = "categoryId", fetch = FetchType.LAZY)
private List<FilmCategory> categoryFilmCategories;
public void setCategoryId(Integer categoryId) {
this.categoryId = categoryId;
}
public Integer getCategoryId() {
return categoryId;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setLastUpdate(java.time.LocalDateTime lastUpdate) {
this.lastUpdate = lastUpdate;
}
public java.time.LocalDateTime getLastUpdate() {
return lastUpdate;
}
public void setCategoryFilmCategories(List<FilmCategory> categoryFilmCategories) {
this.categoryFilmCategories = categoryFilmCategories;
}
public List<FilmCategory> getCategoryFilmCategories() {
return categoryFilmCategories;
}
}
CategoryRepository.java
package com.example.servingwebcontent.model;
import org.springframework.data.repository.CrudRepository;
import com.example.servingwebcontent.model.Category;
public interface CategoryRepository extends CrudRepository<Category, Integer> {
}
FilmCategory.java
package com.example.servingwebcontent.model;
import jakarta.persistence.*;
import com.example.servingwebcontent.model.FilmCategoryId;
@Entity
@Table(name = "film_category")
@IdClass(FilmCategoryId.class)
public class FilmCategory {
@Id
@Column(name = "film_id")
private Integer filmId;
@Id
@Column(name = "category_id")
private Integer categoryId;
@Column(name = "last_update")
private java.time.LocalDateTime lastUpdate;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "category_id", insertable=false, updatable=false)
private Category category;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "film_id", insertable=false, updatable=false)
private Film film;
public void setFilmId(Integer filmId) {
this.filmId = filmId;
}
public Integer getFilmId() {
return filmId;
}
public void setCategoryId(Integer categoryId) {
this.categoryId = categoryId;
}
public Integer getCategoryId() {
return categoryId;
}
public void setLastUpdate(java.time.LocalDateTime lastUpdate) {
this.lastUpdate = lastUpdate;
}
public java.time.LocalDateTime getLastUpdate() {
return lastUpdate;
}
public void setCategory(Category category) {
this.category = category;
}
public Category getCategory() {
return category;
}
public void setFilm(Film film) {
this.film = film;
}
public Film getFilm() {
return film;
}
}
FilmCategoryId.java
package com.example.servingwebcontent.model;
public class FilmCategoryId {
private Integer filmId;
public void setFilmId(Integer filmId) {
this.filmId = filmId;
}
public Integer getFilmId() {
return filmId;
}
private Integer categoryId;
public void setCategoryId(Integer categoryId) {
this.categoryId = categoryId;
}
public Integer getCategoryId() {
return categoryId;
}
}
FilmCategoryRepository.java
package com.example.servingwebcontent.model;
import org.springframework.data.repository.CrudRepository;
import com.example.servingwebcontent.model.FilmCategory;
public interface FilmCategoryRepository extends CrudRepository<FilmCategory, FilmCategoryId> {
}
Film.java
package com.example.servingwebcontent.model;
import jakarta.persistence.*;
import java.util.List;
@Entity
@Table(name = "film")
public class Film {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name = "film_id")
private Integer filmId;
@Column(name = "title")
private String title;
@Column(name = "description")
private String description;
@Column(name = "release_year")
private Integer releaseYear;
@Column(name = "language_id")
private Integer languageId;
@Column(name = "original_language_id")
private Integer originalLanguageId;
@Column(name = "rental_duration")
private Integer rentalDuration;
@Column(name = "rental_rate")
private java.math.BigDecimal rentalRate;
@Column(name = "length")
private Integer length;
@Column(name = "replacement_cost")
private java.math.BigDecimal replacementCost;
@Column(name = "rating")
private String rating;
@Column(name = "special_features")
private String specialFeatures;
@Column(name = "last_update")
private java.time.LocalDateTime lastUpdate;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "original_language_id", insertable=false, updatable=false)
private Language originalLanguage;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "language_id", insertable=false, updatable=false)
private Language language;
@OneToMany(mappedBy = "filmId", fetch = FetchType.LAZY)
private List<FilmActor> filmFilmActors;
@OneToMany(mappedBy = "filmId", fetch = FetchType.LAZY)
private List<FilmCategory> filmFilmCategories;
@OneToMany(mappedBy = "filmId", fetch = FetchType.LAZY)
private List<Inventory> filmInventories;
public void setFilmId(Integer filmId) {
this.filmId = filmId;
}
public Integer getFilmId() {
return filmId;
}
public void setTitle(String title) {
this.title = title;
}
public String getTitle() {
return title;
}
public void setDescription(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
public void setReleaseYear(Integer releaseYear) {
this.releaseYear = releaseYear;
}
public Integer getReleaseYear() {
return releaseYear;
}
public void setLanguageId(Integer languageId) {
this.languageId = languageId;
}
public Integer getLanguageId() {
return languageId;
}
public void setOriginalLanguageId(Integer originalLanguageId) {
this.originalLanguageId = originalLanguageId;
}
public Integer getOriginalLanguageId() {
return originalLanguageId;
}
public void setRentalDuration(Integer rentalDuration) {
this.rentalDuration = rentalDuration;
}
public Integer getRentalDuration() {
return rentalDuration;
}
public void setRentalRate(java.math.BigDecimal rentalRate) {
this.rentalRate = rentalRate;
}
public java.math.BigDecimal getRentalRate() {
return rentalRate;
}
public void setLength(Integer length) {
this.length = length;
}
public Integer getLength() {
return length;
}
public void setReplacementCost(java.math.BigDecimal replacementCost) {
this.replacementCost = replacementCost;
}
public java.math.BigDecimal getReplacementCost() {
return replacementCost;
}
public void setRating(String rating) {
this.rating = rating;
}
public String getRating() {
return rating;
}
public void setSpecialFeatures(String specialFeatures) {
this.specialFeatures = specialFeatures;
}
public String getSpecialFeatures() {
return specialFeatures;
}
public void setLastUpdate(java.time.LocalDateTime lastUpdate) {
this.lastUpdate = lastUpdate;
}
public java.time.LocalDateTime getLastUpdate() {
return lastUpdate;
}
public void setOriginalLanguage(Language originalLanguage) {
this.originalLanguage = originalLanguage;
}
public Language getOriginalLanguage() {
return originalLanguage;
}
public void setLanguage(Language language) {
this.language = language;
}
public Language getLanguage() {
return language;
}
public void setFilmFilmActors(List<FilmActor> filmFilmActors) {
this.filmFilmActors = filmFilmActors;
}
public List<FilmActor> getFilmFilmActors() {
return filmFilmActors;
}
public void setFilmFilmCategories(List<FilmCategory> filmFilmCategories) {
this.filmFilmCategories = filmFilmCategories;
}
public List<FilmCategory> getFilmFilmCategories() {
return filmFilmCategories;
}
public void setFilmInventories(List<Inventory> filmInventories) {
this.filmInventories = filmInventories;
}
public List<Inventory> getFilmInventories() {
return filmInventories;
}
}
FilmRepository.java
package com.example.servingwebcontent.model;
import org.springframework.data.repository.CrudRepository;
import com.example.servingwebcontent.model.Film;
public interface FilmRepository extends CrudRepository<Film, Integer> {
}
Plugins repository
You can find source code of generator plugins for OrmFactory on Github page under MIT license. Also you can use one of them as example and template for building source generator for your ORM.
How it works
OrmFactory uses model-first approach instead of code-first or database-first. Model-first allows you to store additional information about data structure like virtual foreign keys (including multitable FK), type conversion hints, named-in-code rows etc.
Just edit your db structure and run all generators by pressing F5. Yes, you can use multiple generators on same project.
Supported databases
Database | Status |
---|---|
MySql | Supported |
PostgreSQL | Planned nov'24 |
MSSQL | Planned feb'25 |
Oracle | Planned apr'25 |
Integrated light data management system
Integrated data management system allows you to edit stored data in same place where you edit data structure.
Advantages
- Fast data fetch. Warning: fast data fetch means fast memory consumption.
- Low memory consumption.
- Fast data grid. Grid can scroll millions lines without freezing (if you have enough memory). No matter how many columns.
- Intelligent autocomplete system. Autocomplete based on data model.
- Multiline editor with XML and JSON syntax highlighting
- "Prettify-on-the-fly" feature for minified JSON
- Spatial data types support