I'm looking for the method to generate stored procedures in sql to Hibernate POJOs classes in IntelIJ, such as
@NamedStoredProcedureQuery(name = "addEmployee",
procedureName = "postEmployeeElement",
resultClasses = Employee.class,
parameters = {
@StoredProcedureParameter( name = "employeeID", type = Integer.class, mode = ParameterMode.IN ),
@StoredProcedureParameter(name = "firstName", type = String.class, mode = ParameterMode.IN ),
@StoredProcedureParameter(name = "lastName", type = String.class, mode = ParameterMode.IN ),
@StoredProcedureParameter( name = "address",type = String.class,mode = ParameterMode.IN )}
)
I'm really need, but i can't search any way to resolve.
You can use IDE scripting capabilities to generate POJO classes from database objects. See example scripts and video . Some more information in related blog post . Eg when you select a procedure in Database tool window then in SELECTION
object you should have the Iterable<com.intellij.database.model.DasRoutine>
. The API for the objects you can see in openapi.jar
in <IDE_HOME>\\lib
directory.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.