Package com.serotonin.db.pair

Examples of com.serotonin.db.pair.IntStringPair


        watchListDao.saveWatchList(watchList);

        setWatchList(user, watchList);
        watchListDao.saveSelectedWatchList(user.getId(), watchList.getId());

        return new IntStringPair(watchList.getId(), watchList.getName());
    }
View Full Code Here


              username = Common.translate("watchlist.userDNE");
            }else{
              username = watchListUser.getUsername();
            }
            //Add the Username to the name to know who's it is
            watchListUsers.add(new IntStringPair(watchList.getId(), username));
            userWatchLists.add(new IntStringPair(watchList.getId(), watchList.getName() + " (" + username + ")"));
           
            watchListNames.add(new IntStringPair(watchList.getId(), watchList.getName()));
        }

        if (!found) {
            // The user's default watch list was not found. It was either deleted or unshared from them. Find a new one.
            // The list will always contain at least one, so just use the id of the first in the list.
View Full Code Here

        });
        response.addData("events", events);

        List<IntStringPair> dataSources = new ArrayList<IntStringPair>();
        for (DataSourceVO<?> ds : new DataSourceDao().getDataSources())
            dataSources.add(new IntStringPair(ds.getId(), ds.getName()));
        response.addData("dataSources", dataSources);

        return response;
    }
View Full Code Here

        List<DataPointVO> allPoints = new DataPointDao().getDataPoints(DataPointExtendedNameComparator.instance, false);
        List<IntStringPair> sourcePoints = new ArrayList<IntStringPair>();
        List<IntStringPair> targetPoints = new ArrayList<IntStringPair>();
        for (DataPointVO point : allPoints) {
            if (Permissions.hasDataPointReadPermission(user, point))
                sourcePoints.add(new IntStringPair(point.getId(), point.getExtendedName()));
            if (point.getPointLocator().isSettable() && Permissions.hasDataPointSetPermission(user, point))
                targetPoints.add(new IntStringPair(point.getId(), point.getExtendedName()));
        }

        data.put("sourcePoints", sourcePoints);
        data.put("targetPoints", targetPoints);
View Full Code Here

    public List<IntStringPair> getImageStateList() {
        List<IntStringPair> result = new ArrayList<IntStringPair>();
        for (Integer state : stateImageMap.keySet()) {
            Integer imageId = stateImageMap.get(state);

            IntStringPair stateList = null;
            for (IntStringPair ivp : result) {
                if (ivp.getKey() == imageId) {
                    stateList = ivp;
                    break;
                }
            }

            if (stateList == null) {
                stateList = new IntStringPair(imageId, state.toString());
                result.add(stateList);
            }
            else
                stateList.setValue(stateList.getValue() + ',' + state.toString());
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of com.serotonin.db.pair.IntStringPair

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.