catalogservice.java
来自「Jaoso新闻文章发布系统 0.9.1final 程序架构: Struts」· Java 代码 · 共 96 行
JAVA
96 行
package jaoso.news.service;
import jaoso.news.domain.Catalog;
import jaoso.news.exception.CatalogExistException;
import java.io.Serializable;
import java.util.Collection;
import java.util.Map;
/**
* @author edgeloner
* @since 2004-6-21
*
*/
public interface CatalogService {
/**
* Load a GbCatalog by id from Database
*
* @param id
* catalog id
* @return a GbCatalog instance
*/
Catalog getCatalog(Serializable id);
/**
* get a catalog tree, return collection as this.returnRS,elemment is
* HashMap, it look like {"122dfd2","catalog title"},
*
* @param hierarchy
* String,
* @param catalog
* GbCatalog
* @return collection
*/
Collection getCatalogTree(int hierarchy, Catalog catalog);
/**
* get parent catalog id and title as map array
*
* @param id
* catalog id
*
* @return map array
*/
Map[] getParents(Serializable id);
/**
* Add a new GbCatalog to Database
*
* @param catalog
* GbCatalog
* @param parentid
* parent catalog id
* @throws CatalogExistException
* if catalog title exist
*/
void createCatalog(Catalog catalog, Serializable parentid)
throws CatalogExistException;
/**
* Load all GbCatalog from Database
*
* @return catalog array
*/
Catalog[] findAllCatalog();
/**
* get catalogs by parent catalog id
*
* @param id
* parent catalog id
*
* @return catalog array
*/
Catalog[] findCatalogByParent(Serializable id);
/**
* Remove a GbCatalog from Database
*
* @param catalogId
* GbCatalog
*/
void removeCatalog(Serializable catalogId);
/**
* Update a GbCatalog to Database
*
* @param catalog
* GbCatalog
* @throws CatalogExistException
* if catalog title exist
*/
void updateCatalog(Catalog catalog) throws CatalogExistException;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?