Examples of Note


Examples of com.google.gwt.gears.sample.gwtnote.client.rpc.Note

    ResultSet rs = null;
    ArrayList<Note> al = new ArrayList<Note>();
    try {
      rs = db.execute(DB_FETCH_TEXT);
      while (rs.isValidRow()) {
        Note nd = new Note(rs.getFieldAsString(0), rs.getFieldAsString(1),
            rs.getFieldAsString(2));
        al.add(nd);
        rs.next();
      }
    } catch (DatabaseException e) {
View Full Code Here

Examples of com.google.gwt.gears.sample.gwtnote.client.rpc.Note

   */
  protected Map<String,Note> getDataMap() {
    Map<String,Note> m = (Map<String,Note>) getServletContext().getAttribute("com.google.gearsdemo.data");
    if (m == null) {
      m = new HashMap<String,Note>();
      m.put("default", new Note("default", "1", ""));
      getServletContext().setAttribute("com.google.gearsdemo.data", m);
    }
    return m;
  }
View Full Code Here

Examples of com.restfb.types.Note

    arrayParams[1] = Parameter.with("message","note message");   
    FacebookType mockFbType = EasyMock.createMock(FacebookType.class);
    expect(mockFbClient.publishObject(connection, FacebookType.class, arrayParams)).andReturn(mockFbType);   
    expect(mockFbType.getId()).andReturn("122788341354");
   
    Note expectedNote = loadObjectFromJSON("/examples/note.json",Note.class);
    expect(mockFbClient.getFacebookObjectByID("122788341354", Note.class)).andReturn(expectedNote);
    //note comments   
    expect(mockFbClient.getFacebookConnectionByID("122788341354/comments", Comment.class)).andReturn(new ArrayList<Comment>());
    //note likes
    expect(mockFbClient.getFacebookConnectionByID("122788341354/likes", NamedFacebookType.class)).andReturn(new ArrayList<NamedFacebookType>());
View Full Code Here

Examples of de.paulwein.notes.pojo.Note

      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.pojo.Note

    String subject = req.getParameter("subject");
    String note = req.getParameter("note");
    String keyString = req.getParameter("key");
    Key listKey = KeyFactory.stringToKey(keyString);
   
    Note n = new Note();
    n.setDate(new Date());
    n.setSubject(subject);
    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());
      }
      else // create new note and persist it
        notesDAO.addNote(listKey, n);
View Full Code Here

Examples of de.paulwein.notes.pojo.Note

    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");
      requestDispatcher.forward(req, resp);
View Full Code Here

Examples of de.paulwein.notes.pojo.Note

   
    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) {
        errorOccured(resp);
      }
View Full Code Here

Examples of de.paulwein.notes.pojo.Note

  }

  @Override
  public Note loadNote(Key key) throws DAOException {
    PersistenceManager pm = mPmf.getPersistenceManager();
    Note note = null;
    try {
      note = pm.getObjectById(Note.class, key);
    } catch (Exception ex) {
      ex.printStackTrace();
      throw new DAOException();
View Full Code Here

Examples of de.paulwein.notes.pojo.Note

  }

  @Override
  public Note loadNote(Key key) throws DAOException {
    EntityManager em = mEmf.createEntityManager();
    Note note = null;
    try{
    note = em.find(Note.class, key);
    } catch (Exception e) {
      e.printStackTrace();
      throw new DAOException();
View Full Code Here

Examples of de.paulwein.notes.pojo.Note

     
      List<Entity> entities = pq.asList(FetchOptions.Builder.withDefaults());
      List<Note> notes = new ArrayList<Note>();
     
      for(Entity e : entities){
        Note note = Transformer.entity2Note(e);
        notes.add(note);
      }
     
      notesList.setNotes(notes);
     
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.