-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
274 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package ua.com.alexcoffee.repository; | ||
|
||
import org.springframework.data.repository.NoRepositoryBean; | ||
import ua.com.alexcoffee.model.Model; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
|
@@ -14,7 +15,6 @@ | |
* того типа которым есть id нашей сущности (обязательно). | ||
* | ||
* @param <T> Тип (класс) сущности. | ||
* @param <E> Тип id сущности. | ||
* @author Yurii Salimov ([email protected]) | ||
* @version 1.2 | ||
* @see CategoryRepository | ||
|
@@ -27,5 +27,6 @@ | |
* @see UserRepository | ||
* @see Model | ||
*/ | ||
public interface MainRepository<T extends Model, E extends Number> extends JpaRepository<T, E> { | ||
@NoRepositoryBean | ||
public interface MainRepository<T extends Model> extends JpaRepository<T, Long> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package ua.com.alexcoffee.dao.interfaces; | ||
package ua.com.alexcoffee.repository; | ||
|
||
import ua.com.alexcoffee.model.SalePosition; | ||
import ua.com.alexcoffee.model.ShoppingCart; | ||
|
@@ -10,10 +10,10 @@ | |
* | ||
* @author Yurii Salimov ([email protected]) | ||
* @version 1.2 | ||
* @see ua.com.alexcoffee.dao.impl.ShoppingCartDAOImpl | ||
* @see ShoppingCartRepositoryImpl | ||
* @see SalePosition | ||
*/ | ||
public interface ShoppingCartDAO { | ||
public interface ShoppingCartRepository { | ||
/** | ||
* Возвращает список всех торговых позиций в корзине. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
package ua.com.alexcoffee.dao.impl; | ||
package ua.com.alexcoffee.repository; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.stereotype.Repository; | ||
import ua.com.alexcoffee.dao.interfaces.ShoppingCartDAO; | ||
import ua.com.alexcoffee.model.SalePosition; | ||
import ua.com.alexcoffee.model.ShoppingCart; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Класс реализует методы интерфейса {@link ShoppingCartDAO} для работы с корзиной. | ||
* Класс реализует методы интерфейса {@link ShoppingCartRepository} для работы с корзиной. | ||
* | ||
* @author Yurii Salimov ([email protected]) | ||
* @version 1.2 | ||
* @see ShoppingCartDAO | ||
* @see ShoppingCartRepository | ||
* @see ShoppingCart | ||
*/ | ||
@Repository | ||
@ComponentScan(basePackages = "ua.com.alexcoffee.model") | ||
public final class ShoppingCartDAOImpl implements ShoppingCartDAO { | ||
public final class ShoppingCartRepositoryImpl implements ShoppingCartRepository { | ||
/** | ||
* Объект корзина, в которой | ||
* хранятся торговые позиции клиента. | ||
|
@@ -35,7 +34,7 @@ public final class ShoppingCartDAOImpl implements ShoppingCartDAO { | |
* корзиной. | ||
*/ | ||
@Autowired | ||
public ShoppingCartDAOImpl(final ShoppingCart shoppingCart) { | ||
public ShoppingCartRepositoryImpl(final ShoppingCart shoppingCart) { | ||
this.shoppingCart = shoppingCart; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.