Examples of EventDAO


Examples of com.abiquo.server.core.event.EventDAO

    public EventRep(final EntityManager entityManager)
    {
        assert entityManager != null;
        assert entityManager.isOpen();

        this.eventDAO = new EventDAO(entityManager);
    }
View Full Code Here

Examples of com.streamreduce.core.dao.EventDAO

        when(cpf.externalIntegrationConnectionProviderFromId(sampleFeedConnection.getProviderId()))
                .thenReturn(ConnectionProvidersForTests.RSS_PROVIDER);
        ReflectionTestUtils.setField(inventoryService, "connectionProviderFactory", cpf);

        SecurityService ssMock = Mockito.mock(SecurityService.class);
        EventDAO edMock = Mockito.mock(EventDAO.class);
        EventServiceImpl esImpl = new EventServiceImpl();

        // Return null for the current user
        Mockito.when(ssMock.getCurrentUser()).thenThrow(new AuthenticationException("A user must be logged in!"));
View Full Code Here

Examples of de.timefinder.data.access.EventDao

    }

    public long start(int seconds, long seed, String fileOrFolder) throws Exception {
//        logger.info("process file:" + fileOrFolder);

        EventDao eDao = new EventDaoSimpl();
        PersonDao pDao = new PersonDaoSimpl();
        LocationDao lDao = new LocationDaoSimpl();
        FeatureDao fDao = new FeatureDaoSimpl();
        DataPool dataPool = new DataPoolImpl();
        dataPool.setDao(eDao);
View Full Code Here

Examples of de.timefinder.data.access.EventDao

    }

    // taken from xstream import
    private void oldAssertations(DataPool importDataPool) {
        PersonDao newPDao = (PersonDao) importDataPool.getDao(Person.class);
        EventDao newEDao = (EventDao) importDataPool.getDao(Event.class);
        FeatureDao newFDao = (FeatureDao) importDataPool.getDao(Feature.class);
        LocationDao newLDao = (LocationDao) importDataPool.getDao(Location.class);

        assertEquals(4, newPDao.getAll().size());
        assertEquals(4, newFDao.getAll().size());
        assertEquals(4, newEDao.getAll().size());
        assertEquals(4, newLDao.getAll().size());

        assertNotNull(newPDao);
        assertNotNull(newFDao);
        assertNotNull(newEDao);
        assertNotNull(newLDao);

        Person newPerson1 = newPDao.findFirstByName("person1");
        Person newPerson2 = newPDao.findFirstByName("person2");
        Person newPerson3 = newPDao.findFirstByName("person3");
        Person newPerson4 = newPDao.findFirstByName("person4");

        Event newEv1 = newEDao.findFirstByName("event1");
        Event newEv2 = newEDao.findFirstByName("event2");
        Event newEv3 = newEDao.findFirstByName("event3");
        Event newEv4 = newEDao.findFirstByName("event4");

        Location newLoc1 = newLDao.findFirstByName("location1");
        Location newLoc2 = newLDao.findFirstByName("location2");
        Location newLoc3 = newLDao.findFirstByName("location3");
        Location newLoc4 = newLDao.findFirstByName("location4");
View Full Code Here

Examples of org.grouplens.lenskit.data.dao.EventDAO

        rs.add(rating(4, 10, 4, 1));
        rs.add(rating(7, 10, 4, 1));
        rs.add(rating(1, 11, 5, 1));
        rs.add(rating(3, 11, 5, 2));
        rs.add(rating(4, 11, 5, 1));
        EventDAO dao = EventCollectionDAO.create(rs);
        snap = new PackedPreferenceSnapshotBuilder(dao, new Random()).get();
    }
View Full Code Here

Examples of org.grouplens.lenskit.data.dao.EventDAO

        rs.add(Ratings.make(1, 5, 2));
        rs.add(Ratings.make(1, 7, 4));
        rs.add(Ratings.make(8, 4, 5));
        rs.add(Ratings.make(8, 5, 4));

        EventDAO dao = new EventCollectionDAO(rs);

        LenskitConfiguration config = new LenskitConfiguration();
        config.bind(EventDAO.class).to(dao);
        config.bind(ItemScorer.class).to(SlopeOneItemScorer.class);
        config.bind(PreferenceDomain.class).to(new PreferenceDomain(1, 5));
View Full Code Here

Examples of org.grouplens.lenskit.data.dao.EventDAO

    @Override
    public void execute() throws IOException {
        logger.info("packing ratings from {}", input);
        logger.debug("using delimiter {}", getDelimiter());
        EventDAO dao = input.getEventDAO();
        EnumSet<BinaryFormatFlag> flags = EnumSet.noneOf(BinaryFormatFlag.class);
        if (useTimestamps()) {
            flags.add(BinaryFormatFlag.TIMESTAMPS);
        }
        logger.info("packing to {} with flags {}", getOutputFile(), flags);
        Closer closer = Closer.create();
        try {
            BinaryRatingPacker packer = closer.register(BinaryRatingPacker.open(getOutputFile(), flags));
            Cursor<Rating> ratings = closer.register(dao.streamEvents(Rating.class));
            packer.writeRatings(ratings);
            logger.info("packed {} ratings", packer.getRatingCount());
        } catch (Throwable th) {
            throw closer.rethrow(th);
        } finally {
View Full Code Here

Examples of org.grouplens.lenskit.data.dao.EventDAO

        List<Rating> rs = new ArrayList<Rating>();
        rs.add(Ratings.make(1, 5, 2));
        rs.add(Ratings.make(1, 7, 4));
        rs.add(Ratings.make(8, 4, 5));
        rs.add(Ratings.make(8, 5, 4));
        EventDAO dao = new EventCollectionDAO(rs);

        LenskitConfiguration config = new LenskitConfiguration();
        config.bind(EventDAO.class).to(dao);
        config.bind(ItemItemModel.class).toProvider(NormalizingItemItemModelBuilder.class);
        config.bind(ItemScorer.class).to(ItemItemScorer.class);
View Full Code Here

Examples of org.grouplens.lenskit.data.dao.EventDAO

        rs.add(Ratings.make(1, 5, 2));
        rs.add(Ratings.make(1, 7, 4));
        rs.add(Ratings.make(8, 4, 5));
        rs.add(Ratings.make(8, 5, 4));

        EventDAO dao = new EventCollectionDAO(rs);

        LenskitConfiguration config = new LenskitConfiguration();
        config.bind(EventDAO.class).to(dao);
        config.bind(ItemScorer.class).to(UserUserItemScorer.class);
        config.bind(NeighborFinder.class).to(LiveNeighborFinder.class);
View Full Code Here

Examples of org.grouplens.lenskit.data.dao.EventDAO

        rs.add(Ratings.make(1, 5, 2));
        rs.add(Ratings.make(1, 7, 4));
        rs.add(Ratings.make(8, 4, 5));
        rs.add(Ratings.make(8, 5, 4));

        EventDAO dao = EventCollectionDAO.create(rs);

        LenskitConfiguration config = new LenskitConfiguration();
        config.bind(EventDAO.class).to(dao);
        config.bind(ItemScorer.class).to(UserUserItemScorer.class);
        config.bind(NeighborFinder.class).to(SnapshotNeighborFinder.class);
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.