public class InventoryDAOImpl extends Object implements InventoryDAO
| Modifier and Type | Field and Description |
|---|---|
private EntityManager |
em |
| Constructor and Description |
|---|
InventoryDAOImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProduct(Product p) |
private void |
applyBounds(TypedQuery<?> query,
int offset,
int limit) |
void |
createCategory(Category category) |
void |
deleteCategory(Category category) |
void |
deleteProduct(Product product) |
void |
detachCategory(Category category) |
List<Category> |
findCategoryByName(String criteria,
int offset,
int limit) |
List<Product> |
findProductsByName(String criteria,
int offset,
int limit) |
Category |
getCategory(int id) |
Product |
getProduct(int id) |
void |
setEntityManager(EntityManager em) |
Product |
updateProduct(Product product) |
@Inject private EntityManager em
public void setEntityManager(EntityManager em)
public void createCategory(Category category)
createCategory in interface InventoryDAOpublic Category getCategory(int id)
getCategory in interface InventoryDAOpublic List<Category> findCategoryByName(String criteria, int offset, int limit)
findCategoryByName in interface InventoryDAOpublic void detachCategory(Category category)
detachCategory in interface InventoryDAOpublic void deleteCategory(Category category)
deleteCategory in interface InventoryDAOpublic void addProduct(Product p)
addProduct in interface InventoryDAOpublic Product getProduct(int id)
getProduct in interface InventoryDAOpublic Product updateProduct(Product product)
updateProduct in interface InventoryDAOpublic List<Product> findProductsByName(String criteria, int offset, int limit)
findProductsByName in interface InventoryDAOpublic void deleteProduct(Product product)
deleteProduct in interface InventoryDAOprivate void applyBounds(TypedQuery<?> query, int offset, int limit)
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.