Package com.cyran.tp.server.products
Class ProductClassRepository
java.lang.Object
com.cyran.tp.server.products.ProductClassRepository
@Repository
@Transactional
public class ProductClassRepository
extends java.lang.Object
Class for low level requesting session for Product table in DB using Hibernate
- Author:
- Jakub Perdek
-
Constructor Summary
Constructors Constructor Description ProductClassRepository()
-
Method Summary
Modifier and Type Method Description java.util.List<Products>
all()
Gets all Products from DBorg.hibernate.Session
getSession()
Gets session for Productvoid
save(Products emp)
Saves product to DB
-
Constructor Details
-
ProductClassRepository
public ProductClassRepository()
-
-
Method Details
-
getSession
public org.hibernate.Session getSession()Gets session for Product- Returns:
- session for product
-
all
Gets all Products from DB- Returns:
- list of Products
-
save
Saves product to DB- Parameters:
emp
- - instance of Product class which mapped to DB
-