Java Reference
In-Depth Information
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the factory
*/
public Factory getFactory() {
return factory;
}
/**
* @param factory the factory to set
*/
public void setFactory(Factory factory) {
this.factory = factory;
}
}
The WidgetA entity class is a sub-class of Product , and therefore all attributes that are part of the Product entity
can be utilized within the WidgetA entity. This entity class also defines the color attribute, which maps to the column
within the PRODUCT database table of the same name. The @DiscriminatorValue annotation denotes the value of the
PRODUCT_TYPE database column for this type of entity. Since it is a sub-class of Product , the @DiscriminatorValue
helps to determine the “category” for this relation.
 
Search WWH ::




Custom Search