Created
October 26, 2013 17:39
-
-
Save ggdio/7172355 to your computer and use it in GitHub Desktop.
Controller for JPA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.ggdio.gist; | |
import java.io.IOException; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
public abstract class Controller<T> { | |
private Service<T> service; | |
public Controller(Service<T> service) { | |
this.service = service; | |
} | |
public abstract void handle(ServletRequest req, ServletResponse res) | |
throws ServletException, IOException, ControllerException; | |
public Bo<T> getBusiness() { | |
return service; | |
} | |
public void setBusiness(Service<T> service) { | |
this.service = service; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment