Ejemplo n.º 1
0
 public UserBean[] lookupStartsWith(String startOfLast, String startOfFirst) throws DAOException {
   try {
     UserBean[] list =
         getFactory()
             .match(
                 MatchArg.startsWithIgnoreCase("lastName", startOfLast),
                 MatchArg.startsWithIgnoreCase("firstName", startOfFirst));
     Arrays.sort(list);
     return list;
   } catch (RollbackException e) {
     throw new DAOException(e);
   }
 }
Ejemplo n.º 2
0
 public EventBean[] getEventsByLocation(int id) {
   try {
     EventBean[] list = factory.match(MatchArg.equals("locationid", id));
     return list;
   } catch (RollbackException e) {
     throw new DAOException(e);
   }
 }
Ejemplo n.º 3
0
 public Community[] getCommunityByMovie(String rM) throws DAOException {
   try {
     Community[] result = factory.match(MatchArg.contains("relatedMovie", rM));
     return result;
   } catch (RollbackException e) {
     // TODO Auto-generated catch block
     throw new DAOException(e);
   }
 }
Ejemplo n.º 4
0
  public EventBean[] getMyEvents(String userid) throws DAOException {
    try {

      EventBean[] list = factory.match(MatchArg.equals("userid", userid));
      Arrays.sort(list);
      return list;
    } catch (RollbackException e) {
      throw new DAOException(e);
    }
  }
Ejemplo n.º 5
0
 public Community[] search(String key) throws DAOException {
   try {
     Community[] oResults = factory.match(MatchArg.containsIgnoreCase("name", key));
     List<Community> list = Arrays.asList(oResults);
     Collections.sort(list, Community.REVERSE_TIMEORDER);
     Community[] results = (Community[]) list.toArray();
     return results;
   } catch (RollbackException e) {
     throw new DAOException(e);
   }
 }
Ejemplo n.º 6
0
  public synchronized List<Note> getSelectedCourseNotesList(String courseSelected)
      throws MyDAOException {
    BeanFactory<Note> factory;
    ArrayList<Note> al = new ArrayList<Note>();
    try {
      BeanTable<Note> table =
          BeanTable.getSQLInstance(Note.class, "fanc_note", jdbcDriver, jdbcURL);

      factory = table.getFactory();
      al =
          new ArrayList(
              Arrays.asList(factory.match(MatchArg.equals("courseName", courseSelected))));
    } catch (RollbackException e) {
      throw new MyDAOException(e);
    }

    return al;
  }