[Cayambe-development] CVS: core/src/org/cayambe/ejb CategoryFacadeSession.java,1.7,1.8 ProductFacade
Status: Pre-Alpha
Brought to you by:
jlward4
|
From: Jon R. <jon...@us...> - 2002-05-22 20:45:44
|
Update of /cvsroot/cayambe/core/src/org/cayambe/ejb
In directory usw-pr-cvs1:/tmp/cvs-serv8240/src/org/cayambe/ejb
Modified Files:
CategoryFacadeSession.java ProductFacade.java
ProductFacadeSession.java
Log Message:
Fixed problems with admin. Made VO's Serializable. Debug linkage error. Jboss needs mysql.jar in classpath at startup.
Index: CategoryFacadeSession.java
===================================================================
RCS file: /cvsroot/cayambe/core/src/org/cayambe/ejb/CategoryFacadeSession.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CategoryFacadeSession.java 17 May 2002 22:23:15 -0000 1.7
--- CategoryFacadeSession.java 22 May 2002 20:45:41 -0000 1.8
***************
*** 23,28 ****
private CategoryListHandler listHandler;
private CategoryDAO categoryDAO;
! private static String CLASSNAME = CategoryFacadeSession.class.getName();
! private Category cat = (Category)Category.getInstance(CLASSNAME);
/**
--- 23,29 ----
private CategoryListHandler listHandler;
private CategoryDAO categoryDAO;
!
! private static String CLASSNAME = CategoryFacadeSession.class.getName();
! private Category cat;
/**
***************
*** 64,78 ****
Hashtable categories = getListHandler().getCategoryDAO().getAllCategories(selected);
! cat.debug("selected.getName() = " + selected.getName());
Enumeration enum = categories.elements();
while( enum.hasMoreElements() ){
CategoryVO current = (CategoryVO)enum.nextElement();
! cat.debug("current.getName() = " + current.getName());
! cat.debug("current.getParentId() = " + current.getParentId());
if( ! current.getParentId().equals( selected.get ) ){
CategoryVO parentOfCurrent = (CategoryVO)categories.get( current.getParentId() );
parentOfCurrent.addChild( current );
! cat.debug("parentOfCurrent.getName() = " + parentOfCurrent.getName());
}
}
--- 65,79 ----
Hashtable categories = getListHandler().getCategoryDAO().getAllCategories(selected);
! getCategoryLogger().debug("selected.getName() = " + selected.getName());
Enumeration enum = categories.elements();
while( enum.hasMoreElements() ){
CategoryVO current = (CategoryVO)enum.nextElement();
! getCategoryLogger().debug("current.getName() = " + current.getName());
! getCategoryLogger().debug("current.getParentId() = " + current.getParentId());
if( ! current.getParentId().equals( selected.get ) ){
CategoryVO parentOfCurrent = (CategoryVO)categories.get( current.getParentId() );
parentOfCurrent.addChild( current );
! getCategoryLogger().debug("parentOfCurrent.getName() = " + parentOfCurrent.getName());
}
}
***************
*** 133,136 ****
--- 134,145 ----
return listHandler;
}
+
+ private Category getCategoryLogger()
+ {
+ if( cat == null ){
+ cat = (Category)Category.getInstance(CLASSNAME);
+ }
+ return cat;
+ }
/**
***************
*** 163,166 ****
--- 172,176 ----
categoryDAO = null;
listHandler = null;
+ cat = null;
}
Index: ProductFacade.java
===================================================================
RCS file: /cvsroot/cayambe/core/src/org/cayambe/ejb/ProductFacade.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ProductFacade.java 28 Sep 2001 05:31:32 -0000 1.10
--- ProductFacade.java 22 May 2002 20:45:41 -0000 1.11
***************
*** 31,36 ****
throws RemoteException /*, ProductException */;
! public List SearchProductNotInCategory(CategoryVO c) //throws ProductException
! throws RemoteException /*, ProductException */;
!
! }
--- 31,33 ----
throws RemoteException /*, ProductException */;
! }
\ No newline at end of file
Index: ProductFacadeSession.java
===================================================================
RCS file: /cvsroot/cayambe/core/src/org/cayambe/ejb/ProductFacadeSession.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** ProductFacadeSession.java 16 May 2002 20:23:37 -0000 1.14
--- ProductFacadeSession.java 22 May 2002 20:45:41 -0000 1.15
***************
*** 24,28 ****
private ProductDAO productDAO;
! private static String CLASSNAME = ProductFacadeSession.class.getName();
private Category cat;
--- 24,28 ----
private ProductDAO productDAO;
! private static String CLASSNAME = CategoryFacadeSession.class.getName();
private Category cat;
***************
*** 31,40 ****
*/
public ProductFacadeSession() {
}
public List getProductList() //throws ProductException
{
- getCategoryLogger().debug("ProductSessionFacade.getProductList(): size: "
- + getListHandler().getProductList().size());
return getListHandler().getProductList();
}
--- 31,39 ----
*/
public ProductFacadeSession() {
+ getCategoryLogger().debug("create instance");
}
public List getProductList() //throws ProductException
{
return getListHandler().getProductList();
}
***************
*** 47,57 ****
public void SearchProduct(ProductVO p) //throws ProductException
! {
! getListHandler().SearchProduct(p);
! }
!
! public List SearchProductNotInCategory(CategoryVO c) //throws ProductException
! {
! return (List)getProductDAO().SearchProductNotInCategory(c);
}
--- 46,58 ----
public void SearchProduct(ProductVO p) //throws ProductException
! {
! try
! {
! getListHandler().SearchProduct(p);
! }
! catch (Exception e)
! {
! getCategoryLogger().debug("<-><->" + e.getMessage());
! }
}
***************
*** 86,90 ****
return productDAO;
}
!
private Category getCategoryLogger()
{
--- 87,91 ----
return productDAO;
}
!
private Category getCategoryLogger()
{
***************
*** 94,97 ****
--- 95,99 ----
return cat;
}
+
/**
***************
*** 123,127 ****
productDAO = null;
listHandler = null;
! cat = null;
}
--- 125,129 ----
productDAO = null;
listHandler = null;
! cat = null;
}
|