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); } }
public EventBean[] getEventsByLocation(int id) { try { EventBean[] list = factory.match(MatchArg.equals("locationid", id)); return list; } catch (RollbackException e) { throw new DAOException(e); } }
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); } }
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); } }
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); } }
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; }