I have a table
Table ItemLink - long itemLinkId (PK) - varchar itemType (TOY, FURNITURE, CLOTHING) - long itemId
I have three tables
Table Furniture - long itemId - ....
Table Clothing - long itemId
Table Toy - long itemId
--------------------
So I created a class Class ItemLink private Long itemLinkId; private String itemType; private Item item
Interface Item private getItemId() private setItemId()
Class Funiture implements Item private Long itemId
Class Toy implements Item private Long itemId
Class Clothing implements Item private Long itemId
how would i map the ItemLink class to the ItemLink table ???
|