public PersistenceContextReferenceMetaData getPersistenceContextReferenceByName(String name) { return AbstractMappedMetaData.getByName(name, persistenceContextRefs); }
public boolean addAll(Collection<? extends T> c) { boolean result = false; for (T object : c) { if (add(object)) result = true; } return result; }
@Override protected void addNotification(SecurityRoleMetaData added) { super.addNotification(added); // update the roles map processSecurityRoleMetaData(added); }
public void merge(ApplicationExceptionsMetaData override, ApplicationExceptionsMetaData original) { super.merge(override, original); MergeUtil.merge(this, override, original); } }
public boolean add(T o) { if (o == null) throw new IllegalArgumentException("Null object"); String key = o.getKey(); if (key == null) throw new IllegalArgumentException("No " + keyName); if (map == null) map = new NonNullLinkedHashMap<String, T>(); T result = map.put(key, o); if (result != null) removeNotification(result); addNotification(o); return true; }
public void clear() { if(map != null) for (T t : map.values()) removeNotification(t); map = null; }
/** * Convience method for treating the map as an ordered list. O(n), so not * efficient for large maps. * * @param index * @return */ public ModuleMetaData get(int index) { if (index >= size()) throw new IndexOutOfBoundsException(index + " >= " + size()); Iterator<ModuleMetaData> iterator = super.iterator(); ModuleMetaData module = null; for (int n = 0; n <= index; n++) module = iterator.next(); return module; } }
public boolean removeAll(Collection<?> c) { if (map == null) return false; boolean result = false; for (Object object : c) { if (remove(object)) result = true; } return result; }
public boolean containsAll(Collection<?> c) { if (map == null) return c.isEmpty(); for (Object object : c) { if (contains(object) == false) return false; } return true; }
public void merge(MessageDestinationsMetaData override, MessageDestinationsMetaData original) { // TODO: duplicated merge methods? super.merge(override, original); MergeUtil.merge(this, override, original); } }
public boolean add(T o) { if (o == null) throw new IllegalArgumentException("Null object"); String key = o.getKey(); if (key == null) throw new IllegalArgumentException(keyName + " (/key) is null"); if (map == null) map = new NonNullLinkedHashMap<String, T>(); T result = map.put(key, o); if (result != null) removeNotification(result); addNotification(o); return true; }
public void clear() { if(map != null) for (T t : map.values()) removeNotification(t); map = null; }
ServletMetaData match = ((AbstractMappedMetaData<ServletMetaData>)xml).get(servletName); if(match == null) ((AbstractMappedMetaData<ServletMetaData>)merged).add(servlet); ((AbstractMappedMetaData<ServletMetaData>)merged).add(servlet); annServlet = ((AbstractMappedMetaData<ServletMetaData>)annotation).get(name); if(annServlet == null) if(dot >= 0) className = className.substring(dot+1); annServlet = ((AbstractMappedMetaData<ServletMetaData>)annotation).get(className); mergedServletMetaData.merge(servlet, annServlet); ((AbstractMappedMetaData<ServletMetaData>)merged).add(mergedServletMetaData);
/** * Convience method for treating the map as an ordered list. O(n), so not * efficient for large maps. * * @param index * @return */ public ModuleMetaData get(int index) { if(index >= size()) throw new IndexOutOfBoundsException(index+" >= "+size()); Iterator<ModuleMetaData> iterator = super.iterator(); ModuleMetaData module = null; for(int n = 0; n <= index; n ++) module = iterator.next(); return module; }
public boolean removeAll(Collection<?> c) { if (map == null) return false; boolean result = false; for (Object object : c) { if (remove(object)) result = true; } return result; }
public boolean containsAll(Collection<?> c) { if (map == null) return c.isEmpty(); for (Object object : c) { if (contains(object) == false) return false; } return true; }
public ServiceReferenceMetaData getServiceReferenceByName(String name) { return AbstractMappedMetaData.getByName(name, getServiceReferences()); } public ServiceReferencesMetaData getServiceReferences()
public void merge(MessageDestinationsMetaData override, MessageDestinationsMetaData original) { // TODO: duplicated merge methods? super.merge(override, original); MergeUtil.merge(this, override, original); } }
public boolean remove(Object o) { if (o == null) throw new IllegalArgumentException("Null object"); if (o instanceof MappableMetaData) return false; if (map == null) return false; MappableMetaData m = (MappableMetaData) o; String key = m.getKey(); MappableMetaData v = map.get(key); if (m.equals(v)) { T result = map.remove(key); if (result != null) { removeNotification(result); return true; } } return false; }