⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mockcategorydao.java

📁 pebble-blog 博客源码博客源码博客源码
💻 JAVA
字号:
package net.sourceforge.pebble.dao.mock;import net.sourceforge.pebble.dao.CategoryDAO;import net.sourceforge.pebble.dao.PersistenceException;import net.sourceforge.pebble.domain.Category;import net.sourceforge.pebble.domain.CategoryBuilder;import net.sourceforge.pebble.domain.Blog;/** * A mock implementation of the CategoryDAO interface that does nothing. This * is used when performing unit tests. * * @author    Simon Brown */public class MockCategoryDAO implements CategoryDAO {  /**   * Gets the categories for a particular blog.   *   * @param blog    the owning blog   * @return  a Collection of Category instances   * @throws  PersistenceException    if categories cannot be loaded   */  public Category getCategories(Blog blog) throws PersistenceException {    CategoryBuilder builder = new CategoryBuilder(blog);    return builder.getRootCategory();  }  /**   * Adds the specified category.   *   * @param category the Category instance to be added   * @param blog     the owning blog   * @throws net.sourceforge.pebble.dao.PersistenceException   *          if something goes wrong storing the category   */  public void addCategory(Category category, Blog blog) throws PersistenceException {  }  /**   * Updates the specified category.   *   * @param category the Category instance to be updated   * @param blog     the owning blog   * @throws net.sourceforge.pebble.dao.PersistenceException   *          if something goes wrong storing the category   */  public void updateCategory(Category category, Blog blog) throws PersistenceException {  }  /**   * Removes the specified category.   *   * @param category the Category instance to be removed   * @param blog     the owning blog   * @throws net.sourceforge.pebble.dao.PersistenceException   *          if something goes wrong removing the category   */  public void deleteCategory(Category category, Blog blog) throws PersistenceException {  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -