如何从 ORMLite 的 sqlite 数据库生成 Java 类代码 [英] how to generate a java class code from a sqlite database for ORMLite

查看:40
本文介绍了如何从 ORMLite 的 sqlite 数据库生成 Java 类代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一个 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