Always use multiple types if present. If not present - use singular type
This commit is contained in:
parent
a7e0cace13
commit
c4d50181ff
@ -38,10 +38,7 @@ public class AssetTypeFilter implements EntityFilter {
|
|||||||
private List<String> assetTypes;
|
private List<String> assetTypes;
|
||||||
|
|
||||||
public List<String> getAssetTypes() {
|
public List<String> getAssetTypes() {
|
||||||
if (assetType != null) {
|
return !CollectionUtils.isEmpty(assetTypes) ? assetTypes : Collections.singletonList(assetType);
|
||||||
assetTypes = Collections.singletonList(assetType);
|
|
||||||
}
|
|
||||||
return assetTypes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@ -42,10 +42,7 @@ public class DeviceTypeFilter implements EntityFilter {
|
|||||||
private List<String> deviceTypes;
|
private List<String> deviceTypes;
|
||||||
|
|
||||||
public List<String> getDeviceTypes() {
|
public List<String> getDeviceTypes() {
|
||||||
if (deviceType != null) {
|
return !CollectionUtils.isEmpty(deviceTypes) ? deviceTypes : Collections.singletonList(deviceType);
|
||||||
deviceTypes = Collections.singletonList(deviceType);
|
|
||||||
}
|
|
||||||
return deviceTypes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@ -38,10 +38,7 @@ public class EdgeTypeFilter implements EntityFilter {
|
|||||||
private List<String> edgeTypes;
|
private List<String> edgeTypes;
|
||||||
|
|
||||||
public List<String> getEdgeTypes() {
|
public List<String> getEdgeTypes() {
|
||||||
if (edgeType != null) {
|
return !CollectionUtils.isEmpty(edgeTypes) ? edgeTypes : Collections.singletonList(edgeType);
|
||||||
edgeTypes = Collections.singletonList(edgeType);
|
|
||||||
}
|
|
||||||
return edgeTypes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@ -38,10 +38,7 @@ public class EntityViewTypeFilter implements EntityFilter {
|
|||||||
private List<String> entityViewTypes;
|
private List<String> entityViewTypes;
|
||||||
|
|
||||||
public List<String> getEntityViewTypes() {
|
public List<String> getEntityViewTypes() {
|
||||||
if (entityViewType != null) {
|
return !CollectionUtils.isEmpty(entityViewTypes) ? entityViewTypes : Collections.singletonList(entityViewType);
|
||||||
entityViewTypes = Collections.singletonList(entityViewType);
|
|
||||||
}
|
|
||||||
return entityViewTypes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user