Examples of DAOFactory


Examples of de.paulwein.notes.dao.DAOFactory

   
    String key = req.getParameter("key");   
    Key mKey = KeyFactory.stringToKey(key);
   
    try {
      DAOFactory df = DAOFactory.getInstance();
      NotesDAO nDao = df.getDAO(Note.class, NotesDAO.class);
      Note note = nDao.loadNote(mKey);

      req.setAttribute("note", note);
      req.setAttribute("key", key);
      RequestDispatcher requestDispatcher = req.getRequestDispatcher(NOTE_SERVLET + ".jsp");
View Full Code Here

Examples of de.paulwein.notes.dao.DAOFactory

    String keyString = req.getParameter("key");
    Key mKey = KeyFactory.stringToKey(keyString);
   
    if(action.equals("delete")){
      try {
        DAOFactory df = DAOFactory.getInstance();
        NotesDAO nDao = df.getDAO(Note.class, NotesDAO.class);
        Note note = new Note();
        note.setKey(mKey);
        nDao.deleteNote(note);
        resp.sendRedirect(NOTELISTS_SERVLET);
      } catch (Exception e) {
View Full Code Here

Examples of de.paulwein.notes.dao.DAOFactory

    // fill textareas with old entries
    if(action != null && action.equals("edit")){
      req.setAttribute("edit", "edit");
      Key noteKey = KeyFactory.stringToKey(keyString);
      try {
        DAOFactory df = DAOFactory.getInstance();
        NotesDAO notesDAO = df.getDAO(Note.class, NotesDAO.class);
        Note note = notesDAO.loadNote(noteKey);
        req.setAttribute("note",note);
      } catch (DAOException e) {
        errorOccured(resp);
      }
View Full Code Here

Examples of de.paulwein.notes.dao.DAOFactory

    n.setNote(note);
    n.setUserId(user.getUserId());
    String action = req.getParameter("action");
   
    try {
      DAOFactory df = DAOFactory.getInstance();
      NotesDAO notesDAO = df.getDAO(Note.class, NotesDAO.class);
      // update Note
      if(action != null && action.equals("edit")){
        n.setKey(listKey);
        notesDAO.updateNote(n);
        keyString = KeyFactory.keyToString(listKey.getParent());
View Full Code Here

Examples of edu.ubb.warp.dao.DAOFactory

      e.printStackTrace();
    }
  }
 
  public void init_tab2() throws DAOException, ResourceNotFoundException, ResourceNotBookedException {
    DAOFactory df = DAOFactory.getInstance();
    BookingDAO bookDAO = df.getBookingDAO();
    ResourceDAO resourceDAO = df.getResourceDAO();
    ProjectDAO proDAO = df.getProjectDAO();
    ArrayList<Project> projectList = proDAO.getProjectsByUser(user);
    Resource userResource = resourceDAO.getResourceByUser(user);
    int min,max = 0;
    Booking bMinMax = bookDAO.getMinBookingByResource(userResource);
    min = bMinMax.getWeek();
View Full Code Here

Examples of hibernate.DaoFactory

public class ControllerFactory {

  public static HalconController GetHalconController()
  {
    return new HalconController(new DaoFactory());
  }
View Full Code Here

Examples of net.sourceforge.pebble.dao.DAOFactory

      setPermalinkProvider(new DefaultPermalinkProvider());
    }

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

Examples of net.sourceforge.wampum.system.data.DAOFactory

  }
 
  private static String[] columnNames = {"Date", "Payee", "Deposit", "Withdraw", "Balance"};
  public void updateRegisterTableData() {
    if (currentAccount != null) {
      DAOFactory daoFactory = new DAOFactory();
      RegisterDAO registerDao = (RegisterDAO)daoFactory.getDAO("register");
      transactionList = registerDao.loadTransactionsForAccount(currentAccount.getAccountID());
    }
   
    TableModel dataModel = new AbstractTableModel() {
      private static final long serialVersionUID = 1;
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory

            //no rows are selected
        } else {
            int selectedRow = lsm.getMinSelectionIndex();
            RegisterTrans trans = (RegisterTrans)transactionList.get(selectedRow);
           
        DAOFactory daoFactory = new DAOFactory();
        TransactionDAO transDao = (TransactionDAO)daoFactory.getDAO("transaction");
        List transList = transDao.load("WHERE TRANSACTION_ID = '" + trans.getTransactionID() + "'", null, false);
           
            transController.setTransaction((Transaction)transList.get(0), trans.getAmount(), trans.getBalance());
        }
  }
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory

      checkButtonStatus();
    }
  }
 
  private void updateParentList() {
    DAOFactory factory = new DAOFactory();
    AccountDAO accountDAO = (AccountDAO)factory.getDAO("account");
    String whereClause = null;
    if (this.currentAccount.getAccountID() != null && !this.currentAccount.getAccountID().equals("")) {
      whereClause = "WHERE ACCOUNT_ID NOT IN ('" + this.currentAccount.getAccountID() + "')";
    }
    List accountList = accountDAO.load(whereClause, "ORDER BY TITLE", true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.