Sql2Class 1.02
Makes data classes and data class control objects from database tables
Sql2Class is a console application which generates data objects (bean-like classes) from a TABLE which is accessible through a JDBC connection. It also provides the DataC control classes for these tables supplying an easy, low-maintenance way of interacting with a database.
usage
You can run Sql2Class straight from the command prompt. Just go to the directory you have installed it in and run:
java -jar Sql2Class.jar -c [database-driver-jar] -d [DriverClassName] -r [URLConnectionString] -u [Username] -p [Password] -t [Table]
For example:
java -Xbootclasspath/a:/usr/java/lib/ojdbc6.jar -jar Sql2Class.jar -d oracle.jdbc.driver.OracleDriver -r jdbc:oracle:thin:@db.acme.com:1521:ora -u scott -p tiger -t EMP
To make life a little bit easier I usually put the driver, url, user, location and package in a sql2class.properties file placed in
the same directory:
driver=oracle.jdbc.driver.OracleDriver
url=jdbc\:oracle\:thin\:@db.acme.com\:1521\:ora
user=scott
location=/project/AcmeApp/src
package=com.acme.app.data
and run it like this:
java -Xbootclasspath/a:/usr/java/lib/ojdbc6.jar -jar Sql2Class.jar -t EMP -p tiger
All parameters can be defined in the sql2class.properties Look for all the parameters you can define with Sql2Class at the description of Sql2ClassConsole in the javadoc
language
java jdk 8+
dependencies
references
files
| Name | Version | Date | binary | tar | source |
|---|---|---|---|---|---|
| Sql2Class | 1.02 | Dec 9, 2025 | Sql2Class-1.02.zip | Sql2Class-1.02.tar.gz | Sql2Class-src-1.02.zip |
| Sql2Class | 1.05 | Dec 9, 2025 | Sql2Class-1.05.zip | Sql2Class-1.05.tar.gz | Sql2Class-src-1.05.zip |
changelog
1.02
- All class names have to be supplied as Strings, while passing the class names as Classes suggests the classes should be in the classpath while writing it. Which is not the case
- Added support for finally, static and synchronized blocks
- Fixed small problem with writing Literals
0.20
- Added javadoc and unit tests for all classes
- Fixed Literal which was used the other way around, all non-literal Strings required Literal
- Some minor bugfixing in formatting
0.10
- First creation as independent product