开发者

JpaInspector cannot override inspectProperty()

开发者 https://www.devze.com 2022-12-23 15:39 出处:网络
I want to use JpaInspector class that is written for Metawidget. However when I insert this class into my Java project in Netbeans 6.8, It gives an error for inspectProperty() method of JpaInspector c

I want to use JpaInspector class that is written for Metawidget. However when I insert this class into my Java project in Netbeans 6.8, It gives an error for inspectProperty() method of JpaInspector class, "method does not override or implement a method from supertype". Does it mean that parent c开发者_如何转开发lass of JpaInspector, that is BaseObjectInspector, does not have such a method? Or what should I do to use JpaInspector in my project?

Update

Ok, I import the package "org.metawidget.inspector.jpa.JpaInspector"; however, although some fields of my entity class are set as nullable = false, the stars are not seen. Why is it?


Gulcan,

I'm confused: are you inserting the source code for JpaInspector into your project? I'm unclear why you would want to do that. You can add JpaInspector to Metawidget by using metawidget.xml and CompositeInspector. For example:

    <inspector>
        <compositeInspector>
            <inspectors>
                <array>
                    <metawidgetAnnotationInspector />
                    <jpaInspector />            
                </array>
            </inspectors>

Or you can add it programmatically. In neither case do you need the JpaInspector source code.

Regards,

Richard.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号