简体   繁体   English

java 属性的存储过程

[英]Stored procedure to java attributes

I have a bunch of Sybase SP's for CRUD operations that I need to create services for in the mid-tier layer.我有一堆用于 CRUD 操作的 Sybase SP,我需要在中间层创建服务。

All the SP's are in place but the mid-tier has to be built from scratch.所有 SP 都已就位,但中层必须从头开始构建。

Is there an easy way or a tool that allows you to convert stored procedure parameters into java class attributes?有没有一种简单的方法或工具可以让您将存储过程参数转换为 java class 属性?

For example:例如:

create proc insertEmployee( @id int, @floor int )

to

public class Employee{

private int id;
private int floor;
}

etc... ETC...

Thanks!谢谢!

I don't know about such tool.我不知道这样的工具。 You can write your own generator using database metadata info: Connection.getMetadata()您可以使用数据库元数据信息编写自己的生成器: Connection.getMetadata()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM