Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 package persist.gettingStarted; 2 3 import com.sleepycat.persist.model.Entity; 4 import com.sleepycat.persist.model.PrimaryKey; 5 import static com.sleepycat.persist.model.Relationship.*; 6 import com.sleepycat.persist.model.SecondaryKey; 7 8 @Entity 9 public class Inventory { 10 11 @PrimaryKey 13 private String sku; 14 15 @SecondaryKey(relate=MANY_TO_ONE) 16 private String itemName; 17 18 private String category; 19 private String vendor; 20 private int vendorInventory; 21 private float vendorPrice; 22 23 public void setSku(String data) { 24 sku = data; 25 } 26 27 public void setItemName(String data) { 28 itemName = data; 29 } 30 31 public void setCategory(String data) { 32 category = data; 33 } 34 35 public void setVendorInventory(int data) { 36 vendorInventory = data; 37 } 38 39 public void setVendor(String data) { 40 vendor = data; 41 } 42 43 public void setVendorPrice(float data) { 44 vendorPrice = data; 45 } 46 47 public String getSku() { 48 return sku; 49 } 50 51 public String getItemName() { 52 return itemName; 53 } 54 55 public String getCategory() { 56 return category; 57 } 58 59 public int getVendorInventory() { 60 return vendorInventory; 61 } 62 63 public String getVendor() { 64 return vendor; 65 } 66 67 public float getVendorPrice() { 68 return vendorPrice; 69 } 70 71 } 72 73
| Popular Tags
|