Advertisement
Guest User

Untitled

a guest
Nov 16th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. db.default.driver=oracle.jdbc.driver.OracleDriver
  2. db.default.url="jdbc:oracle:thin:@hostname:1521:SOMESID"
  3. db.default.user=someuser
  4. db.default.password=somepassword
  5.  
  6. package controllers;
  7.  
  8. import play.*;
  9.  
  10. import play.mvc.*;
  11.  
  12. import views.html.*;
  13.  
  14. import play.db.*;
  15.  
  16. public class Application extends Controller {
  17. public static Result index() {
  18. //return ok(index.render("Hello Worldxxx"));
  19. //me: the below is the default return
  20. return redirect(routes.Application.tasks());
  21. }
  22.  
  23. public static Result tasks() {
  24. return TODO;
  25. }
  26.  
  27. public static Result newTask() {
  28. return TODO;
  29. }
  30.  
  31. public static Result deleteTask(Long id) {
  32. return TODO;
  33. }
  34.  
  35. public static Result getMetaData() {
  36. Connection connection = DB.getConnection();
  37. ResultSet resultSet = connection.prepareStatement("SELECT * FROM sometable").executeQuery();
  38. metaData = resultSet.getMetaData();
  39. connection.close();
  40. return ok(metaData.toString());
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement