使用 hypejaxb 生成继承映射
我正在使用 hypejaxb3,并试图找到添加继承的语法。例如我想定义关系的 xsd 类 Circle 继承 Shape 。 我可以在 https://wikis.sun.com/display/GlassFish/Hyperjaxb3Reference 找到 hyperjaxb 自定义指南 但找不到定义继承的具体步骤。
I am using hypejaxb3, and trying to find the syntax for adding the inheritance. e.g i wants to define the xsd for the relation
class Circle inherits Shape .
I could find the hyperjaxb customization guide at https://wikis.sun.com/display/GlassFish/Hyperjaxb3Reference but couldnt find specific steps for the defining the inheritance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用 XML Schema 复杂类型扩展机制:
HJ3 将生成 Circle,它将扩展 Shape - 以及适当的 JPA 映射,包括继承注释。
Just use the XML Schema complex type extension mechanism:
HJ3 will generate Circle which would extend Shape - as well as appropriate JPA mappings, including inheritance annotations.