This blog is about Java (advanced Java topics like Reflection, Byte Code transformation, Code Generation), Maven, Web technologies, Raspberry Pi and IT in general.

Montag, 1. Juni 2015

spBee - generate the model classes

If you don't know spBee then please read my other blog post first. But if you are in hurry then here is a very short description of spBee: it generates the code to execute stored procedures and to map the result into your model classes. This is done by writing the model classes, interfaces and some annotations.

It's cool and it works very well. But there's still one thing that bothered me because it's just boring: the creation of the model classes. Therefore I have written a quite simple program. This program will execute your stored procedure with the your arguments, read the result and then creates the model classes. It's basic, but it works fine. With a little work you could optimize it so that it generates the Java files which you can put into your project without any additional work.
The program just uses the ResultSetMetaData and the JCodeMode. There is also an unit test to demonstrate the usage of the program.

1 Kommentar:

  1. First on our list of the best on-line playing sites for South African gamers is none other than PlayOJO. It begins with all gamers putting in a boot amount, an agreed whole play which sits in the pot. Next, want to|they have 안전바카라 to} determine to name or raise, comparable to|similar to} poker. Raised cash goes into the pot, which will increase the game’s whole. The winner of the pot is particular person who|the one that|the one who} stays in until the hand is finished or goes to the person with the best hand. Craps, a recreation typically viewed as having a greater participant edge than most different table games, gained $407.7 million on 319 tables, an increase of 54.four p.c over final yr.

    AntwortenLöschen