I'm specifically using the Xdoclet Ant task to generate my repository file from annotations.
So, I have a couple of issues. Let's take this step by step I guess.
This is basically what my inheritance tree looks like.
/**
* @ojb.field name="versionNumber"
* column="VER_NBR"
* jdbc-type="BIGINT"
*/
public interface BusinessObject extends Serializable {...}/**
* @ojb.field name="documentHeaderId"
* column="DOC_HDR_ID"
* jdbc-type="BIGINT"
* primarykey="true"
* @ojb.reference name="documentHeader"
* class-ref="org.my.bo.DocumentHeader"
* foreignkey="documentHeaderId"
* auto-retrieve="true"
* auto-update="object"
* auto-delete="object"
*/
public interface Document extends BusinessObject {...}/**
* @ojb.class include-inherited="true"
*/
public interface SubtypeOfDocument extends Document {...}/**
* @ojb.class include-inherited="true"
*/
public class ConcreteSubtypeOfDocument implements SubtypeOfDocument {
private DocumentHeader documentHeader;
}---
When I run the ojb xdoclet Ant task on the source path in which both interfaces exist I get:
xdoclet.XDocletException: Could not find the class Document on the classpath while checking the reference super in class org.my.bo.Document.
The source tree IS compiled to the specified location.
What have I done wrong?
TIA
Laran Evans
---
Thomas Dudziak wrote:
On Mon, 28 Mar 2005 14:24:24 -0500, Laran Evans <[EMAIL PROTECTED]> wrote:
Am I correct in my interpretation that:
When A extends B then A holds a Reference to A. When A implements B then A is an Extent of B.
???
I'm having a bear of a time getting my inheritance working properly, especially when "class C extends B implements A".
Any advice would be appreciated.
I'm not entirely sure that I understand what you're asking here. Both "extends" and "implements" are Java keywords used for the same thing: inheritance. They differ only in that extends can only be used with classes whereas implements can only be used with interfaces. E.g., when A extends B then B must be a class (though it might be abstract) and when A implements C then C must be an interface.
OJB does not care either way, for both you would use "extents" (note the difference to extends) which is the inverse, i.e. you would say that A has an extent B if B extends A (when A is a class) or B implements A (when A is an interface). You can have class-descriptors for both interfaces and classes, you only have to be careful when OJB tries to instantiate interfaces/abstract classes in which case you have to use factory-class+factory-method to define the factory method that creates the concrete instance.
Tom
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
