public List<RowProcessingConsumer> getConfigurableConsumers() { final List<RowProcessingConsumer> configurableConsumers = CollectionUtils.filter(_consumers, new Predicate<RowProcessingConsumer>() { @Override public Boolean eval(RowProcessingConsumer input) { return input.getComponentJob() instanceof ConfigurableBeanJob<?>; } }); return configurableConsumers; }
public static <E> List<E> filter(E[] items, java.util.function.Predicate<? super E> predicate) { return filter(Arrays.asList(items), predicate); }
public List<String> getAllJobFilePaths() { return CollectionUtils.filter(ALL_FILES, path -> path.startsWith("jobs/") && path.endsWith(".analysis.xml")); } }
public static List<SelectItem> getAggregateFunctionSelectItems(Iterable<SelectItem> selectItems) { return CollectionUtils.filter(selectItems, arg -> { return arg.getAggregateFunction() != null; }); }
public static List<SelectItem> getAggregateFunctionSelectItems(Iterable<SelectItem> selectItems) { return CollectionUtils.filter(selectItems, arg -> { return arg.getAggregateFunction() != null; }); }
public List<DatabaseDriverDescriptor> getInstalledWorkingDatabaseDrivers() { return CollectionUtils.filter(_databaseDrivers, input -> { if (getState(input) == DatabaseDriverState.INSTALLED_WORKING) { return true; } return false; }); }
public static Column[] getColumnsByType(Column[] columns, final ColumnType columnType) { return CollectionUtils.filter(columns, column -> { return column.getType() == columnType; }).toArray(new Column[0]); }
public static Column[] getColumnsByType(Column[] columns, final ColumnType columnType) { return CollectionUtils.filter(columns, column -> { return column.getType() == columnType; }).toArray(new Column[0]); }
public DescriptorMenuBuilder(final AnalysisJobBuilder analysisJobBuilder, final Collection<? extends ComponentDescriptor<?>> descriptors, final Point2D coordinate) { final Collection<? extends ComponentDescriptor<?>> filteredDescriptors = CollectionUtils.filter(descriptors, new DeprecatedComponentPredicate()); final List<ComponentDescriptor<?>> componentDescriptors = new ArrayList<>(filteredDescriptors); Collections.sort(componentDescriptors, new DisplayNameComparator()); _analysisJobBuilder = analysisJobBuilder; _coordinate = coordinate; _componentDescriptors = Collections.unmodifiableCollection(componentDescriptors); }
public static Column[] getColumnsBySuperType(Column[] columns, final SuperColumnType superColumnType) { return CollectionUtils.filter(columns, column -> { return column.getType().getSuperType() == superColumnType; }).toArray(new Column[0]); }
public static Column[] getColumnsBySuperType(Column[] columns, final SuperColumnType superColumnType) { return CollectionUtils.filter(columns, column -> { return column.getType().getSuperType() == superColumnType; }).toArray(new Column[0]); }
@Override public final List<Relationship> getPrimaryKeyRelationships() { return CollectionUtils.filter(getRelationships(), rel -> { return AbstractTable.this.equals(rel.getPrimaryTable()); }); }
public static void createMenuStructure(final MenuCallback callback, final Collection<? extends ComponentDescriptor<?>> componentDescriptors) { final Collection<? extends ComponentDescriptor<?>> filteredDescriptors = CollectionUtils.filter(componentDescriptors, new DeprecatedComponentPredicate()); final Map<ComponentCategory, List<Class<?>>> categories = new HashMap<>(); buildSubMenus(categories, filteredDescriptors); placeSubMenus(categories, callback); for (final ComponentDescriptor<?> descriptor : filteredDescriptors) { callback.addComponentDescriptor(descriptor); } }
@Override public final Collection<Relationship> getForeignKeyRelationships() { return CollectionUtils.filter(getRelationships(), rel -> { return AbstractTable.this.equals(rel.getForeignTable()); }); }
@Override public final List<Relationship> getPrimaryKeyRelationships() { return CollectionUtils.filter(getRelationships(), rel -> { return AbstractTable.this.equals(rel.getPrimaryTable()); }); }
@Override public final Collection<Relationship> getForeignKeyRelationships() { return CollectionUtils.filter(getRelationships(), rel -> { return AbstractTable.this.equals(rel.getForeignTable()); }); }
protected Collection<InputColumn<?>> getCreateTableColumnSuggestions() { final ComponentBuilder componentBuilder = getComponentBuilder(); List<InputColumn<?>> columns = componentBuilder.getAnalysisJobBuilder().getAvailableInputColumns(componentBuilder); columns = CollectionUtils.filter(columns, column -> { if (column instanceof MutableInputColumn) { return !((MutableInputColumn<?>) column).isHidden(); } return true; }); return columns; }
/** * Gets all component builders that are expected to generate an * {@link AnalyzerResult}. * * @return */ public Collection<ComponentBuilder> getResultProducingComponentBuilders() { final Collection<ComponentBuilder> componentBuilders = getComponentBuilders(); return CollectionUtils.filter(componentBuilders, componentBuilder -> { final ComponentDescriptor<?> descriptor = componentBuilder.getDescriptor(); return ReflectionUtils.is(descriptor.getComponentClass(), HasAnalyzerResult.class); }); }
@Override public final Collection<Relationship> getRelationships(final Table otherTable) { Collection<Relationship> relationships = getRelationships(); return CollectionUtils.filter(relationships, relation -> { if (relation.getForeignTable() == otherTable && relation.getPrimaryTable() == AbstractTable.this) { return true; } else if (relation.getForeignTable() == AbstractTable.this && relation.getPrimaryTable() == otherTable) { return true; } return false; }); }
@Override public final Collection<Relationship> getRelationships(final Table otherTable) { Collection<Relationship> relationships = getRelationships(); return CollectionUtils.filter(relationships, relation -> { if (relation.getForeignTable() == otherTable && relation.getPrimaryTable() == AbstractTable.this) { return true; } else if (relation.getForeignTable() == AbstractTable.this && relation.getPrimaryTable() == otherTable) { return true; } return false; }); }