Revision 48697
Added by Claudio Atzori over 6 years ago
EntityConfigTable.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
public Set<String> getFilter(final Type type, final RelDescriptor relDescriptor) { |
29 | 29 |
final LinkDescriptor ld = getDescriptor(type, relDescriptor); |
30 |
return ld != null ? Sets.newHashSet(ld.getFields()) : new HashSet<String>();
|
|
30 |
return ld != null ? Sets.newHashSet(ld.getFields()) : new HashSet<>(); |
|
31 | 31 |
} |
32 | 32 |
|
33 | 33 |
public boolean includeDuplicates(final Type type) { |
... | ... | |
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
public boolean hasIncludeFields(final Type type){ |
38 |
return CollectionUtils.isNotEmpty(super.get(type).getIncludeFields()); |
|
38 |
final EntityConfig config = super.get(type); |
|
39 |
if (config == null) { |
|
40 |
throw new IllegalArgumentException("the configuration table does not contain type: " + type.toString()); |
|
41 |
} |
|
42 |
return CollectionUtils.isNotEmpty(config.getIncludeFields()); |
|
39 | 43 |
} |
40 | 44 |
|
41 | 45 |
public boolean hasExcludeFields(final Type type){ |
... | ... | |
80 | 84 |
} |
81 | 85 |
|
82 | 86 |
|
83 |
} |
|
87 |
} |
Also available in: Unified diff
some java8 refactorings, added more tests for the software entities mapping