Skip to content

Commit 046bd96

Browse files
author
Deepesh Nair
committed
First Commit
1 parent 6dc824f commit 046bd96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2286
-0
lines changed

pom.xml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<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/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>firstart</groupId>
4+
<artifactId>RESTstudent</artifactId>
5+
<version>0.0.1-SNAPSHOT</version>
6+
<packaging>war</packaging>
7+
8+
9+
<name>hybridX</name>
10+
<url>http://maven.apache.org</url>
11+
12+
<properties>
13+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14+
</properties>
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.springframework</groupId>
18+
<artifactId>spring-core</artifactId>
19+
<version>4.1.2.RELEASE</version>
20+
</dependency>
21+
<dependency>
22+
<groupId>org.springframework</groupId>
23+
<artifactId>spring-context</artifactId>
24+
<version>4.1.2.RELEASE</version>
25+
</dependency>
26+
<dependency>
27+
<groupId>org.springframework</groupId>
28+
<artifactId>spring-web</artifactId>
29+
<version>4.1.2.RELEASE</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.springframework</groupId>
33+
<artifactId>spring-beans</artifactId>
34+
<version>4.1.2.RELEASE</version>
35+
</dependency>
36+
<!-- Apache CXF Dependencies -->
37+
<dependency>
38+
<groupId>org.apache.cxf</groupId>
39+
<artifactId>cxf-rt-frontend-jaxws</artifactId>
40+
<version>2.7.13</version>
41+
</dependency>
42+
43+
<dependency>
44+
<groupId>org.apache.cxf</groupId>
45+
<artifactId>cxf-rt-transports-http</artifactId>
46+
<version>2.7.13</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.apache.cxf</groupId>
50+
<artifactId>cxf-rt-transports-http-jetty</artifactId>
51+
<version>2.7.13</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.apache.cxf</groupId>
55+
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
56+
<version>2.7.13</version>
57+
</dependency>
58+
<!-- Jackson The JSON Producer dependency -->
59+
<dependency>
60+
<groupId>org.codehaus.jackson</groupId>
61+
<artifactId>jackson-jaxrs</artifactId>
62+
<version>1.9.13</version>
63+
</dependency>
64+
65+
<dependency>
66+
<groupId>org.mortbay.jetty</groupId>
67+
<artifactId>jetty-maven-plugin</artifactId>
68+
<version>7.6.13.v20130916</version>
69+
</dependency>
70+
<dependency>
71+
<groupId>org.mybatis</groupId>
72+
<artifactId>mybatis-spring</artifactId>
73+
<version>1.2.0</version>
74+
</dependency>
75+
<dependency>
76+
<groupId>org.mybatis</groupId>
77+
<artifactId>mybatis</artifactId>
78+
<version>3.1.1</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>mysql</groupId>
82+
<artifactId>mysql-connector-java</artifactId>
83+
<version>5.1.17</version>
84+
</dependency>
85+
<dependency>
86+
<groupId>org.liquibase</groupId>
87+
<artifactId>liquibase-core</artifactId>
88+
<version>3.4.2</version>
89+
</dependency>
90+
91+
<dependency>
92+
<groupId>org.springframework</groupId>
93+
<artifactId>spring-jdbc</artifactId>
94+
<version>3.2.9.RELEASE</version>
95+
</dependency>
96+
<dependency>
97+
<groupId>commons-io</groupId>
98+
<artifactId>commons-io</artifactId>
99+
<version>2.0</version>
100+
</dependency>
101+
<dependency>
102+
<groupId>commons-codec</groupId>
103+
<artifactId>commons-codec</artifactId>
104+
<version>1.2</version>
105+
</dependency>
106+
</dependencies>
107+
<build>
108+
<sourceDirectory>src/main/java</sourceDirectory>
109+
<plugins>
110+
<plugin>
111+
<artifactId>maven-compiler-plugin</artifactId>
112+
<version>3.1</version>
113+
<configuration>
114+
<source>1.6</source>
115+
<target>1.6</target>
116+
</configuration>
117+
</plugin>
118+
119+
<plugin>
120+
<groupId>org.liquibase</groupId>
121+
<artifactId>liquibase-maven-plugin</artifactId>
122+
<version>3.4.2</version>
123+
<configuration>
124+
<propertyFile>target/classes/liquibase.properties</propertyFile>
125+
</configuration>
126+
</plugin>
127+
128+
<plugin>
129+
<groupId>org.mortbay.jetty</groupId>
130+
<artifactId>jetty-maven-plugin</artifactId>
131+
<version>7.4.2.v20110526</version>
132+
<configuration>
133+
<webAppConfig>
134+
<contextPath>/</contextPath>
135+
</webAppConfig>
136+
</configuration>
137+
</plugin>
138+
139+
</plugins>
140+
<finalName>firestart</finalName>
141+
</build>
142+
143+
144+
</project>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
package com.deepesh.bean;
2+
3+
public class MarksBean {
4+
private int rollNo;
5+
private int subjectId;
6+
private int marks;
7+
private String name;
8+
private String subjectName;
9+
10+
public String getName() {
11+
return name;
12+
}
13+
14+
public void setName(String name) {
15+
this.name = name;
16+
}
17+
18+
public String getSubjectName() {
19+
return subjectName;
20+
}
21+
22+
public void setSubjectName(String subjectName) {
23+
this.subjectName = subjectName;
24+
}
25+
26+
public int getRollNo() {
27+
return rollNo;
28+
}
29+
30+
public void setRollNo(int rollNo) {
31+
this.rollNo = rollNo;
32+
}
33+
34+
public int getSubjectId() {
35+
return subjectId;
36+
}
37+
38+
public void setSubjectId(int subjectId) {
39+
this.subjectId = subjectId;
40+
}
41+
42+
public int getMarks() {
43+
return marks;
44+
}
45+
46+
public void setMarks(int marks) {
47+
this.marks = marks;
48+
}
49+
50+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.deepesh.bean;
2+
3+
public class StudentBean {
4+
private int rollNo;
5+
private String name;
6+
7+
public int getRollNo() {
8+
return rollNo;
9+
}
10+
public void setRollNo(int rollNo) {
11+
this.rollNo = rollNo;
12+
}
13+
14+
15+
public String getName() {
16+
return name;
17+
}
18+
public void setName(String name) {
19+
this.name = name;
20+
}
21+
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.deepesh.bean;
2+
3+
public class SubjectBean {
4+
5+
private int subjectId;
6+
private String subjectName;
7+
8+
9+
public int getSubjectId() {
10+
return subjectId;
11+
}
12+
public void setSubjectId(int subjectId) {
13+
this.subjectId = subjectId;
14+
}
15+
public String getSubjectName() {
16+
return subjectName;
17+
}
18+
public void setSubjectName(String subjectName) {
19+
this.subjectName = subjectName;
20+
}
21+
22+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.deepesh.bo;
2+
3+
import java.util.List;
4+
5+
import com.deepesh.bean.MarksBean;
6+
import com.deepesh.dao.MarksDao;
7+
8+
public class MarksBo {
9+
private MarksDao marksDoa;
10+
11+
public MarksDao getMarksDoa() {
12+
return marksDoa;
13+
}
14+
15+
public void setMarksDoa(MarksDao marksDoa) {
16+
this.marksDoa = marksDoa;
17+
}
18+
19+
public List<MarksBean> getAllMarks() {
20+
return marksDoa.selectAll();
21+
}
22+
23+
public int insert(MarksBean marks){
24+
return marksDoa.insert(marks);
25+
}
26+
27+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.deepesh.bo;
2+
3+
import java.util.List;
4+
5+
import com.deepesh.bean.StudentBean;
6+
import com.deepesh.dao.StudentDao;
7+
8+
9+
public class StudentBo {
10+
11+
private StudentDao studentDao;
12+
13+
public void setStudentDao(StudentDao studentDao) {
14+
this.studentDao = studentDao;
15+
}
16+
17+
public int insertStudent(StudentBean student) {
18+
return studentDao.insert(student);
19+
}
20+
21+
public int updateStudent(StudentBean student) {
22+
return this.studentDao.update(student);
23+
}
24+
25+
public int deleteStudent(int id) {
26+
return this.studentDao.delete(id);
27+
}
28+
29+
public StudentBean getStudentDetails(int id) {
30+
StudentBean student = this.studentDao.selectById(id);
31+
32+
System.out.println(student);
33+
34+
return student;
35+
}
36+
37+
public StudentDao getStudentDao() {
38+
return studentDao;
39+
}
40+
41+
public List<StudentBean> getAllStudents() {
42+
return studentDao.selectAll();
43+
}
44+
45+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.deepesh.bo;
2+
3+
import java.util.List;
4+
5+
import com.deepesh.bean.SubjectBean;
6+
import com.deepesh.dao.SubjectDao;
7+
8+
9+
public class SubjectBo {
10+
11+
private SubjectDao subjectDao;
12+
13+
public void setSubjectDao(SubjectDao subjectDao) {
14+
this.subjectDao = subjectDao;
15+
}
16+
17+
public int insertSubject(SubjectBean subject) {
18+
return subjectDao.insert(subject);
19+
}
20+
21+
public int updateSubject(SubjectBean subject) {
22+
return this.subjectDao.update(subject);
23+
}
24+
25+
public int deleteSubject(int id) {
26+
return this.subjectDao.delete(id);
27+
}
28+
29+
public SubjectBean getSubjectDetails(int id) {
30+
SubjectBean subject = this.subjectDao.selectById(id);
31+
32+
System.out.println(subject);
33+
34+
return subject;
35+
}
36+
37+
public SubjectDao getSubjectDao() {
38+
return subjectDao;
39+
}
40+
41+
public List<SubjectBean> getAllSubjects() {
42+
return subjectDao.selectAll();
43+
}
44+
45+
}

0 commit comments

Comments
 (0)