generated from konveyor-ecosystem/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE] Run with faster validator, probably not right #46
Open
shawn-hurley
wants to merge
1
commit into
konveyor-ecosystem:main
Choose a base branch
from
shawn-hurley:faster-validator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
11 changes: 6 additions & 5 deletions
11
src/main/java/com/redhat/coolstore/model/InventoryEntity.java
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 |
---|---|---|
@@ -1,136 +1,139 @@ | ||
|
||
package com.redhat.coolstore.model; | ||
|
||
import java.io.Serializable; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import javax.persistence.CascadeType; | ||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.OneToMany; | ||
import javax.persistence.Table; | ||
import jakarta.persistence.CascadeType; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.OneToMany; | ||
import jakarta.persistence.SequenceGenerator; | ||
import jakarta.persistence.Table; | ||
|
||
@Entity | ||
@Table(name = "ORDERS") | ||
public class Order implements Serializable { | ||
|
||
private static final long serialVersionUID = -1L; | ||
private static final long serialVersionUID = -1L; | ||
|
||
@Id | ||
@GeneratedValue | ||
private long orderId; | ||
@Id | ||
@SequenceGenerator(name = "order_seq", sequenceName = "order_seq") | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "order_seq") | ||
private long orderId; | ||
|
||
private String customerName; | ||
private String customerName; | ||
|
||
private String customerEmail; | ||
private String customerEmail; | ||
|
||
private double orderValue; | ||
private double orderValue; | ||
|
||
private double retailPrice; | ||
private double retailPrice; | ||
|
||
private double discount; | ||
private double discount; | ||
|
||
private double shippingFee; | ||
private double shippingFee; | ||
|
||
private double shippingDiscount; | ||
private double shippingDiscount; | ||
|
||
@Column(name="TOTAL_PRICE") | ||
@Column(name="TOTAL_PRICE") | ||
|
||
|
||
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true) | ||
@JoinColumn(name="ORDER_ID") | ||
private List<OrderItem> itemList = new ArrayList<>(); | ||
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true) | ||
@JoinColumn(name="ORDER_ID") | ||
private List<OrderItem> itemList = new ArrayList<>(); | ||
|
||
public Order() {} | ||
public Order() {} | ||
|
||
public long getOrderId() { | ||
return orderId; | ||
} | ||
public long getOrderId() { | ||
return orderId; | ||
} | ||
|
||
public void setOrderId(long orderId) { | ||
this.orderId = orderId; | ||
} | ||
public void setOrderId(long orderId) { | ||
this.orderId = orderId; | ||
} | ||
|
||
public String getCustomerName() { | ||
return customerName; | ||
} | ||
public String getCustomerName() { | ||
return customerName; | ||
} | ||
|
||
public void setCustomerName(String customerName) { | ||
this.customerName = customerName; | ||
} | ||
public void setCustomerName(String customerName) { | ||
this.customerName = customerName; | ||
} | ||
|
||
public String getCustomerEmail() { | ||
return customerEmail; | ||
} | ||
public String getCustomerEmail() { | ||
return customerEmail; | ||
} | ||
|
||
public void setCustomerEmail(String customerEmail) { | ||
this.customerEmail = customerEmail; | ||
} | ||
public void setCustomerEmail(String customerEmail) { | ||
this.customerEmail = customerEmail; | ||
} | ||
|
||
public double getOrderValue() { | ||
return orderValue; | ||
} | ||
public double getOrderValue() { | ||
return orderValue; | ||
} | ||
|
||
public void setOrderValue(double orderValue) { | ||
this.orderValue = orderValue; | ||
} | ||
public void setOrderValue(double orderValue) { | ||
this.orderValue = orderValue; | ||
} | ||
|
||
public double getRetailPrice() { | ||
return retailPrice; | ||
} | ||
public double getRetailPrice() { | ||
return retailPrice; | ||
} | ||
|
||
public void setRetailPrice(double retailPrice) { | ||
this.retailPrice = retailPrice; | ||
} | ||
public void setRetailPrice(double retailPrice) { | ||
this.retailPrice = retailPrice; | ||
} | ||
|
||
public double getDiscount() { | ||
return discount; | ||
} | ||
public double getDiscount() { | ||
return discount; | ||
} | ||
|
||
public void setDiscount(double discount) { | ||
this.discount = discount; | ||
} | ||
public void setDiscount(double discount) { | ||
this.discount = discount; | ||
} | ||
|
||
public double getShippingFee() { | ||
return shippingFee; | ||
} | ||
public double getShippingFee() { | ||
return shippingFee; | ||
} | ||
|
||
public void setShippingFee(double shippingFee) { | ||
this.shippingFee = shippingFee; | ||
} | ||
public void setShippingFee(double shippingFee) { | ||
this.shippingFee = shippingFee; | ||
} | ||
|
||
public double getShippingDiscount() { | ||
return shippingDiscount; | ||
} | ||
public double getShippingDiscount() { | ||
return shippingDiscount; | ||
} | ||
|
||
public void setShippingDiscount(double shippingDiscount) { | ||
this.shippingDiscount = shippingDiscount; | ||
} | ||
public void setShippingDiscount(double shippingDiscount) { | ||
this.shippingDiscount = shippingDiscount; | ||
} | ||
|
||
public void setItemList(List<OrderItem> itemList) { | ||
this.itemList = itemList; | ||
} | ||
public void setItemList(List<OrderItem> itemList) { | ||
this.itemList = itemList; | ||
} | ||
|
||
public List<OrderItem> getItemList() { | ||
return itemList; | ||
} | ||
public List<OrderItem> getItemList() { | ||
return itemList; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Order [orderId=" + orderId | ||
+ ", customerName=" + customerName | ||
+ ", customerEmail=" + customerEmail | ||
+ ", orderValue=" + orderValue | ||
+ ", retailPrice=" + retailPrice | ||
+ ", discount=" + discount | ||
+ ", shippingFee=" + shippingFee | ||
+ ", shippingDiscount=" + shippingDiscount | ||
+ ", itemList=" + itemList | ||
+ "]"; | ||
} | ||
@Override | ||
public String toString() { | ||
return "Order [orderId=" + orderId | ||
+ ", customerName=" + customerName | ||
+ ", customerEmail=" + customerEmail | ||
+ ", orderValue=" + orderValue | ||
+ ", retailPrice=" + retailPrice | ||
+ ", discount=" + discount | ||
+ ", shippingFee=" + shippingFee | ||
+ ", shippingDiscount=" + shippingDiscount | ||
+ ", itemList=" + itemList | ||
+ "]"; | ||
} | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -1,48 +1,53 @@ | ||
|
||
|
||
package com.redhat.coolstore.model; | ||
|
||
import java.io.Serializable; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
import javax.persistence.SequenceGenerator; | ||
import javax.persistence.Table; | ||
|
||
@Entity | ||
@Table(name = "ORDER_ITEMS") | ||
public class OrderItem implements Serializable { | ||
private static final long serialVersionUID = 64565445665456666L; | ||
private static final long serialVersionUID = 64565445665456666L; | ||
|
||
@Id | ||
@Column(name="ID") | ||
@GeneratedValue | ||
private long id; | ||
@Id | ||
@Column(name="ID") | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "order_item_seq") | ||
@SequenceGenerator(name = "order_item_seq", sequenceName = "order_item_seq") | ||
private long id; | ||
|
||
private int quantity; | ||
private int quantity; | ||
|
||
private String productId; | ||
private String productId; | ||
|
||
public OrderItem() {} | ||
public OrderItem() {} | ||
|
||
public String getProductId() { | ||
return productId; | ||
} | ||
public String getProductId() { | ||
return productId; | ||
} | ||
|
||
public void setProductId(String productId) { | ||
this.productId = productId; | ||
} | ||
public void setProductId(String productId) { | ||
this.productId = productId; | ||
} | ||
|
||
public int getQuantity() { | ||
return quantity; | ||
} | ||
public int getQuantity() { | ||
return quantity; | ||
} | ||
|
||
public void setQuantity(int quantity) { | ||
this.quantity = quantity; | ||
} | ||
public void setQuantity(int quantity) { | ||
this.quantity = quantity; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "OrderItem [productId=" + productId + ", quantity=" + quantity + "]"; | ||
} | ||
@Override | ||
public String toString() { | ||
return "OrderItem [productId=" + productId + ", quantity=" + quantity + "]"; | ||
} | ||
|
||
} | ||
} |
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
5 changes: 3 additions & 2 deletions
5
src/main/java/com/redhat/coolstore/persistence/Resources.java
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh