Class Product
- java.lang.Object
-
- ejava.examples.orm.inheritance.annotated.Product
-
@Entity public abstract class Product extends Object
This class provides an example base class in a single table inheritance strategy. In this case, a single table is defined to hold the properties of all sub-classes. A discriminator field is necessary to denote the type of each row in the table. Note that the primary key is being generated here since this class definition is shared among the sub-classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description doublegetCost()longgetId()abstract StringgetName()voidsetCost(double cost)StringtoString()
-