Java Reference
In-Depth Information
PRODUCT , which has a many-to-one relationship with CATEGORY and a one-to-
many relationship with ORDER_DETAIL
CATEGORY , which has a one-to-many relationship with PRODUCT
ORDER_DETAIL , which has a many-to-one relationship with PRODUCT and
CUSTOMER_ORDER (it is the join table between those two tables)
CUSTOMER_ORDER ,
which
has
a
one-to-many
relationship
with
ORDER_DETAIL and
a
many-to-one
relationship
with PERSON and
ORDER_STATUS
ORDER_STATUS ,
which
has
a
one-to-many
relationship
with
CUSTOMER_ORDER
The entity classes that correspond to these tables are as follows:
Person , which defines attributes common to customers and administrators. These
attributes are the person's name and contact information, including street and email
addresses. The email address has a Bean Validation annotation to ensure that the
submitted data is well-formed. The generated table for Person entities also has a
DTYPE field that represents the discriminator column. Its value identifies the sub-
class ( Customer or Administrator ) to which the person belongs.
Customer , a specialization of Person with a specific field for Customer-
Order objects.
Administrator , a specialization of Person with fields for administration
privileges.
Groups , which represents the group ( USERS or ADMINS ) to which the user be-
longs.
Product , which defines attributes for products. These attributes include name,
price, description, associated image, and category.
Category , which defines attributes for product categories. These attributes in-
clude a name and a set of tags.
CustomerOrder , which defines attributes for orders placed by customers. These
attributes include an amount and a date, along with id values for the customer and
the order detail.
OrderDetail , which defines attributes for the order detail. These attributes in-
clude a quantity, along with id values for the product and the customer.
OrderStatus , which defines a status attribute for each order.
Search WWH ::




Custom Search