Skip to content

lordscales91/Simple-POJO-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple POJO Generator

You can generate the POJOs from the Excel ".xlsx" File and from database. The title of the first line is considered as the class attribute and the type of the attribute is determined by the value under of each column

Merged the commits from chanlen's fork

Usage

Generate from Excel ".xlsx" File

-gen xlsx -i the input ".xlsx" file [-o output directory]

e.g. java -jar Simple-POJO-Generator.jar -gen xlsx -i /home/chanllen/sample.xlsx -o /home/chanllen/tmp

Generate from Database

-gen db -host database_url(JDBC Conn String) [-u user] [-p passwd] [-drv jdbc.driver][-tables table1,table2,...]
You must specify the host, it must be a valid JDBC Connection string.
User defaults to "root", password defaults to an empty string.
This is designed to work with MySQL, but you can use it for other database systems, in order to do it you must specify the full Class name of the Driver (and it must be loaded in the classpath).
If you don't want to generate POJOs for all the tables of the Schema specified you can provide a comma-separated list of table names(no spaces).

About

This is a simple program that uses JDBC to generate simple POJOs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages