Package org.fluxtream.core.domain.metadata

Examples of org.fluxtream.core.domain.metadata.VisitedCity


            // Loop over the points to see if they're already included in visited cities entries
            // it's important that the location points in the locations list are for a single apiKeyId
            // and are in forward chronological order.  Only add locations that aren't already contained
            // within a VisitedCity item to the newLocations list
            List<LocationFacet> newLocations=new ArrayList<LocationFacet>();
            VisitedCity existingVisitedCityRecord = null;

            for (LocationFacet locationFacet : rawLocations) {
                // Check to see if this location is in the current existingVisitedCityRecord (if any)
                if(existingVisitedCityRecord !=null && locationFacet.start <=existingVisitedCityRecord.end) {
                    // This location falls within the last fetched visited cities record, skip it
View Full Code Here


        }
        return null;
    }

    private void storeCityInfo(final LocationFacet locationResource, String date, final City city, final long start, final int count) {
        VisitedCity previousRecord = JPAUtils.findUnique(em, VisitedCity.class,
                                                         "visitedCities.byApiDateAndCity",
                                                         locationResource.guestId,
                                                         locationResource.apiKeyId,
                                                         date,
                                                         city.geo_id);
View Full Code Here

        return meters< CITY_RANGE;
    }

    @Transactional(readOnly=false)
    private void persistCity(final LocationFacet locationResource, final String date, long start, int count, final City city) {
        VisitedCity visitedCity = new VisitedCity(locationResource.apiKeyId);
        visitedCity.guestId = locationResource.guestId;
        visitedCity.locationSource = locationResource.source;
        visitedCity.api = locationResource.api;
        visitedCity.date = date;
        visitedCity.city = city;
View Full Code Here

TOP

Related Classes of org.fluxtream.core.domain.metadata.VisitedCity

Copyright © 2018 www.massapicom. 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.