FileDocCategorySizeDatePackage
PetStoreImpl.javaAPI DocExample3832Mon Mar 01 19:47:20 GMT 2004org.springframework.samples.jpetstore.domain.logic

PetStoreImpl

public class PetStoreImpl extends Object implements PetStoreFacade, OrderService
JPetStore primary business object.

Defines a default transaction attribute for all methods. Note that this attribute definition is only necessary if using Commons Attributes autoproxying (see the attributes directory under the root of JPetStore). No attributes are required with a TransactionFactoryProxyBean, as in the default applicationContext.xml in the war/WEB-INF directory.

The following attribute definition uses Commons Attributes attribute syntax.

org.springframework.transaction.interceptor.DefaultTransactionAttribute()
author
Juergen Hoeller
since
30.11.2003

Fields Summary
private org.springframework.samples.jpetstore.dao.AccountDao
accountDao
private org.springframework.samples.jpetstore.dao.CategoryDao
categoryDao
private org.springframework.samples.jpetstore.dao.ProductDao
productDao
private org.springframework.samples.jpetstore.dao.ItemDao
itemDao
private org.springframework.samples.jpetstore.dao.OrderDao
orderDao
Constructors Summary
Methods Summary
public org.springframework.samples.jpetstore.domain.AccountgetAccount(java.lang.String username)

    return this.accountDao.getAccount(username);
  
public org.springframework.samples.jpetstore.domain.AccountgetAccount(java.lang.String username, java.lang.String password)

		return this.accountDao.getAccount(username, password);
  
public org.springframework.samples.jpetstore.domain.CategorygetCategory(java.lang.String categoryId)

    return this.categoryDao.getCategory(categoryId);
  
public java.util.ListgetCategoryList()

    return this.categoryDao.getCategoryList();
  
public org.springframework.samples.jpetstore.domain.ItemgetItem(java.lang.String itemId)

		return this.itemDao.getItem(itemId);
  
public java.util.ListgetItemListByProduct(java.lang.String productId)

		return this.itemDao.getItemListByProduct(productId);
  
public org.springframework.samples.jpetstore.domain.OrdergetOrder(int orderId)

    return this.orderDao.getOrder(orderId);
  
public java.util.ListgetOrdersByUsername(java.lang.String username)

    return this.orderDao.getOrdersByUsername(username);
  
public org.springframework.samples.jpetstore.domain.ProductgetProduct(java.lang.String productId)

    return this.productDao.getProduct(productId);
  
public java.util.ListgetProductListByCategory(java.lang.String categoryId)

		return this.productDao.getProductListByCategory(categoryId);
	
public java.util.ListgetUsernameList()

		return this.accountDao.getUsernameList();
  
public voidinsertAccount(org.springframework.samples.jpetstore.domain.Account account)

		this.accountDao.insertAccount(account);
  
public voidinsertOrder(org.springframework.samples.jpetstore.domain.Order order)

		this.orderDao.insertOrder(order);
		this.itemDao.updateQuantity(order);
  
public booleanisItemInStock(java.lang.String itemId)

		return this.itemDao.isItemInStock(itemId);
  
public java.util.ListsearchPages(java.lang.String keywords)

           return null;
    
public java.util.ListsearchProductList(java.lang.String keywords)

		return this.productDao.searchProductList(keywords);
	
public voidsetAccountDao(org.springframework.samples.jpetstore.dao.AccountDao accountDao)

		this.accountDao = accountDao;
	
public voidsetCategoryDao(org.springframework.samples.jpetstore.dao.CategoryDao categoryDao)

		this.categoryDao = categoryDao;
	
public voidsetItemDao(org.springframework.samples.jpetstore.dao.ItemDao itemDao)

		this.itemDao = itemDao;
	
public voidsetOrderDao(org.springframework.samples.jpetstore.dao.OrderDao orderDao)

		this.orderDao = orderDao;
	
public voidsetProductDao(org.springframework.samples.jpetstore.dao.ProductDao productDao)

		this.productDao = productDao;
	
public voidupdateAccount(org.springframework.samples.jpetstore.domain.Account account)

		this.accountDao.updateAccount(account);