diff --git a/pom.xml b/pom.xml index a1d1746..2a01c6d 100644 --- a/pom.xml +++ b/pom.xml @@ -20,11 +20,8 @@ org.apache.maven.plugins maven-surefire-plugin 2.22.1 - - none + true - false - 1 diff --git a/src/test/java/jcache/L2C/test/entity/Item.java b/src/test/java/jcache/L2C/test/entity/Item.java deleted file mode 100644 index 3e32810..0000000 --- a/src/test/java/jcache/L2C/test/entity/Item.java +++ /dev/null @@ -1,63 +0,0 @@ -package jcache.L2C.test.entity; - -import org.hibernate.annotations.Cache; -import org.hibernate.annotations.CacheConcurrencyStrategy; - -import javax.persistence.*; -import java.util.ArrayList; -import java.util.List; - -@Entity -@Cache(region = "Item-Cache",usage = CacheConcurrencyStrategy.READ_WRITE) -public class Item { - - @Id - @Column(name = "ITEM_ID") - private int id; - - @Column(name = "ITEM_NAME", nullable = false) - private String name; - - @OneToMany(cascade = CascadeType.ALL, mappedBy = "item") - @Cache(region = "SubItems-Collection-Cache",usage = CacheConcurrencyStrategy.READ_WRITE) - private List subItems = new ArrayList(); - - public List getSubItems() { - return subItems; - } - - public void setSubItems(List subItems) { - this.subItems = subItems; - - } - - public Item(String name, int id) { - this.name = name; - this.id = id; - } - - public Item() { - } - - public Item addSubItem(SubItem s){ - this.subItems.add(s); - return this; - } - - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/src/test/java/jcache/L2C/test/entity/SubItem.java b/src/test/java/jcache/L2C/test/entity/SubItem.java deleted file mode 100644 index 3cab5da..0000000 --- a/src/test/java/jcache/L2C/test/entity/SubItem.java +++ /dev/null @@ -1,67 +0,0 @@ -package jcache.L2C.test.entity; - -import org.hibernate.annotations.CacheConcurrencyStrategy; -import org.hibernate.annotations.Cache; - -import javax.persistence.*; - - -@Entity -@Cache(region = "SubItem-Cache",usage = CacheConcurrencyStrategy.READ_WRITE) -public class SubItem { - - @Id - @Column(name = "SUBITEM_ID") - private int id; - - @Column(name = "SUBITEM_NAME", nullable = false) - private String name; - - - @ManyToOne - @JoinColumn(name = "ITEM_ID") - private Item item; - - public SubItem(int id, String name, Item item) { - this.id = id; - this.name = name; - this.item = item; - } - - public Item getItem() { - return item; - } - - public void setItem(Item item) { - this.item = item; - } - - public SubItem() { - } - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - @Override - public String toString() { - return "SubItem{" + - "id=" + id + - ", name='" + name + '\'' + - ", item=" + item + - '}'; - } -}