Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
d55b5f0
Create .gitignore
BDesselle May 7, 2019
b7cdab7
Create maven-wrapper.jar
BDesselle May 7, 2019
81be48f
Create maven-wrapper.properties
BDesselle May 7, 2019
175db5e
Create MavenWrapperDownloader.java
BDesselle May 7, 2019
ba40c38
Create data.sql
BDesselle May 7, 2019
c582b0e
Create mvnw
BDesselle May 7, 2019
9a04d92
Create mvnw.cmd
BDesselle May 7, 2019
bad1916
Create pom.xml
BDesselle May 7, 2019
dc3267c
Update README.md
BDesselle May 7, 2019
8d5b6c2
Create WebConfiguration.java
BDesselle May 7, 2019
e3317ff
Create CustomerController.java
BDesselle May 7, 2019
cd381ba
Create DemoApplication.java
BDesselle May 7, 2019
3305188
Create Agents.java
BDesselle May 7, 2019
a64cbc5
Create Customer.java
BDesselle May 7, 2019
78d29ec
Create Orders.java
BDesselle May 7, 2019
056bafc
Create MyErrorController.java
BDesselle May 7, 2019
9da7d3d
Create AgentsRepository.java
BDesselle May 7, 2019
d943a83
Create CustomerRepository.java
BDesselle May 7, 2019
454df25
Create OrdersRepository.java
BDesselle May 7, 2019
5bb076f
Create application.properties
BDesselle May 7, 2019
867ea5d
Create data.sql
BDesselle May 7, 2019
2140ad9
Create error-404.html
BDesselle May 7, 2019
e4c884e
Create error-500.html
BDesselle May 7, 2019
9dfd358
Create error.html
BDesselle May 7, 2019
345d247
Create DemoApplicationTests.java
BDesselle May 7, 2019
73b3f47
Delete .gitignore
BDesselle May 10, 2019
4bea1aa
Create codeStyleConfig.xml
BDesselle May 10, 2019
9b6c6a5
Create java-orders.iml
BDesselle May 10, 2019
e01ee76
Create misc.xml
BDesselle May 10, 2019
840f803
Delete mvnw
BDesselle May 10, 2019
7eb9cce
Update data.sql
BDesselle May 10, 2019
19bb9bb
Create modules.xml
BDesselle May 10, 2019
e4e5db9
Create workspace.xml
BDesselle May 10, 2019
7d25f5d
Create vcs.xml
BDesselle May 10, 2019
c117b09
Delete maven-wrapper.jar
BDesselle May 10, 2019
8188eba
Delete maven-wrapper.properties
BDesselle May 10, 2019
15b91b2
Delete MavenWrapperDownloader.java
BDesselle May 10, 2019
b95276e
Delete mvnw.cmd
BDesselle May 10, 2019
a925b4b
Delete pom.xml
BDesselle May 10, 2019
f13cf7e
Create .gitignore
BDesselle May 10, 2019
10b0eaf
Create maven-wrapper.jar
BDesselle May 10, 2019
9f5c02a
Create maven-wrapper.properties
BDesselle May 10, 2019
53cbe5c
Create MavenWrapperDownloader.java
BDesselle May 10, 2019
644bff2
Create data.sql
BDesselle May 10, 2019
686e0f9
Create mvnw
BDesselle May 10, 2019
afa65cb
Create mvnw.cmd
BDesselle May 10, 2019
04400e9
Create pom.xml
BDesselle May 10, 2019
d00d734
Create CustomerController.java
BDesselle May 10, 2019
3c9e908
Create DemoApplication.java
BDesselle May 10, 2019
58f7d3c
Create Agents.java
BDesselle May 10, 2019
e8b8672
Create Customers.java
BDesselle May 10, 2019
d179cc9
Create Orders.java
BDesselle May 10, 2019
7d566c2
Create AgentsRepository.java
BDesselle May 10, 2019
97c29cf
Create CustomersRepository.java
BDesselle May 10, 2019
05ac01c
Create OrdersRepository.java
BDesselle May 10, 2019
1ddf95c
Create SeedData.java
BDesselle May 10, 2019
4711d8b
Create CustomerService.java
BDesselle May 10, 2019
999fc88
Create CustomerServiceImpl.java
BDesselle May 10, 2019
0f40ded
Create application.properties
BDesselle May 10, 2019
13bb138
Create DemoApplicationTests.java
BDesselle May 10, 2019
cb40a85
Update README.md
BDesselle May 10, 2019
4690385
Delete SeedData.java
BDesselle May 10, 2019
f0d95f4
Delete WebConfiguration.java
BDesselle May 10, 2019
b7422e2
Delete CustomerController.java
BDesselle May 10, 2019
5f9e63d
Delete DemoApplication.java
BDesselle May 10, 2019
d565741
Delete Agents.java
BDesselle May 10, 2019
3fbcc42
Delete Customer.java
BDesselle May 10, 2019
35dd094
Delete Orders.java
BDesselle May 10, 2019
be0c438
Delete MyErrorController.java
BDesselle May 10, 2019
29b29f3
Delete AgentsRepository.java
BDesselle May 10, 2019
a9cda4e
Delete CustomerRepository.java
BDesselle May 10, 2019
d4566bc
Delete OrdersRepository.java
BDesselle May 10, 2019
41ebfb9
Delete application.properties
BDesselle May 10, 2019
14e9c3d
Delete data.sql
BDesselle May 10, 2019
9909762
Delete error-404.html
BDesselle May 10, 2019
6011270
Delete error-500.html
BDesselle May 10, 2019
8fefe5f
Delete error.html
BDesselle May 10, 2019
beede69
Delete DemoApplicationTests.java
BDesselle May 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/java-orders.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

