mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 22:58:59 +00:00
* #2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve checkstyle issues * remove FileSelectorJFrame.java to resolve checkstyle issue * remove FileSelectorJFrame.java to resolve checkstyle issue * remove FileSelectorJFrame.java to resolve checkstyle issue * add refactored file with correct filename to resolve checkstyle issue * add the test data * change filenames from JFrame to Jframe for checkstyle * fix code smell from sonar report * add new testcases to improve the test coverage * remove code smell
This commit is contained in:
@@ -29,7 +29,6 @@ import static org.joda.money.CurrencyUnit.USD;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.h2.jdbcx.JdbcDataSource;
|
||||
import org.joda.money.Money;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
|
||||
@@ -27,6 +27,9 @@ package com.iluwatar.domainmodel;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* DAO interface for customer transactions.
|
||||
*/
|
||||
public interface CustomerDao {
|
||||
|
||||
Optional<Customer> findByName(String name) throws SQLException;
|
||||
|
||||
@@ -30,9 +30,11 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Optional;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.joda.money.Money;
|
||||
|
||||
/**
|
||||
* Implementations for database operations of Customer.
|
||||
*/
|
||||
public class CustomerDaoImpl implements CustomerDao {
|
||||
|
||||
private final DataSource dataSource;
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Optional;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -27,6 +27,9 @@ package com.iluwatar.domainmodel;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* DAO interface for product transactions.
|
||||
*/
|
||||
public interface ProductDao {
|
||||
|
||||
Optional<Product> findByName(String name) throws SQLException;
|
||||
|
||||
@@ -31,10 +31,11 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Optional;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.joda.money.Money;
|
||||
|
||||
|
||||
/**
|
||||
* Implementations for database transactions of Product.
|
||||
*/
|
||||
public class ProductDaoImpl implements ProductDao {
|
||||
|
||||
private final DataSource dataSource;
|
||||
|
||||
Reference in New Issue
Block a user