Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gowthamp10 committed May 4, 2022
0 parents commit 48ebd5a
Show file tree
Hide file tree
Showing 259 changed files with 6,999 additions and 0 deletions.
Empty file added .metadata/.lock
Empty file.
1,875 changes: 1,875 additions & 0 deletions .metadata/.log

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="admin_table")
public class Admin {

@Id
@GeneratedValue
private int aid;
private String firstName;
private String lastName;
private String email;


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.service;

public class AdminService {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.repository;

import org.springframework.data.jpa.repository.JpaRepository;

import com.entity.User;

public interface UserDAO extends JpaRepository<User, Integer>{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.repository;

import org.springframework.data.jpa.repository.JpaRepository;

public interface UserDAO extends JpaRepository<User, Integer>{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.entity;

public class User {

}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
package com.entity;


import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="user_table")
public class User {

@Id
@GeneratedValue
private int uid;
private String firstName;
private String LastName;
private String email;
private long phone;
private String Address;
private String password;
private long accNo;
private String accType;

public long getAccNo() {
return accNo;
}
public void setAccNo(long accNo) {
this.accNo = accNo;
}
public String getAccType() {
return accType;
}
public void setAccType(String accType) {
this.accType = accType;
}

public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return LastName;
}
public void setLastName(String lastName) {
LastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public long getPhone() {
return phone;
}
public void setPhone(long phone) {
this.phone = phone;
}
public String getAddress() {
return Address;
}
public void setAddress(String address) {
Address = address;
}
public User(int uid, String firstName, String lastName, String email, long phone, String address, String password,
long accNo, String accType) {
super();
this.uid = uid;
this.firstName = firstName;
LastName = lastName;
this.email = email;
this.phone = phone;
Address = address;
this.password = password;
this.accNo = accNo;
this.accType = accType;
}
public User() {
super();
// TODO Auto-generated constructor stub
}
@Override
public String toString() {
return "User [uid=" + uid + ", firstName=" + firstName + ", LastName=" + LastName + ", email=" + email
+ ", phone=" + phone + ", Address=" + Address + ", password=" + password + ", accNo=" + accNo
+ ", accType=" + accType + "]";
}






}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.service;

public class UserService {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.repository;

import org.springframework.data.jpa.repository.JpaRepository;

public interface BankDAO extends JpaRepository<T, ID>{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package com.entity;


import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="user_table")
public class User {

@Id
@GeneratedValue
private int uid;
private String firstName;
private String LastName;
private String email;
private long phone;
private String Address;
private String password;

public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return LastName;
}
public void setLastName(String lastName) {
LastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public long getPhone() {
return phone;
}
public void setPhone(long phone) {
this.phone = phone;
}
public String getAddress() {
return Address;
}
public void setAddress(String address) {
Address = address;
}

public User(int uid, String firstName, String lastName, String email, long phone, String address, String password) {
super();
this.uid = uid;
this.firstName = firstName;
LastName = lastName;
this.email = email;
this.phone = phone;
Address = address;
this.password = password;
}
public User() {
super();
// TODO Auto-generated constructor stub
}





}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.repository;

import org.springframework.data.jpa.repository.JpaRepository;

public interface AdminDAO extends JpaRepository<Admin, Integer> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.entity;

public class Admin {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.entity.User;
import com.service.UserService;

@RestController
@RequestMapping("/mainapp")
public class UserController {
@Autowired
private UserService userservice;

@GetMapping("/register")
public ResponseEntity<Object> register(@RequestBody User user){
String res=userservice.addUsers(user);
if(res=="user added") {
return ResponseEntity.ok(res);
}
else {
return (ResponseEntity<Object>) ResponseEntity.badRequest();
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.service;

public class AppOwnerService {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server.port=8090
spring.datasource.url= jdbc:mysql://localhost:3306/pwcdb
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.username = root
spring.datasource.password=root123
spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect
spring.jpa.hibernate.ddl-auto=update
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.repository;

public interface BankDAO {

}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding/<project>=UTF-8
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.repository;

public interface AppOwnerDAO {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.repository;

public interface UserDAO {

}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
Loading

0 comments on commit 48ebd5a

Please sign in to comment.