136 changes: 136 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ The table layouts are as follows
* ADVANCEAMOUNT double
* CUSTCODE Long foreign key (one customer to many orders) not null
* AGENTCODE Long foreign key (one agent to many orders) not null
* ORDDESCRIPTION String
* ORDDESCRIPTION


* Create the entities needed to store this data
* A Java class called SeedData has been provided with seed data. You can use this class directly or modify it to fit your models. However, the data found in the class is the seed data to use!
* Load in the data. A file called data.sql would load the data using SQL. You need to modify it to load using a SeedData approach loading the data by creating objects.

Expose the following end points

Expand All @@ -58,6 +58,6 @@ Expose the following end points
* this should also delete the orders of that customer

Stretch goals
* /agent/{agentcode} - Deletes an agent if they are not assigned to a customer or order (Stretch Goal)
* /agents/{agentcode} - Deletes an agent if they are not assigned to a customer or order (Stretch Goal)
* Add appropriate error exception handling
* Add appropriate logging for Tomcat, Spring, and custom logging for your project
54 changes: 54 additions & 0 deletions data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
INSERT INTO agents (agentcode, agentname, workingarea, commission, phone, country)
VALUES (7, 'Ramasundar', 'Bangalore', 0.15, '077-25814763', ''),
(3, 'Alex ', 'London', 0.13, '075-12458969', ''),
(8, 'Alford', 'New York', 0.12, '044-25874365', ''),
(11, 'Ravi Kumar', 'Bangalore', 0.15, '077-45625874', ''),
(10, 'Santakumar', 'Chennai', 0.14, '007-22388644', ''),
(12, 'Lucida', 'San Jose', 0.12, '044-52981425', ''),
(5, 'Anderson', 'Brisban', 0.13, '045-21447739', ''),
(1, 'Subbarao', 'Bangalore', 0.14, '077-12346674', ''),
(2, 'Mukesh', 'Mumbai', 0.11, '029-12358964', ''),
(6, 'McDen', 'London', 0.15, '078-22255588', ''),
(4, 'Ivan', 'Torento', 0.15, '008-22544166', ''),
(9, 'Benjamin', 'Hampshair', 0.11, '008-22536178', '');

INSERT INTO orders (ordnum, ordamount, advanceamount, custcode, agentcode, orddescription)
VALUES (200100, 1000.00, 600.00, 13, 3, 'SOD'),
(200110, 3000.00, 500.00, 19, 10, 'SOD'),
(200107, 4500.00, 900.00, 7, 10, 'SOD'),
(200112, 2000.00, 400.00, 16, 7, 'SOD'),
(200113, 4000.00, 600.00, 22, 2, 'SOD'),
(200102, 2000.00, 300.00, 12, 12, 'SOD'),
(200114, 3500.00, 2000.00, 2, 8, 'SOD'),
(200122, 2500.00, 400.00, 3, 4, 'SOD'),
(200118, 500.00, 100.00, 23, 6, 'SOD'),
(200119, 4000.00, 700.00, 7, 10, 'SOD'),
(200121, 1500.00, 600.00, 8, 4, 'SOD'),
(200130, 2500.00, 400.00, 25, 11, 'SOD');

