View Javadoc

1   package org.kuali.common.deploy;
2   
3   import org.kuali.common.jdbc.DatabaseService;
4   import org.kuali.common.jdbc.context.DatabaseResetContext;
5   import org.kuali.common.util.execute.Executable;
6   import org.springframework.util.Assert;
7   
8   public class DatabaseResetExecutor implements Executable {
9   
10  	DatabaseService service;
11  	DatabaseResetContext context;
12  
13  	@Override
14  	public void execute() {
15  		Assert.notNull(context, "context is null");
16  		Assert.notNull(service, "service is null");
17  		service.reset(context);
18  	}
19  
20  	public DatabaseService getService() {
21  		return service;
22  	}
23  
24  	public void setService(DatabaseService service) {
25  		this.service = service;
26  	}
27  
28  	public DatabaseResetContext getContext() {
29  		return context;
30  	}
31  
32  	public void setContext(DatabaseResetContext context) {
33  		this.context = context;
34  	}
35  
36  }