X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjshopcore%2Fmodel%2Fcategory%2FProductCategory.java;fp=src%2Forg%2Fmxchange%2Fjshopcore%2Fmodel%2Fcategory%2FProductCategory.java;h=721e638fef6e124c198b8e8a7bf4e723a71f451f;hb=ad23d8fac0832b79845eab940576fbe86fe8b9d1;hp=f02fb937136937d3c425c39ec19fb55d8b22019b;hpb=4f6a2d93ca4c824088efd04937dcc9e9eac089fc;p=jcustomer-core.git diff --git a/src/org/mxchange/jshopcore/model/category/ProductCategory.java b/src/org/mxchange/jshopcore/model/category/ProductCategory.java index f02fb93..721e638 100644 --- a/src/org/mxchange/jshopcore/model/category/ProductCategory.java +++ b/src/org/mxchange/jshopcore/model/category/ProductCategory.java @@ -50,13 +50,6 @@ public class ProductCategory implements Category, Comparable { @Column (name = "category_id", length = 20, nullable = false) private Long categoryId; - /** - * Parent category - */ - @JoinColumn (name = "parent_id") - @OneToOne (targetEntity = ProductCategory.class, cascade = CascadeType.MERGE) - private Category parentCategory; - /** * Title of category */ @@ -64,6 +57,13 @@ public class ProductCategory implements Category, Comparable { @Column (name = "category_title", length = 100, nullable = false, unique = true) private String categoryTitle; + /** + * Parent category + */ + @JoinColumn (name = "parent_id") + @OneToOne (targetEntity = ProductCategory.class, cascade = CascadeType.MERGE) + private Category parentCategory; + /** * Constructor which accepts all database fields *

@@ -122,22 +122,22 @@ public class ProductCategory implements Category, Comparable { } @Override - public Category getParentCategory () { - return this.parentCategory; + public String getCategoryTitle () { + return this.categoryTitle; } @Override - public void setParentCategory (final Category parentCategory) { - this.parentCategory = parentCategory; + public void setCategoryTitle (final String categoryTitle) { + this.categoryTitle = categoryTitle; } @Override - public String getCategoryTitle () { - return this.categoryTitle; + public Category getParentCategory () { + return this.parentCategory; } @Override - public void setCategoryTitle (final String categoryTitle) { - this.categoryTitle = categoryTitle; + public void setParentCategory (final Category parentCategory) { + this.parentCategory = parentCategory; } }