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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:b="http://bootsfaces.net/ui"> | |
<h:head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:b="http://bootsfaces.net/ui"> | |
<h:head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
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 com.sakadream.jsf.validator; | |
import javax.faces.application.FacesMessage; | |
import javax.faces.component.UIComponent; | |
import javax.faces.context.FacesContext; | |
import javax.faces.validator.FacesValidator; | |
import javax.faces.validator.Validator; | |
import javax.faces.validator.ValidatorException; | |
/** |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:b="http://bootsfaces.net/ui"> | |
<h:head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:b="http://bootsfaces.net/ui" | |
xmlns:c="http://java.sun.com/jsp/jstl/core"> | |
<h:head> |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
... | |
<dependencies> | |
... | |
<dependency> | |
<groupId>org.hibernate.common</groupId> | |
<artifactId>hibernate-commons-annotations</artifactId> | |
<version>4.0.5.Final</version> | |
</dependency> |
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 com.sakadream; | |
import com.sakadream.models.Employee; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.cfg.AnnotationConfiguration; | |
import java.util.Properties; | |
/** | |
* Created by Phan Ba Hai on 25/08/2017. |
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
CREATE TABLE Employee ( | |
id INT IDENTITY (1,1) PRIMARY KEY NOT NULL , | |
name NVARCHAR(50) NOT NULL , | |
address NVARCHAR(50) NOT NULL , | |
phone VARCHAR(11) NOT NULL , | |
salary INT NOT NULL | |
); | |
INSERT INTO Employee(name, address, phone, salary) | |
VALUES |
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 com.sakadream.models; | |
import javax.persistence.*; | |
/** | |
* Created by Phan Ba Hai on 25/08/2017. | |
*/ | |
@Entity | |
@Table | |
public class Employee { |
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 com.sakadream.services; | |
import com.sakadream.models.Employee; | |
import java.util.List; | |
/** | |
* Created by Phan Ba Hai on 25/08/2017. | |
*/ | |
public interface EmployeeService { |