Question: transaction apps There are 2 functions in the webapps. CRUD of items entity, and list of transaction and its details entities. You are required to

transaction apps

There are 2 functions in the webapps. CRUD of items entity, and list of transaction and its details entities.

You are required to implements the setup, repository, view, controller and entity for items Create, Update, Retrieve, Delete operations.

using jpa orm

transactions entity, there are 2 extra columns not included in the database table. They are ttlQty (int) and ttlAmt (double) input by another programme, not by this web only showing.

Setup the dispatcher-servlet.xml, add the glassfish descriptor xml, add the standard deployment descriptor

You are required to implements a search functions for items, the request URL is http://localhost:8080/demo02/items/index/{the keywords}. When user manually type the keywords, the list will filter out the matched items, with item code or item name start with that keywords.

use custom JPQL query repository

eg:@Query("SELECT u FROM User u WHERE u.status = 1") Collection findAllActiveUsers(); from baeldung .com

B.

ItemValidator using Bean Validation

must have Item code a.item code unique b. item name must be provided (validate by entity annotation) c. item price between 0.0 to 999.99

error pagetransaction apps There are 2 functions in the webapps. CRUD of items

create table items(

itemId int not null primary key auto_increment,

itemCode varchar(100) not null unique,

itemName varchar(255) not null,

itemPrice decimal(5,2) not null

);

create table transactions(

transId bigint not null primary key auto_increment,

clientId int not null,

transDtm datetime not null default now()

);

create table transactionDetails(

transDetailId bigint not null primary key auto_increment,

transId bigint not null,

itemId int not null,

qty int not null,

constraint fk_transactionDetails_transId_transactions foreign key (transId)

references transactions (transId),

constraint fk_transactionDetails_transId_items foreign key (itemId)

references items (itemId)

);

entity, and list of transaction and its details entities. You are requiredto implements the setup, repository, view, controller and entity for items Create,Update, Retrieve, Delete operations. using jpa orm transactions entity, there are 2

if input item 999 not exist ,display error page

extra columns not included in the database table. They are ttlQty (int)

index.jsp

"> "> "> ">

$("#delItemBoxConfirm").click(function() { window.location.href="" + itemid; });

$("#delItemBox").modal({ show: true }); }

Entity-Relationship Diagram transactions (dbo) transld clientid transDtm Foreign key items (dbo) 8 itemld itemCode itemName itemPrice transaction Details (dk transDetailld transld itemld Foreign key qty Items. Transactions Create Item Code Item Name Item Price 123 Item A 1.23 Update Delete 456 Item B 4.56 Update Delete 789 Item C 7.89 Update Delete Item Code 123 Item Code already used! Item Name Item Name Item Name must be provided! item Price -8.9 Price must between 0 and 999.99 inclusively! Submit Back Item Code Item Name Item Price 123 Confirmation 456 Are you sure to delete dummy 789 Cancel Delete 999 dummy 1.23 Update Delete Items Transactions Error Exception Occur Please go back Entity-Relationship Diagram transactions (dbo) transld clientid transDtm Foreign key items (dbo) 8 itemld itemCode itemName itemPrice transaction Details (dk transDetailld transld itemld Foreign key qty Items. Transactions Create Item Code Item Name Item Price 123 Item A 1.23 Update Delete 456 Item B 4.56 Update Delete 789 Item C 7.89 Update Delete Item Code 123 Item Code already used! Item Name Item Name Item Name must be provided! item Price -8.9 Price must between 0 and 999.99 inclusively! Submit Back Item Code Item Name Item Price 123 Confirmation 456 Are you sure to delete dummy 789 Cancel Delete 999 dummy 1.23 Update Delete Items Transactions Error Exception Occur Please go back

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!