Class Shape

  • Direct Known Subclasses:
    Circle, Rectangle

    @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.
    • Field Detail

      • posx

        private int posx
      • posy

        private int posy
    • Constructor Detail

      • Shape

        public Shape()
    • Method Detail

      • setId

        protected void setId​(long id)
        Overrides:
        setId in class BaseObject
      • getPosx

        public int getPosx()
      • setPosx

        public void setPosx​(int posx)
      • getPosy

        public int getPosy()
      • setPosy

        public void setPosy​(int posy)