Examples of findById()


Examples of auction.dao.UserDAO.findById()

        UserDAO userDAO = new UserDAOBean();
        ((GenericEJB3DAO) userDAO).setEntityManager(em);

        // Prepare a user object
        User user = userDAO.findById(1l, false);

        // Make a new auction item persistent
        Calendar startDate = GregorianCalendar.getInstance();
        Calendar endDate = GregorianCalendar.getInstance();
        endDate.add(Calendar.DAY_OF_YEAR, 3);
View Full Code Here

Examples of auction.dao.ejb3.UserDAOBean.findById()

        UserDAO userDAO = new UserDAOBean();
        ((GenericEJB3DAO) userDAO).setEntityManager(em);

        // Prepare a user object
        User user = userDAO.findById(1l, false);

        // Make a new auction item persistent
        Calendar startDate = GregorianCalendar.getInstance();
        Calendar endDate = GregorianCalendar.getInstance();
        endDate.add(Calendar.DAY_OF_YEAR, 3);
View Full Code Here

Examples of br.com.yaw.sjc.dao.MercadoriaDAO.findById()

    public void actionPerformed(ActionEvent e) {
      Integer id = getIdMercadoria();
      if (id != null) {
        try {
          MercadoriaDAO dao = new MercadoriaDAOJDBC();
          Mercadoria m = dao.findById(id);
          if (m != null) {
            dao.remove(m);
          }
         
          setVisible(false);
View Full Code Here

Examples of br.com.yaw.sjc.dao.MercadoriaDAOJDBC.findById()

    public void actionPerformed(ActionEvent e) {
      Integer id = getIdMercadoria();
      if (id != null) {
        try {
          MercadoriaDAO dao = new MercadoriaDAOJDBC();
          Mercadoria m = dao.findById(id);
          if (m != null) {
            dao.remove(m);
          }
         
          setVisible(false);
View Full Code Here

Examples of co.nubetech.crux.dao.MappingDAO.findById()

   
    reportDesignAction.setMappingId(120);
   
    MappingDAO mockedMappingDAO = mock(MappingDAO.class);
    reportDesignAction.setMappingDAO(mockedMappingDAO);
    when(mockedMappingDAO.findById((long)120)).thenReturn(mapping);
       
    List<ValueFilterType> valueFilterTypeList = new ArrayList<ValueFilterType>();
    valueFilterTypeList.add(valueFilterType1);
    valueFilterTypeList.add(valueFilterType2);
    valueFilterTypeList.add(valueFilterType3);
View Full Code Here

Examples of co.nubetech.crux.dao.ReportDAO.findById()

    reportDesignAction.setReport(report);
   
   
    ReportDAO mockedReportDAO = mock(ReportDAO.class);
    reportDesignAction.setReportDAO(mockedReportDAO);
    when(mockedReportDAO.findById(100)).thenReturn(report);
   
   
   
    //reportDesignAction.editReport();
   
View Full Code Here

Examples of com.apress.prospring3.springblog.service.EntryService.findById()

    for (Entry entry: entries) {
      System.out.println(entry);
   
   
    System.out.println("Finding entry with id 1");
    Entry entry = entryService.findById(1l);
    System.out.println(entry)
   
    // insert entry
    entry = new Entry();
    entry.setSubject("Testing entry clarence");
View Full Code Here

Examples of com.cloud.cluster.dao.StackMaidDao.findById()

        MockMaid delegate = new MockMaid();
        delegate.setValue("first");
        long taskId = taskMgr.pushCheckPoint(delegate);
       
        StackMaidDao maidDao = locator.getDao(StackMaidDao.class);
        CheckPointVO task = maidDao.findById(taskId);
       
        assertEquals(task.getDelegate(), MockMaid.class.getName());
        MockMaid retrieved = (MockMaid)SerializerHelper.fromSerializedString(task.getContext());
        assertEquals(retrieved.getValue(), delegate.getValue());
       
View Full Code Here

Examples of com.cloud.dc.dao.VlanDao.findById()

        IPAddressVO fakeIp = new IPAddressVO(new Ip("75.75.75.75"), 1, 0xaabbccddeeffL, 10, false);
        fakeList.add(fakeIp);
        SearchBuilder<IPAddressVO> fakeSearch = mock(SearchBuilder.class);
        modelImpl.IpAddressSearch = fakeSearch;
        VlanDao fakeVlanDao = mock(VlanDao.class);
        when (fakeVlanDao.findById(anyLong())).thenReturn(mock(VlanVO.class));
        modelImpl._vlanDao = fakeVlanDao;
        when(fakeSearch.create()).thenReturn(mock(SearchCriteria.class));
        when(
                ipAddressDao.search(
                        any(SearchCriteria.class),
View Full Code Here

Examples of com.cloud.network.dao.IPAddressDao.findById()

                        any(SearchCriteria.class),
                        (Filter)org.mockito.Matchers.isNull()
                        )
                ).thenReturn(fakeList);
        when (
                ipAddressDao.findById(anyLong())
                ).thenReturn(fakeIp);
        Account fakeAccount = mock(Account.class);
        when(fakeAccount.getId()).thenReturn(1L);
        Network fakeNetwork = mock(Network.class);
        when(fakeNetwork.getId()).thenReturn(1L);
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.