1   package org.wcb.model.manager.impl;
2   
3   import org.wcb.model.dao.IDao;
4   import org.wcb.model.manager.IBaseManager;
5   import org.wcb.exception.DAOException;
6   
7   import java.util.List;
8   
9   /**
10   * <small>
11   * Copyright (c)  2006  wbogaardt.
12   * Permission is granted to copy, distribute and/or modify this document
13   * under the terms of the GNU Free Documentation License, Version 1.2
14   * or any later version published by the Free Software Foundation;
15   * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
16   * Texts.  A copy of the license is included in the section entitled "GNU
17   * Free Documentation License".
18   * <p/>
19   * $File:  $ <br>
20   * $Change:  $ submitted by $Author: wbogaardt $ at $DateTime: Mar 24, 2006 11:14:01 AM $ <br>
21   * </small>
22   *
23   * @author wbogaardt
24   * @version 1
25   *          Date: June 11, 2007
26   *          Time: 10:00:01 AM
27   */
28  public class BaseManager implements IBaseManager {
29  
30      private IDao iDAO;
31  
32      /**
33       * This is injected by Spring framework normally.
34       *
35       * @param oDAO AircraftDAO object injected by spring.
36       */
37      public void setDao(IDao oDAO) {
38          this.iDAO = oDAO;
39      }
40  
41      public List getBy(Class clazz, String property, Object value) {
42          try {
43              return iDAO.getObjectsBy(clazz, property, value);
44          } catch(DAOException daoe) {
45              return null;
46          }                  
47      }
48  }