Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Data-Centric Applications with Vaadin 8

You're reading from   Data-Centric Applications with Vaadin 8 Develop and maintain high-quality web applications using Vaadin

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781783288847
Length 202 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Duarte Duarte
Author Profile Icon Duarte
Duarte
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Title Page
Dedication
Packt Upsell
Foreword
Contributors
Preface
1. Creating New Vaadin Projects 2. Modularization and Main Screens FREE CHAPTER 3. Implementing Server-Side Components with Internationalization 4. Implementing Authentication and Authorization 5. Connecting to SQL Databases Using JDBC 6. Connecting to SQL Databases Using ORM Frameworks 7. Implementing CRUD User Interfaces 8. Adding Reporting Capabilities 9. Lazy Loading 1. Other Books You May Enjoy Index

The example application


Throughout the chapter, we'll develop a Report Viewer. The following is a screenshot of the finished application:

The data model

The data model is based on a simple SQL table, Call, that contains columns for the ID, client name, phone number, city, start time, duration, and status. The following is a JPA Entity representing this table:

@Entity
@Data
public class Call {

@Id
    @GeneratedValue
private Long id;

private String client;

private String phoneNumber;

@Enumerated(EnumType.STRING)
private City city;

private LocalDateTime startTime;

private Integer duration;

@Enumerated(EnumType.STRING)
private Status status;
}

Status and City are simple Java enums that define some test values:

public enum Status {
RECEIVED, MISSED
}

public enum City {
    BOGOTA, TURKU, LONDON, BERLIN, HELSINKI, TOKYO, SAN_FRANCISCO, SIDNEY, LAGOS, VANCOUVER, SANTIAGO, BEIJING
}

Notice the @Enumerated annotations in the city and status fields of the Call class. This is used to persist the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images