📄 catalogservice.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -