Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 3 Your application allows you to manage Task and Project entities. You have to add missing annotations and code over entity classes and converters

Task 3
Your application allows you to manage Task and Project
entities.
You have to add missing annotations and code over entity classes
and converters to make it possible to store Task and Project
and their relations in specified tables.
Requirements
Project. updates should be persisted in a table with the
following structure:
Table name: PROJECT_EVENT_UPDATES
Columns:
PROJECT_ID : foreign key;
USER_NAME : value of Itemupdate.user ;
EVENT_DATE: value of Itemupdate. date .
Task, watchers should be persisted in a table with the
following structure:
Table name: TODO_WATCHERS :
Columns:
TODO_ID : foreign key;
LOGIN: value of string from the set.Task 3
NAME: Key trom the Map;
DESCRIPTION: value from the Map .
Tables
The following tables should exist after implementation:
PROJECTS with columnS PROJECT_ID, NAME ;
PROJECT_EVENT_UPDATES with columnS PROJECT_ID,
USER_NAME, EVENT_DATE ;
TODOS with columns TODO_ID, SUBJECT, DETAILS;
TODO_WATCHERS with columnS TODO_ID, LOGIN ;
TODO_COMMENTS with columns TODO_ID, AUTHOR,
ADD_DATE, COMMENT ;
TODO_UPDATES with columns TODO_ID, AUTHOR,
UPDATE_DATE;
TODO_WATCHERS with columnS TODO_ID, NAME,
DESCRIPTION .
Assumptions
Class names and function signatures should not be changed. Hints
In order to satisfy the requirements you should:
add missing annotations from the javax.persistencepackage to the Taskand
Projectclasses.
Source Code
The following classes have already been implemented:
ItemUpdate
@Embeddable
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@AllArgsConstructor
@Getter
public class ItemUpdate {
private String user;
private LocalDate date;
}
Comment
@Embeddable
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@AllArgsConstructor
@Getter
public class Comment {
@Column(name = "AUTHOR")
private String author;
@Column(name = "ADD_DATE")
private LocalDate date;
@Column(name = "COMMENT")
private String comment;
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions