Examples of DAOFactory


Examples of at.fhj.itm.dao.DAOFactory

  public void setUp() throws Exception {
   
    rebuildDatabase();
    connection = getUnitTestConnection();
   
    DAOFactory factory = MySqlDAOFactory.getInstance();
    dao = factory.getTripDAO();
   
  }
View Full Code Here

Examples of br.gov.serpro.ouvidoria.dao.DaoFactory

  protected void doGet(HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {

    try {

      final DaoFactory daoFactory = new HibernateDaoFactory();

      final Long funcionarioId = (Long) request.getSession()
          .getAttribute(Constants.PA_FUNCIONARIO);

      final FuncionarioCtrl funcionarioCtrl = new FuncionarioCtrl(
View Full Code Here

Examples of br.gov.serpro.ouvidoria.dao.DaoFactory

            throws Exception {

        ActionMessages errors = new ActionMessages();

        try {
            DaoFactory daoFactory = new HibernateDaoFactory();

            request.setAttribute("txt_periodo_i", "");
            request.setAttribute("txt_periodo_f", "");

            request.setAttribute("sel_ouvidoria", "");
            request.setAttribute("sel_assunto", "");
            request.setAttribute("sel_tipo_mensagem", "");
            request.setAttribute("sel_situacao", "");

            request.setAttribute("txt_protocolo", "");
            request.setAttribute("txt_palavra_chave", "");

            Long funcionarioId = (Long) request.getSession().getAttribute(Constants.PA_FUNCIONARIO);
           
          FuncionarioCtrl funcionarioCtrl = new FuncionarioCtrl(getDaoFactory());
         
          Funcionario funcionario = (Funcionario) funcionarioCtrl.get(funcionarioId)

            Orgao orgao = getOrgao(request);

            Collection assuntos = null;
            if ( funcionario.getNivelAtuacao() == Funcionario.NA_ORGAO) {
                assuntos = orgao.getListaAssuntosSubOrgaos()
            } else {
                Comparator ordem = new Comparator() {
                    public int compare(Object obj1, Object obj2) {
                        PersistentObject pobj1 = (PersistentObject) obj1;
                        PersistentObject pobj2 = (PersistentObject) obj2;
                        if (pobj1 != null && pobj1.getDescricao() != null) {
                            return pobj1.getDescricao().compareTo(pobj2.getDescricao());
                        }
                        return 0;
                    }
                };

                assuntos = new TreeSet(ordem);
                for(Iterator iter=funcionario.getListaSubOrgaosAtivos().iterator(); iter.hasNext(); ) {
                    SubOrgao subOrgao = (SubOrgao) iter.next();
                    assuntos.addAll(subOrgao.getListaAssunto(Assunto.ATIVO));
                }
            }
           
            Collection tipoMsg = orgao.getListaTipoMensagem();

            // Qual classe representa ouvidorias ?
            request.setAttribute("cas_ouvidorias", daoFactory.create(
                    Instituicao.class).list());

            request.setAttribute("cas_assuntos", assuntos);

            request.setAttribute("cas_tipos_mensagem", tipoMsg);

            request.setAttribute("cas_protocolos", daoFactory.create(
                    Protocolo.class).list());
           
            request.setAttribute("cas_situacao_mensagem", daoFactory.create(
                    EstadoAcionamento.class).list());

        } catch (Throwable t) {
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
                    "error.solucao.excecao"));
View Full Code Here

Examples of com.eforce.baby.common.factory.DAOFactory

    }
   
   
    private MenuDAO getMenuDAO()
    {
        DAOFactory factory = DAOFactory.getInstance();
        return ((MenuDAO) factory.getDAO(IConstants.CLASS_MENU_DAO));
    }
View Full Code Here

Examples of com.elasticinbox.core.DAOFactory

{
  private final MessageDAO messageDAO;

  public DeliveryAgentFactory()
  {
    DAOFactory dao = DAOFactory.getDAOFactory();
    messageDAO = dao.getMessageDAO();
  }
View Full Code Here

Examples of com.elasticinbox.core.DAOFactory

    LoggerFactory.getLogger(MessageResource.class);

  @Context UriInfo uriInfo;

  public MessageResource() {
    DAOFactory dao = DAOFactory.getDAOFactory();
    messageDAO = dao.getMessageDAO();
  }
View Full Code Here

Examples of com.elasticinbox.core.DAOFactory

    LoggerFactory.getLogger(AccountResource.class);

  @Context UriInfo uriInfo;

  public AccountResource() {
    DAOFactory dao = DAOFactory.getDAOFactory();
    accountDAO = dao.getAccountDAO();
  }
View Full Code Here

Examples of com.elasticinbox.core.DAOFactory

  private final LabelDAO labelDAO;

  @Context UriInfo uriInfo;

  public ScrubResource() {
    DAOFactory dao = DAOFactory.getDAOFactory();
    messageDAO = dao.getMessageDAO();
    labelDAO = dao.getLabelDAO();
  }
View Full Code Here

Examples of com.elasticinbox.core.DAOFactory

    LoggerFactory.getLogger(SingleMessageResource.class);

  @Context UriInfo uriInfo;

  public SingleMessageResource() {
    DAOFactory dao = DAOFactory.getDAOFactory();
    messageDAO = dao.getMessageDAO();
  }
View Full Code Here

Examples of com.elasticinbox.core.DAOFactory

  private final static Logger logger = LoggerFactory
      .getLogger(MailboxResource.class);

  public MailboxResource()
  {
    DAOFactory dao = DAOFactory.getDAOFactory();
    labelDAO = dao.getLabelDAO();
    messageDAO = dao.getMessageDAO();
  }
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.