作者:大道废_796 | 来源:互联网 | 2023-07-25 13:42
本文整理了Java中org.apache.openejb.jee.KeyedCollection.addAll()
方法的一些代码示例,展示了KeyedCollection.addAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyedCollection.addAll()
方法的具体详情如下:
包路径:org.apache.openejb.jee.KeyedCollection
类名称:KeyedCollection
方法名:addAll
KeyedCollection.addAll介绍
暂无
代码示例
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-jee
@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();
addAll(c);
}
代码示例来源:origin: org.apache.tomee/openejb-jee
@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();
addAll(c);
}
代码示例来源:origin: org.apache.openejb/openejb-jee
@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();
addAll(c);
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-jee
public Map getRelationshipFieldMap() {
KeyedCollection fields = new KeyedCollection();
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();
}
代码示例来源:origin: org.apache.tomee/openejb-jee
public Map getRelationshipFieldMap() {
final KeyedCollection fields = new KeyedCollection();
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();
}
代码示例来源:origin: org.apache.openejb/openejb-jee
public Map getRelationshipFieldMap() {
final KeyedCollection fields = new KeyedCollection();
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();
}
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public AppModule deploy(final AppModule appModule) throws OpenEJBException {
final List jndiCOnsumers= collectConsumers(appModule);
final KeyedCollection 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;
}
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public AppModule deploy(final AppModule appModule) throws OpenEJBException {
final List jndiCOnsumers= collectConsumers(appModule);
final KeyedCollection 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;
}
代码示例来源:origin: org.apache.openejb/openejb-core
@Override
public AppModule deploy(final AppModule appModule) throws OpenEJBException {
final List jndiCOnsumers= collectConsumers(appModule);
final KeyedCollection dataSources = new KeyedCollection();
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;
}
代码示例来源:origin: org.apache.tomee/openejb-core
dataSourcesFromCompManagedBeans.addAll(consumer.getDataSource());
continue;
dataSources.addAll(consumer.getDataSource());