Class Shape
- java.lang.Object
-
- ejava.examples.orm.inheritance.annotated.BaseObject
-
- ejava.examples.orm.inheritance.annotated.Shape
-
@Entity public abstract class Shape extends BaseObject
This class provides an example of mixing two inheritance stratgies; non-entity inheritance and join. The parent of this class is a non-entity and will be stored inside this table. Since this class has also defined the inheritance stratgy to be JOIN, all sub-classes will have their own tables and join with this table to form an object.
-
-
Constructor Summary
Constructors Constructor Description Shape()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetId()intgetPosx()intgetPosy()protected voidsetId(long id)voidsetPosx(int posx)voidsetPosy(int posy)StringtoString()-
Methods inherited from class ejava.examples.orm.inheritance.annotated.BaseObject
getName, getVersion, setVersion
-
-
-
-
Method Detail
-
getId
public long getId()
- Overrides:
getIdin classBaseObject
-
setId
protected void setId(long id)
- Overrides:
setIdin classBaseObject
-
getPosx
public int getPosx()
-
setPosx
public void setPosx(int posx)
-
getPosy
public int getPosy()
-
setPosy
public void setPosy(int posy)
-
toString
public String toString()
- Overrides:
toStringin classBaseObject
-
-