Code Monkey home page Code Monkey logo

java-orders's Introduction

java-orders

A student that completes this project shows that they can:

  • perform CRUD operations on an RDBMS using JPA and Hibernate.

Introduction

This is a basic database scheme with customers, orders, and sales agents.

Instructions

Create a REST api server to store and read data from an in memory H2 database.

The table layouts are as follows

  • AGENTS

    • AGENTCODE primary key, not null Long
    • AGENTNAME string
    • WORKINGAREA string
    • COMMISSION double
    • PHONE string
    • COUNTRY string
  • CUSTOMERS

    • CUSTCODE primary key, not null Long
    • CUSTNAME String, not null
    • CUSTCITY String
    • WORKINGAREA String
    • CUSTCOUNTRY String
    • GRADE String
    • OPENINGAMT double
    • RECEIVEAMT double
    • PAYMENTAMT double
    • OUTSTANDINGAMT double
    • PHONE String
    • AGENTCODE Long foreign key (one agent to many customers) not null
  • ORDERS

    • ORDNUM primary key, not null Long
    • ORDAMOUNT double
    • 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
  • 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!

Expose the following end points

  • /customer/order - Returns all customers with their orders

  • /customer/name/{custname} - Returns all orders for a particular based on name

  • /data/customer/new - Adds a new customer

  • /data/customer/update/{custcode} - Updates the customer based off of custcode

  • /data/customer/delete/{custcode} - Deletes the customer based off of custcode

    • 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)
  • Add appropriate error exception handling
  • Add appropriate logging for Tomcat, Spring, and custom logging for your project

java-orders's People

Contributors

jtonna avatar jrmmba8314 avatar joepounddev avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.