Trigger implements Serializable { public Column[] filterExcludedColumns(Column[] src) { if (src != null) { List<String> excludedColumnNames = getExcludedColumnNamesAsList(); List<Column> filtered = new ArrayList<Column>(src.length); for (int i = 0; i < src.length; i++) { Column col = src[i]; if (!excludedColumnNames.contains(col.getName().toLowerCase())) { filtered.add(col); } } return filtered.toArray(new Column[filtered.size()]); } else { return new Column[0]; } } Trigger();  Trigger(String tableName, String channelId);  Trigger(String tableName, String channelId, boolean syncOnIncomingBatch); final String qualifiedSourceTableName(); final String qualifiedSourceTablePrefix(); void nullOutBlankFields(); Column[] filterExcludedAndIncludedColumns(Column[] src); Column[] filterExcludedColumns(Column[] src); Column[] filterIncludedColumns(Column[] src); Column[] getSyncKeysColumnsForTable(Table table); Column[] orderColumnsForTable(Table table); boolean hasChangedSinceLastTriggerBuild(Date lastTriggerBuildTime); String getTriggerId(); void setTriggerId(String triggerId); String getSourceTableName(); String getSourceTableNameLowerCase(); String getSourceTableNameUnescaped(); boolean isSourceWildCarded(); boolean isSourceTableNameWildCarded(); boolean isSourceCatalogNameWildCarded(); boolean isSourceSchemaNameWildCarded(); String getChannelExpression(); void setChannelExpression(String channelExpression); void setSourceTableName(String sourceTableName); String getSourceSchemaName(); String getSourceSchemaNameUnescaped(); void setSourceSchemaName(String sourceSchemaName); String getSourceCatalogName(); String getSourceCatalogNameUnescaped(); void setSourceCatalogName(String sourceCatalogName); String getChannelId(); void setChannelId(String channelId); String getReloadChannelId(); void setReloadChannelId(String reloadChannelId); boolean isSyncOnUpdate(); void setSyncOnUpdate(boolean syncOnUpdate); boolean isSyncOnInsert(); void setSyncOnInsert(boolean syncOnInsert); boolean isSyncOnDelete(); void setSyncOnDelete(boolean syncOnDelete); boolean isSyncOnIncomingBatch(); void setSyncOnIncomingBatch(boolean syncOnIncomingBatch); String getNameForInsertTrigger(); void setNameForInsertTrigger(String nameForInsertTrigger); String getNameForUpdateTrigger(); void setNameForUpdateTrigger(String nameForUpdateTrigger); String getNameForDeleteTrigger(); void setNameForDeleteTrigger(String nameForDeleteTrigger); String getSyncOnUpdateCondition(); void setSyncOnUpdateCondition(String syncOnUpdateCondition); String getSyncOnInsertCondition(); void setSyncOnInsertCondition(String syncOnInsertCondition); String getSyncOnDeleteCondition(); void setSyncOnDeleteCondition(String syncOnDeleteCondition); String getCustomBeforeUpdateText(); void setCustomBeforeUpdateText(String customBeforeUpdateText); String getCustomBeforeInsertText(); void setCustomBeforeInsertText(String customBeforeInsertText); String getCustomBeforeDeleteText(); void setCustomBeforeDeleteText(String customBeforeDeleteText); String getCustomOnUpdateText(); void setCustomOnUpdateText(String customOnUpdateText); String getCustomOnInsertText(); void setCustomOnInsertText(String customOnInsertText); String getCustomOnDeleteText(); void setCustomOnDeleteText(String customOnDeleteText); String getExcludedColumnNames(); void setExcludedColumnNames(String excludedColumnNames); String getIncludedColumnNames(); void setIncludedColumnNames(String includedColumnNames); String getTxIdExpression(); void setTxIdExpression(String txIdExpression); String getExternalSelect(); void setExternalSelect(String externalSelect); void setLastUpdateBy(String updatedBy); String getLastUpdateBy(); Date getLastUpdateTime(); void setLastUpdateTime(Date lastModifiedOn); Date getCreateTime(); void setCreateTime(Date createdOn); void setUseStreamLobs(boolean useStreamLobs); boolean isUseStreamLobs(); void setUseCaptureLobs(boolean useCaptureLobs); boolean isUseCaptureLobs(); boolean isUseHandleKeyUpdates(); void setUseHandleKeyUpdates(boolean useHandleKeyUpdates); void setUseCaptureOldData(boolean useCaptureOldData); boolean isUseCaptureOldData(); void setSyncKeyNames(String syncKeys); String getSyncKeyNames(); boolean isStreamRow(); void setStreamRow(boolean streamRow); String getFullyQualifiedSourceTableName(); long toHashedValue(); boolean matchesCatalogName(String catalogName, boolean ignoreCase); boolean matchesSchemaName(String schemaName, boolean ignoreCase); boolean matches(Table table, String defaultCatalog, String defaultSchema,
            boolean ignoreCase); boolean matches(Trigger trigger); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testFilterExcludedColumnsForNull() { Trigger trigger = new Trigger(); assertArrayEquals("Expected empty column array", new Column[0], trigger.filterExcludedColumns(null)); }
@Test public void testFilterExcludedColumns() { Trigger trigger = new Trigger(); trigger.setExcludedColumnNames("col1, col3, col5"); Column[] param = buildColumnArray(); Column[] expected = new Column[] { param[1], param[3], param[5] }; assertArrayEquals("Excluded wrong set of columns", expected, trigger.filterExcludedColumns(param)); }