-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into master-merged
# Conflicts: # src/main/java/org/apeps/firstapp/config/CacheConfiguration.java # src/main/resources/config/liquibase/master.xml # src/main/webapp/app/layouts/navbar/navbar.html # src/main/webapp/index.html
- Loading branch information
Showing
77 changed files
with
4,961 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"fluentMethods": true, | ||
"relationships": [ | ||
{ | ||
"relationshipType": "one-to-many", | ||
"relationshipName": "item", | ||
"otherEntityName": "item", | ||
"otherEntityRelationshipName": "cart" | ||
}, | ||
{ | ||
"relationshipType": "one-to-one", | ||
"relationshipName": "customer", | ||
"otherEntityName": "customer", | ||
"ownerSide": false, | ||
"otherEntityRelationshipName": "cart" | ||
} | ||
], | ||
"fields": [], | ||
"changelogDate": "20171208125341", | ||
"entityTableName": "cart", | ||
"dto": "no", | ||
"pagination": "no", | ||
"service": "no", | ||
"jpaMetamodelFiltering": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"fluentMethods": true, | ||
"relationships": [ | ||
{ | ||
"relationshipType": "one-to-many", | ||
"relationshipName": "item", | ||
"otherEntityName": "item", | ||
"otherEntityRelationshipName": "category" | ||
}, | ||
{ | ||
"relationshipType": "many-to-one", | ||
"relationshipName": "parent", | ||
"otherEntityName": "category", | ||
"otherEntityField": "id" | ||
} | ||
], | ||
"fields": [ | ||
{ | ||
"fieldName": "name", | ||
"fieldType": "String", | ||
"fieldValidateRules": [ | ||
"required" | ||
] | ||
} | ||
], | ||
"changelogDate": "20171118104227", | ||
"entityTableName": "category", | ||
"dto": "no", | ||
"pagination": "pagination", | ||
"service": "serviceClass", | ||
"jpaMetamodelFiltering": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"fluentMethods": true, | ||
"relationships": [ | ||
{ | ||
"relationshipType": "one-to-one", | ||
"relationshipName": "cart", | ||
"otherEntityName": "cart", | ||
"otherEntityField": "id", | ||
"ownerSide": true, | ||
"otherEntityRelationshipName": "customer" | ||
} | ||
], | ||
"fields": [ | ||
{ | ||
"fieldName": "firstName", | ||
"fieldType": "String" | ||
}, | ||
{ | ||
"fieldName": "lastName", | ||
"fieldType": "String" | ||
}, | ||
{ | ||
"fieldName": "email", | ||
"fieldType": "String" | ||
}, | ||
{ | ||
"fieldName": "telephone", | ||
"fieldType": "String" | ||
} | ||
], | ||
"changelogDate": "20171118104228", | ||
"entityTableName": "customer", | ||
"dto": "no", | ||
"pagination": "pagination", | ||
"service": "no", | ||
"jpaMetamodelFiltering": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"fluentMethods": true, | ||
"relationships": [ | ||
{ | ||
"relationshipType": "many-to-one", | ||
"relationshipName": "category", | ||
"otherEntityName": "category", | ||
"otherEntityField": "id" | ||
}, | ||
{ | ||
"relationshipName": "cart", | ||
"otherEntityName": "cart", | ||
"relationshipType": "many-to-one", | ||
"otherEntityField": "id" | ||
} | ||
], | ||
"fields": [ | ||
{ | ||
"fieldName": "name", | ||
"fieldType": "String", | ||
"fieldValidateRules": [ | ||
"required" | ||
] | ||
}, | ||
{ | ||
"fieldName": "description", | ||
"fieldType": "String" | ||
}, | ||
{ | ||
"fieldName": "price", | ||
"fieldType": "Integer" | ||
} | ||
], | ||
"changelogDate": "20171118104226", | ||
"entityTableName": "item", | ||
"dto": "no", | ||
"pagination": "pagination", | ||
"service": "serviceClass", | ||
"jpaMetamodelFiltering": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
package org.apeps.firstapp.domain; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import org.hibernate.annotations.Cache; | ||
import org.hibernate.annotations.CacheConcurrencyStrategy; | ||
|
||
import javax.persistence.*; | ||
import java.io.Serializable; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import java.util.Objects; | ||
|
||
/** | ||
* A Cart. | ||
*/ | ||
@Entity | ||
@Table(name = "cart") | ||
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) | ||
public class Cart implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") | ||
@SequenceGenerator(name = "sequenceGenerator") | ||
private Long id; | ||
|
||
@OneToMany(mappedBy = "cart") | ||
@JsonIgnore | ||
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) | ||
private Set<Item> items = new HashSet<>(); | ||
|
||
@OneToOne(mappedBy = "cart") | ||
@JsonIgnore | ||
private Customer customer; | ||
|
||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove | ||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public Set<Item> getItems() { | ||
return items; | ||
} | ||
|
||
public Cart items(Set<Item> items) { | ||
this.items = items; | ||
return this; | ||
} | ||
|
||
public Cart addItem(Item item) { | ||
this.items.add(item); | ||
item.setCart(this); | ||
return this; | ||
} | ||
|
||
public Cart removeItem(Item item) { | ||
this.items.remove(item); | ||
item.setCart(null); | ||
return this; | ||
} | ||
|
||
public void setItems(Set<Item> items) { | ||
this.items = items; | ||
} | ||
|
||
public Customer getCustomer() { | ||
return customer; | ||
} | ||
|
||
public Cart customer(Customer customer) { | ||
this.customer = customer; | ||
return this; | ||
} | ||
|
||
public void setCustomer(Customer customer) { | ||
this.customer = customer; | ||
} | ||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
Cart cart = (Cart) o; | ||
if (cart.getId() == null || getId() == null) { | ||
return false; | ||
} | ||
return Objects.equals(getId(), cart.getId()); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(getId()); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Cart{" + | ||
"id=" + getId() + | ||
"}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
package org.apeps.firstapp.domain; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import org.hibernate.annotations.Cache; | ||
import org.hibernate.annotations.CacheConcurrencyStrategy; | ||
|
||
import javax.persistence.*; | ||
import javax.validation.constraints.*; | ||
import java.io.Serializable; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import java.util.Objects; | ||
|
||
/** | ||
* A Category. | ||
*/ | ||
@Entity | ||
@Table(name = "category") | ||
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) | ||
public class Category implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") | ||
@SequenceGenerator(name = "sequenceGenerator") | ||
private Long id; | ||
|
||
@NotNull | ||
@Column(name = "name", nullable = false) | ||
private String name; | ||
|
||
@OneToMany(mappedBy = "category") | ||
@JsonIgnore | ||
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) | ||
private Set<Item> items = new HashSet<>(); | ||
|
||
@ManyToOne | ||
private Category parent; | ||
|
||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove | ||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Category name(String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Set<Item> getItems() { | ||
return items; | ||
} | ||
|
||
public Category items(Set<Item> items) { | ||
this.items = items; | ||
return this; | ||
} | ||
|
||
public Category addItem(Item item) { | ||
this.items.add(item); | ||
item.setCategory(this); | ||
return this; | ||
} | ||
|
||
public Category removeItem(Item item) { | ||
this.items.remove(item); | ||
item.setCategory(null); | ||
return this; | ||
} | ||
|
||
public void setItems(Set<Item> items) { | ||
this.items = items; | ||
} | ||
|
||
public Category getParent() { | ||
return parent; | ||
} | ||
|
||
public Category parent(Category category) { | ||
this.parent = category; | ||
return this; | ||
} | ||
|
||
public void setParent(Category category) { | ||
this.parent = category; | ||
} | ||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
Category category = (Category) o; | ||
if (category.getId() == null || getId() == null) { | ||
return false; | ||
} | ||
return Objects.equals(getId(), category.getId()); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(getId()); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Category{" + | ||
"id=" + getId() + | ||
", name='" + getName() + "'" + | ||
"}"; | ||
} | ||
} |
Oops, something went wrong.