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 long
getId()
int
getPosx()
int
getPosy()
protected void
setId(long id)
void
setPosx(int posx)
void
setPosy(int posy)
String
toString()
-
Methods inherited from class ejava.examples.orm.inheritance.annotated.BaseObject
getName, getVersion, setVersion
-
-
-
-
Method Detail
-
getId
public long getId()
- Overrides:
getId
in classBaseObject
-
setId
protected void setId(long id)
- Overrides:
setId
in 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:
toString
in classBaseObject
-
-