Přidána agenda Budovy.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.dao;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
public interface BuildingDao extends BaseDao<Building> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package info.bukova.isspst.dao.jpa;
|
||||
|
||||
import info.bukova.isspst.dao.BuildingDao;
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
public class BuildingDaoJPA extends BaseDaoJPA<Building> implements BuildingDao {
|
||||
|
||||
@Override
|
||||
public String getEntityName() {
|
||||
return "Building";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package info.bukova.isspst.data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name="BUILDING")
|
||||
public class Building implements DataModel {
|
||||
|
||||
@Id
|
||||
@Column(name="ID")
|
||||
@GeneratedValue
|
||||
private int id;
|
||||
|
||||
@Column(name="CODE", unique=true)
|
||||
private String code;
|
||||
|
||||
@Column(name="NAME")
|
||||
private String name;
|
||||
|
||||
@Column(name="DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the code
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param code the code to set
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the description
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param description the description to set
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreated(Date created) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreated() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setModified(Date modified) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getModified() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValid(boolean valid) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.services;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
public interface BuildingService extends Service<Building> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.services;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
public class BuildingServiceImpl extends AbstractService<Building> implements BuildingService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package info.bukova.isspst.ui;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
|
||||
public class BuildingForm extends FormViewModel<Building> {
|
||||
|
||||
@Init(superclass = true)
|
||||
public void init() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package info.bukova.isspst.ui;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
import info.bukova.isspst.services.BuildingService;
|
||||
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||
|
||||
public class BuildingList extends ListViewModel<Building> {
|
||||
|
||||
@WireVariable
|
||||
private BuildingService buildingService;
|
||||
|
||||
@Init
|
||||
public void init() {
|
||||
service = buildingService;
|
||||
dataClass = Building.class;
|
||||
formZul = "buildingForm.zul";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user