如何从 ORMLite 的 sqlite 数据库生成 Java 类代码 [英] how to generate a java class code from a sqlite database for ORMLite
问题描述
给定一个 sqlite 数据库作为输入,我想知道如何生成一个 ORMLite java 类与关联的数据库.非常感谢.
Given a sqlite database as input, I want to know how can i can generate an ORMLite java class that map with the associated database. Many thanks.
推荐答案
你可以试试 Telosys Tools,一个用于代码生成的 Eclipse 插件使用现有数据库使用可自定义的 Velocity 模板
You could try Telosys Tools, an Eclipse plugin for code generation working from an existing database with customizable Velocity templates
请参阅:https://sites.google.com/site/telosystools/
GitHub 上提供了一组用于 JPA 的模板:
A set of templates is available on GitHub for JPA :
//github.com/telosys-tools-community/jpa-templates-TT206-v2
//github.com/telosys-tools-community/jpa-templates-TT206-v2
JPA 的 Java 类与 ORMLite 非常接近,因此可以调整模板为了生成 ORMLite java 类
A Java class for JPA is very near to ORMLite so it's possible to adapt the templates in oder to generate ORMLite java classes
Spring MVC 和 JPA 的全球教程:
A global tutorial for Spring MVC and JPA :
//sites.google.com/site/telosystutorial/springmvc-jpa-springdatajpa(你可以只考虑 JPA 包)
//sites.google.com/site/telosystutorial/springmvc-jpa-springdatajpa (you can just consider the JPA bundle)
这篇关于如何从 ORMLite 的 sqlite 数据库生成 Java 类代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!