BAEL-3683: Rename ProductMultipleDB entity to Product (#8557)

This commit is contained in:
kwoyke
2020-01-21 10:28:22 +01:00
committed by Grzegorz Piwowarek
parent 0caf728a2f
commit 1a67e0a280
3 changed files with 28 additions and 28 deletions
@@ -5,9 +5,9 @@ import java.util.List;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.baeldung.multipledb.model.product.ProductMultipleDB;
import com.baeldung.multipledb.model.product.Product;
public interface ProductRepository extends PagingAndSortingRepository<ProductMultipleDB, Integer> {
public interface ProductRepository extends PagingAndSortingRepository<Product, Integer> {
List<ProductMultipleDB> findAllByPrice(double price, Pageable pageable);
List<Product> findAllByPrice(double price, Pageable pageable);
}
@@ -6,7 +6,7 @@ import javax.persistence.Table;
@Entity
@Table(schema = "products")
public class ProductMultipleDB {
public class Product {
@Id
private int id;
@@ -15,19 +15,19 @@ public class ProductMultipleDB {
private double price;
public ProductMultipleDB() {
public Product() {
super();
}
private ProductMultipleDB(int id, String name, double price) {
private Product(int id, String name, double price) {
super();
this.id = id;
this.name = name;
this.price = price;
}
public static ProductMultipleDB from(int id, String name, double price) {
return new ProductMultipleDB(id, name, price);
public static Product from(int id, String name, double price) {
return new Product(id, name, price);
}
public int getId() {