Package net.sourceforge.pebble.dao

Examples of net.sourceforge.pebble.dao.CategoryDAO


    }

    // load categories
    try {
      DAOFactory factory = DAOFactory.getConfiguredFactory();
      CategoryDAO dao = factory.getCategoryDAO();
      rootCategory = dao.getCategories(this);
    } catch (PersistenceException pe) {
      pe.printStackTrace();
    }

    refererFilterManager = new RefererFilterManager(this);
View Full Code Here


    }

    // load categories
    try {
      DAOFactory factory = DAOFactory.getConfiguredFactory();
      CategoryDAO dao = factory.getCategoryDAO();
      rootCategory = dao.getCategories(this);
    } catch (PersistenceException pe) {
      pe.printStackTrace();
    }

    refererFilterManager = new RefererFilterManager(this);
View Full Code Here

          category = new Category(id, name);
        }

        blog.addCategory(category);
        DAOFactory factory = DAOFactory.getConfiguredFactory();
        CategoryDAO dao = factory.getCategoryDAO();
        dao.addCategory(category, blog);
      }
    } catch (Exception e) {
      log.error("Exception encountered", e);
    }
  }
View Full Code Here

    for (String categoryStr : categories) {
      if(categoryStr != null && categoryStr.trim().length() > 0) {
        Category category = new Category(categoryStr.trim(), categoryStr.trim());
        DAOFactory factory = DAOFactory.getConfiguredFactory();
        CategoryDAO dao = factory.getCategoryDAO();
        dao.addCategory(category, blog);
        blog.addCategory(category);
        entry.addCategory(category);
      }
    }
    entry.setPublished("Publish".equals(status));
View Full Code Here

        blog.addCategory(category);
        category.setTags(tags);
        try {
          // add it to the persistent store
          DAOFactory factory = DAOFactory.getConfiguredFactory();
          CategoryDAO dao = factory.getCategoryDAO();
          dao.addCategory(category, blog);
        } catch (PersistenceException pe) {
          pe.printStackTrace();
        }
      } else {
        // updating an existing category
        category.setName(name);
        category.setTags(tags);
        try {
          // add it to the persistent store
          DAOFactory factory = DAOFactory.getConfiguredFactory();
          CategoryDAO dao = factory.getCategoryDAO();
          dao.updateCategory(category, blog);
        } catch (PersistenceException pe) {
          pe.printStackTrace();
        }
      }
    }
View Full Code Here

          if (category != null) {
            blog.removeCategory(category);
            try {
              // remove it from the persistent store
              DAOFactory factory = DAOFactory.getConfiguredFactory();
              CategoryDAO dao = factory.getCategoryDAO();
              dao.deleteCategory(category, blog);
            } catch (PersistenceException pe) {
              pe.printStackTrace();
            }
          }
        }
View Full Code Here

TOP

Related Classes of net.sourceforge.pebble.dao.CategoryDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.