public Map<String, ServiceRef> getServiceRefMap() { if (serviceRef == null) { serviceRef = new KeyedCollection<String, ServiceRef>(); } return this.serviceRef.toMap(); }
public Map<String, RelationField> getRelationshipFieldMap() { final KeyedCollection<String, RelationField> fields = new KeyedCollection<String, RelationField>(); if (oneToOne != null) fields.addAll(oneToOne); if (oneToMany != null) fields.addAll(oneToMany); if (manyToMany != null) fields.addAll(manyToMany); if (manyToOne != null) fields.addAll(manyToOne); return fields.toMap(); }
final KeyedCollection<String, DataSource> dataSources = new KeyedCollection<String, DataSource>(); final KeyedCollection<String, DataSource> dataSourcesFromCompManagedBeans = new KeyedCollection<String, DataSource>(); dataSourcesFromCompManagedBeans.addAll(consumer.getDataSource()); continue; dataSources.addAll(consumer.getDataSource()); final Map<String, DataSource> dataSourcesMap = dataSources.toMap(); for(DataSource dataSource : dataSourcesFromCompManagedBeans){ dataSources.add(dataSource);
@Override public AppModule deploy(final AppModule appModule) throws OpenEJBException { final List<JndiConsumer> jndiConsumers = collectConsumers(appModule); final KeyedCollection<String, JMSDestination> destinations = new KeyedCollection<>(); for (final JndiConsumer consumer : jndiConsumers) { if (consumer != null) { destinations.addAll(consumer.getJMSDestination()); } } for (final JMSDestination destination : destinations) { appModule.getResources().add(toResource(destination)); } return appModule; }
public Collection<ResourceRef> getResourceRef() { if (resourceRef == null) { resourceRef = new KeyedCollection<String, ResourceRef>(); } return this.resourceRef; }
@SuppressWarnings({"unchecked"}) public KeyedCollection(final Collection<? extends V> c) { if (c instanceof KeyedCollection) { final KeyedCollection keyedCollection = (KeyedCollection) c; // NOTE: if types don't match bad things could happen keyExtractor = keyedCollection.keyExtractor; } else { // NOTE: V must implement Keyable or class cast exception will be thrown on add keyExtractor = null; } map = new LinkedHashMap<K, V>(); addAll(c); }
@Override public Map<String, PersistenceContextRef> getPersistenceContextRefMap() { if (persistenceContextRef == null) { persistenceContextRef = new NoExtendedKeyedCollection(); } return this.persistenceContextRef.toMap(); }
public boolean add(final V value) { final K key = getKey(value); if (key == null) { throw new NullPointerException("key is null"); } final V oldValue = map.put(key, value); return value != oldValue; }
@Override public AppModule deploy(final AppModule appModule) throws OpenEJBException { final List<JndiConsumer> jndiConsumers = collectConsumers(appModule); final KeyedCollection<String, JMSConnectionFactory> factories = new KeyedCollection<>(); for (final JndiConsumer consumer : jndiConsumers) { if (consumer != null) { factories.addAll(consumer.getJMSConnectionFactories()); } } for (final JMSConnectionFactory factory : factories) { appModule.getResources().add(toResource(factory)); } return appModule; }
public Collection<MessageDestinationRef> getMessageDestinationRef() { if (messageDestinationRef == null) { messageDestinationRef = new KeyedCollection<String, MessageDestinationRef>(); } return this.messageDestinationRef; }
@SuppressWarnings({"unchecked"}) public KeyedCollection(Collection<? extends V> c) { if (c instanceof KeyedCollection) { KeyedCollection keyedCollection = (KeyedCollection) c; // NOTE: if types don't match bad things could happen keyExtractor = keyedCollection.keyExtractor; } else { // NOTE: V must implement Keyable or class cast exception will be thrown on add keyExtractor = null; } map = new LinkedHashMap<K,V>(); addAll(c); }
public boolean add(V value) { K key = getKey(value); if (key == null) { throw new NullPointerException("key is null"); } V oldValue = map.put(key, value); return value != oldValue; }
public Map<String, DataSource> getDataSourceMap() { if (dataSource == null) { dataSource = new KeyedCollection<String, DataSource>(); } return this.dataSource.toMap(); }
public Map<String, RelationField> getRelationshipFieldMap() { KeyedCollection<String, RelationField> fields = new KeyedCollection<String, RelationField>(); if (oneToOne != null) fields.addAll(oneToOne); if (oneToMany != null) fields.addAll(oneToMany); if (manyToMany != null) fields.addAll(manyToMany); if (manyToOne != null) fields.addAll(manyToOne); return fields.toMap(); }
@Override public AppModule deploy(final AppModule appModule) throws OpenEJBException { final List<JndiConsumer> jndiConsumers = collectConsumers(appModule); final KeyedCollection<String, DataSource> dataSources = new KeyedCollection<String, DataSource>(); for (final JndiConsumer consumer : jndiConsumers) { if (consumer == null) { continue; } dataSources.addAll(consumer.getDataSource()); } for (final DataSource dataSource : dataSources) { appModule.getResources().add(toResource(dataSource)); } return appModule; }
public Collection<DataSource> getDataSource() { if (dataSource == null) { dataSource = new KeyedCollection<String, DataSource>(); } return this.dataSource; }
@SuppressWarnings({"unchecked"}) public KeyedCollection(final Collection<? extends V> c) { if (c instanceof KeyedCollection) { final KeyedCollection keyedCollection = (KeyedCollection) c; // NOTE: if types don't match bad things could happen keyExtractor = keyedCollection.keyExtractor; } else { // NOTE: V must implement Keyable or class cast exception will be thrown on add keyExtractor = null; } map = new LinkedHashMap<K, V>(); addAll(c); }
public boolean add(final V value) { final K key = getKey(value); if (key == null) { throw new NullPointerException("key is null"); } final V oldValue = map.put(key, value); return value != oldValue; }