5859606162636465
} /** Return the id associated with the name or null if none exists */ public synchronized Integer getSourceId(String sourceName) { LogicalSource pair = _nameIndex.get(sourceName); return null != pair ? pair.getId() : null; }
6465666768697071
return null != pair ? pair.getId() : null; } public synchronized String getSourceName(Integer id) { LogicalSource pair = _idIndex.get(id); return null != pair ? pair.getName() : null; }
868788899091929394
} public void updateFromIdNamePairs(Collection<IdNamePair> newPairs) { ArrayList<LogicalSource> srcCollection = new ArrayList<LogicalSource>(newPairs.size()); for (IdNamePair pair: newPairs) srcCollection.add(new LogicalSource(pair.getId().intValue(), pair.getName())); update(srcCollection); }