Commit 91224be1 authored by sumet's avatar sumet

test

parent 9444a934
package controllers; package controllers;
import models.Computer; import models.Computer;
import models.Thai;
import play.data.Form; import play.data.Form;
import play.data.FormFactory; import play.data.FormFactory;
import play.libs.concurrent.HttpExecutionContext; import play.libs.concurrent.HttpExecutionContext;
...@@ -13,8 +12,6 @@ import repository.ComputerRepository; ...@@ -13,8 +12,6 @@ import repository.ComputerRepository;
import javax.inject.Inject; import javax.inject.Inject;
import javax.persistence.PersistenceException; import javax.persistence.PersistenceException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.CompletionStage; import java.util.concurrent.CompletionStage;
...@@ -53,12 +50,6 @@ public class HomeController extends Controller { ...@@ -53,12 +50,6 @@ public class HomeController extends Controller {
return GO_HOME; return GO_HOME;
} }
public Result thai(){
List<Thai> Thailand = new ArrayList<>();
Thailand=Thai.find.all();
return ok(views.html.thai.render(Thailand));
}
/** /**
* Display the paginated list of computers. * Display the paginated list of computers.
* *
......
# --- Created by Ebean DDL # --- First database schema
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
# --- !Ups
create table company ( create table company (
id bigint auto_increment not null, id bigint not null,
name varchar(255), name varchar(255),
constraint pk_company primary key (id) constraint pk_company primary key (id))
); ;
create table computer ( create table computer (
id bigint auto_increment not null, id bigint not null,
name varchar(255), name varchar(255),
introduced timestamp, introduced timestamp,
discontinued timestamp, discontinued timestamp,
company_id bigint, company_id bigint,
constraint pk_computer primary key (id) constraint pk_computer primary key (id))
); ;
create table thai ( create sequence company_seq start with 1000;
id bigint auto_increment not null,
coun varchar(255), create sequence computer_seq start with 1000;
prov varchar(255),
constraint pk_thai primary key (id) alter table computer add constraint fk_computer_company_1 foreign key (company_id) references company (id) on delete restrict on update restrict;
); create index ix_computer_company_1 on computer (company_id);
alter table computer add constraint fk_computer_company_id foreign key (company_id) references company (id) on delete restrict on update restrict;
create index ix_computer_company_id on computer (company_id); # --- !Downs
SET REFERENTIAL_INTEGRITY FALSE;
# --- !Downs
alter table computer drop constraint if exists fk_computer_company_id;
drop index if exists ix_computer_company_id;
drop table if exists company; drop table if exists company;
drop table if exists computer; drop table if exists computer;
drop table if exists thai; SET REFERENTIAL_INTEGRITY TRUE;
drop sequence if exists company_seq;
drop sequence if exists computer_seq;
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
# Default path will just redirect to the computer list # Default path will just redirect to the computer list
GET / controllers.HomeController.index() GET / controllers.HomeController.index()
GET /thai controllers.HomeController.thai()
# Computers list (look at the default values for pagination parameters) # Computers list (look at the default values for pagination parameters)
GET /computers controllers.HomeController.list(p:Int ?= 0, s ?= "name", o ?= "asc", f ?= "") GET /computers controllers.HomeController.list(p:Int ?= 0, s ?= "name", o ?= "asc", f ?= "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment