コード例 #1
0
ファイル: UserDAO.java プロジェクト: cneale/Sample-Code
 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);
   }
 }
コード例 #2
0
ファイル: EventDAO.java プロジェクト: cneale/Sample-Code
 public EventBean[] getEventsByLocation(int id) {
   try {
     EventBean[] list = factory.match(MatchArg.equals("locationid", id));
     return list;
   } catch (RollbackException e) {
     throw new DAOException(e);
   }
 }
コード例 #3
0
ファイル: CommunityDAO.java プロジェクト: weilongw/Breeze
 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);
   }
 }
コード例 #4
0
ファイル: EventDAO.java プロジェクト: cneale/Sample-Code
  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);
    }
  }
コード例 #5
0
ファイル: CommunityDAO.java プロジェクト: weilongw/Breeze
 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);
   }
 }
コード例 #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;
  }