@Test public void testIndexIsApplicable_TrueForOldRecord() { IndexRecordFilter indexRecordFilter = mock(IndexRecordFilter.class); Record oldRecord = mock(Record.class); when(indexRecordFilter.getIndexCase(Table.RECORD.name, oldRecord)).thenReturn(mock(IndexCase.class)); assertTrue(indexFilterHook.indexIsApplicable(indexRecordFilter, Table.RECORD.name, oldRecord, null)); }
boolean indexIsApplicable(IndexRecordFilter filter, String table, Record oldRecord, Record newRecord) { return ((oldRecord != null && filter.getIndexCase(table, oldRecord) != null) || (newRecord != null && filter.getIndexCase(table, newRecord) != null)); }
IndexRecordFilterHook implements RecordUpdateHook { boolean indexIsApplicable(IndexRecordFilter filter, String table, Record oldRecord, Record newRecord) { return ((oldRecord != null && filter.getIndexCase(table, oldRecord) != null) || (newRecord != null && filter.getIndexCase(table, newRecord) != null)); } }
IndexRecordFilterHook implements RecordUpdateHook { boolean indexIsApplicable(IndexRecordFilter filter, String table, Record oldRecord, Record newRecord) { return ((oldRecord != null && filter.getIndexCase(table, oldRecord) != null) || (newRecord != null && filter.getIndexCase(table, newRecord) != null)); } IndexRecordFilterHook(IndexesInfo indexesInfo);  IndexRecordFilterHook(PluginRegistry pluginRegistry, IndexesInfo indexesInfo); }
IndexRecordFilterHook implements RecordUpdateHook { boolean indexIsApplicable(IndexRecordFilter filter, String table, Record oldRecord, Record newRecord) { return ((oldRecord != null && filter.getIndexCase(table, oldRecord) != null) || (newRecord != null && filter.getIndexCase(table, newRecord) != null)); } IndexRecordFilterHook(IndexesInfo indexesInfo);  IndexRecordFilterHook(PluginRegistry pluginRegistry, IndexesInfo indexesInfo); @PreDestroy void destroy(); @Override void beforeUpdate(Record record, Record originalRecord, Repository repository, FieldTypes fieldTypes,
            RecordEvent recordEvent); @Override void beforeCreate(Record newRecord, Repository repository, FieldTypes fieldTypes, RecordEvent recordEvent); @Override void beforeDelete(Record originalRecord, Repository repository, FieldTypes fieldTypes,
            RecordEvent recordEvent); }
IndexRecordFilterHook implements RecordUpdateHook { boolean indexIsApplicable(IndexRecordFilter filter, String table, Record oldRecord, Record newRecord) { return ((oldRecord != null && filter.getIndexCase(table, oldRecord) != null) || (newRecord != null && filter.getIndexCase(table, newRecord) != null)); } IndexRecordFilterHook(IndexesInfo indexesInfo);  IndexRecordFilterHook(PluginRegistry pluginRegistry, IndexesInfo indexesInfo); @PreDestroy void destroy(); @Override void beforeUpdate(Record record, Record originalRecord, Repository repository, FieldTypes fieldTypes,
            RecordEvent recordEvent); @Override void beforeCreate(Record newRecord, Repository repository, FieldTypes fieldTypes, RecordEvent recordEvent); @Override void beforeDelete(Record originalRecord, Repository repository, FieldTypes fieldTypes,
            RecordEvent recordEvent);  }