private CollectionField getCollectionField(PersistentCollection pc) {
if(pc != null) {
if(pc instanceof PersistentSet) {
- return new CollectionField(new HashSet((Set)pc), "set");
+ return new CollectionField(new HashSet<>((Set)pc), "set");
}
if(pc instanceof PersistentSortedSet) {
- return new CollectionField(new TreeSet((Set)pc), "set");
+ return new CollectionField(new TreeSet<>((Set)pc), "set");
}
if(pc instanceof PersistentList) {
- return new CollectionField(new ArrayList((List)pc), "list");
+ return new CollectionField(new ArrayList<>((List)pc), "list");
}
if(pc instanceof PersistentMap || pc instanceof PersistentMultiLanguageText) {
- return new CollectionField(new HashMap((Map)pc), "map");
+ return new CollectionField(new HashMap<>((Map)pc), "map");
}
if(pc instanceof PersistentSortedMap) {
- return new CollectionField(new TreeMap((Map)pc), "map");
+ return new CollectionField(new TreeMap<>((Map)pc), "map");
}
}
return null;
}
@Override
- public void cacheTerms(RemoteInvocation ri, RemoteInvocationResult rir) {
+ public void cacheTerms(RemoteInvocation remoteInvoc, RemoteInvocationResult remoteInvocResul) {
if(cdmServiceCacher != null) {
- if(ri.getMethodName().equals("listByTermType")) {
- if(ri.getArguments()[1] == null) {
+ if(remoteInvoc.getMethodName().equals("listByTermType")) {
+ if(remoteInvoc.getArguments()[1] == null) {
Set<DefinedTermBase<?>> terms = new HashSet<>();
- if(rir.getValue() != null) {
- terms.addAll((List<DefinedTermBase<?>>)rir.getValue());
+ if(remoteInvocResul.getValue() != null) {
+ terms.addAll((List<DefinedTermBase<?>>)remoteInvocResul.getValue());
for(DefinedTermBase<?> term : terms) {
cdmServiceCacher.load(term);
}
- termTypeMap.put((TermType)ri.getArguments()[0], rir);
+ termTypeMap.put((TermType)remoteInvoc.getArguments()[0], remoteInvocResul);
}
}
}