INSERT INTO customers (custcode, custname, custcity, workingarea, custcountry, grade, openingamt, receiveamt, paymentamt, outstandingamt, phone, agentcode)
VALUES (13, 'Holmes', 'London', 'London', 'UK', '2', 6000.00, 5000.00, 7000.00, 4000.00, 'BBBBBBB', 3),
(1, 'Micheal', 'New York', 'New York', 'USA', '2', 3000.00, 5000.00, 2000.00, 6000.00, 'CCCCCCC', 8),
(20, 'Albert', 'New York', 'New York', 'USA', '3', 5000.00, 7000.00, 6000.00, 6000.00, 'BBBBSBB', 8),
(25, 'Ravindran', 'Bangalore', 'Bangalore', 'India', '2', 5000.00, 7000.00, 4000.00, 8000.00, 'AVAVAVA', 11),
(24, 'Cook', 'London', 'London', 'UK', '2', 4000.00, 9000.00, 7000.00, 6000.00, 'FSDDSDF', 6),
(15, 'Stuart', 'London', 'London', 'UK', '1', 6000.00, 8000.00, 3000.00, 11000.00, 'GFSGERS', 3),
(2, 'Bolt', 'New York', 'New York', 'USA', '3', 5000.00, 7000.00, 9000.00, 3000.00, 'DDNRDRH', 8),
(18, 'Fleming', 'Brisban', 'Brisban', 'Australia', '2', 7000.00, 7000.00, 9000.00, 5000.00, 'NHBGVFC', 5),
(21, 'Jacks', 'Brisban', 'Brisban', 'Australia', '1', 7000.00, 7000.00, 7000.00, 7000.00, 'WERTGDF', 5),
(19, 'Yearannaidu', 'Chennai', 'Chennai', 'India', '1', 8000.00, 7000.00, 7000.00, 8000.00, 'ZZZZBFV', 10),
(5, 'Sasikant', 'Mumbai', 'Mumbai', 'India', '1', 7000.00, 11000.00, 7000.00, 11000.00, '147-25896312', 2),
(7, 'Ramanathan', 'Chennai', 'Chennai', 'India', '1', 7000.00, 11000.00, 9000.00, 9000.00, 'GHRDWSD', 10),
(22, 'Avinash', 'Mumbai', 'Mumbai', 'India', '2', 7000.00, 11000.00, 9000.00, 9000.00, '113-12345678',2),
(4, 'Winston', 'Brisban', 'Brisban', 'Australia', '1', 5000.00, 8000.00, 7000.00, 6000.00, 'AAAAAAA', 5),
(23, 'Karl', 'London', 'London', 'UK', '0', 4000.00, 6000.00, 7000.00, 3000.00, 'AAAABAA', 6),
(6, 'Shilton', 'Torento', 'Torento', 'Canada', '1', 10000.00, 7000.00, 6000.00, 11000.00, 'DDDDDDD', 4),
(10, 'Charles', 'Hampshair', 'Hampshair', 'UK', '3', 6000.00, 4000.00, 5000.00, 5000.00, 'MMMMMMM', 9),
(17, 'Srinivas', 'Bangalore', 'Bangalore', 'India', '2', 8000.00, 4000.00, 3000.00, 9000.00, 'AAAAAAB', 7),
(12, 'Steven', 'San Jose', 'San Jose', 'USA', '1', 5000.00, 7000.00, 9000.00, 3000.00, 'KRFYGJK', 12),
(8, 'Karolina', 'Torento', 'Torento', 'Canada', '1', 7000.00, 7000.00, 9000.00, 5000.00, 'HJKORED', 4),
(3, 'Martin', 'Torento', 'Torento', 'Canada', '2', 8000.00, 7000.00, 7000.00, 8000.00, 'MJYURFD', 4),
(9, 'Ramesh', 'Mumbai', 'Mumbai', 'India', '3', 8000.00, 7000.00, 3000.00, 12000.00, 'Phone No', 2),
(14, 'Rangarappa', 'Bangalore', 'Bangalore', 'India', '2', 8000.00, 11000.00, 7000.00, 12000.00, 'AAAATGF', 1),
(16, 'Venkatpati', 'Bangalore', 'Bangalore', 'India', '2', 8000.00, 11000.00, 7000.00, '12000.00', 'JRTVFDD', 7),
(11, 'Sundariya', 'Chennai', 'Chennai', 'India', '3', 7000.00, 11000.00, 7000.00, 11000.00, 'PPHGRTS', 10);
29 changes: 29 additions & 0 deletions project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
HELP.md
/target/
!.mvn/wrapper/maven-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/build/

### VS Code ###
.vscode/
Loading