Search in sources :

Example 26 with ITriggerRouterService

use of org.jumpmind.symmetric.service.ITriggerRouterService in project symmetric-ds by JumpMind.

the class RestService method dropTriggersImpl.

private void dropTriggersImpl(ISymmetricEngine engine, String tableName) {
    ITriggerRouterService triggerRouterService = engine.getTriggerRouterService();
    HashSet<String> tables = new HashSet<String>();
    tables.add(tableName);
    triggerRouterService.dropTriggers(tables);
}
Also used : ITriggerRouterService(org.jumpmind.symmetric.service.ITriggerRouterService) HashSet(java.util.HashSet)

Example 27 with ITriggerRouterService

use of org.jumpmind.symmetric.service.ITriggerRouterService in project symmetric-ds by JumpMind.

the class RestService method syncTriggersByTableImpl.

private void syncTriggersByTableImpl(ISymmetricEngine engine, String catalogName, String schemaName, String tableName, boolean force) {
    ITriggerRouterService triggerRouterService = engine.getTriggerRouterService();
    Table table = getSymmetricEngine().getDatabasePlatform().getTableFromCache(catalogName, schemaName, tableName, true);
    if (table == null) {
        throw new NotFoundException();
    }
    triggerRouterService.syncTriggers(table, force);
}
Also used : Table(org.jumpmind.db.model.Table) ITriggerRouterService(org.jumpmind.symmetric.service.ITriggerRouterService)

Aggregations

ITriggerRouterService (org.jumpmind.symmetric.service.ITriggerRouterService)27 TriggerRouter (org.jumpmind.symmetric.model.TriggerRouter)12 Trigger (org.jumpmind.symmetric.model.Trigger)11 TriggerHistory (org.jumpmind.symmetric.model.TriggerHistory)9 Node (org.jumpmind.symmetric.model.Node)8 Test (org.junit.Test)7 ArrayList (java.util.ArrayList)6 List (java.util.List)6 ISqlTransaction (org.jumpmind.db.sql.ISqlTransaction)6 Router (org.jumpmind.symmetric.model.Router)5 Table (org.jumpmind.db.model.Table)4 INodeService (org.jumpmind.symmetric.service.INodeService)4 File (java.io.File)3 Date (java.util.Date)3 HashSet (java.util.HashSet)3 ISymmetricDialect (org.jumpmind.symmetric.db.ISymmetricDialect)3 NodeGroupLink (org.jumpmind.symmetric.model.NodeGroupLink)3 FileOutputStream (java.io.FileOutputStream)2 IOException (java.io.IOException)2 IoException (org.jumpmind.exception.IoException)2