Bean Validation with Validator is not working - why? - java

I' currently trying Bean Validation by injecting Validator in a CDI-Bean.
That's why I've written a servlet which injects the validator property. The problem is that im getting wrong results. For example, it says that the name and the surname properties aren't allowed to be null although I've set them with regular name and surnames.
Did I do something wrong?
Here is my Servlet:
#WebServlet
public class BeanValidationServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
#Inject
private Validator validator;
#Inject
private WorkEmployee workEmployee;
#Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
PrintWriter writer = response.getWriter();
workEmployee.getAdresse().setPostalCode("8888");
workEmployee.getAdresse().setStreet("Washington Street");
workEmployee.getAdresse().setStreetNumber(98);
workEmployee.getAdresse().setHome("Philadeplphia");
workEmployee.setEmployeeId(12);
workEmployee.setName("John");
workEmployee.setSurname("Doeuuu");
writer.print("<h1> Surname:" + workEmployee.getSurname() + "<h1>");
Set<ConstraintViolation<WorkEmployee>> constraintViolations = validator
.validate(workEmployee);
for (ConstraintViolation<WorkEmployee> violation : constraintViolations) {
writer.print("<h1>" + violation.getPropertyPath() + ": "
+ violation.getMessage() + "<h1>");
writer.print("<h1>" + violation.getRootBean() + "<h1>");
writer.print("<h1>-------------------------------<h1>");
}
Set<ConstraintViolation<Adress>> constraintViolations2 = validator
.validate(workEmployee.getAdresse());
for (ConstraintViolation<Adress> violation : constraintViolations2) {
writer.print("<h1>" + violation.getPropertyPath() + ": "
+ violation.getMessage() + "<h1>");
writer.print("<h1>" + violation.getRootBean() + "<h1>");
writer.print("<h1>-------------------------------<h1>");
}
}
}
And that are my CDI-Beans:
The Worker-class:
#RequestScoped
public class Worker implements WorkEmployee{
#NotNull
private String name;
#NotNull
#Size(min=5,max=15)
#Pattern(regexp="Doe")
private String surname;
#Min(5)
#Max(12)
private int employeeId;
#Inject
#Valid
private Adress adresse;
#Override
public String getName() {
return name;
}
#Override
public void setName(String name) {
this.name = name;
}
#Override
public String getSurname() {
return surname;
}
#Override
public void setSurname(String surname) {
this.surname = surname;
}
#Override
public int getEmployeeId() {
return employeeId;
}
#Override
public void setEmployeeId(int employeeId) {
this.employeeId = employeeId;
}
#Override
public Adress getAdresse() {
return adresse;
}
#Override
public void setAdresse(Adress adresse) {
this.adresse = adresse;
}
}
The Adress-Class:
#RequestScoped
public class Adress {
#Pattern(regexp="^47269$")
private String postalCode;
#NotNull
private String street;
#NotNull
#Min(15)
#Max(99)
private int streetNumber;
#NotNull
#Size(max=25)
private String home;
public String getPostalCode() {
return postalCode;
}
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public int getStreetNumber() {
return streetNumber;
}
public void setStreetNumber(int streetNumber) {
this.streetNumber = streetNumber;
}
public String getHome() {
return home;
}
public void setHome(String home) {
this.home = home;
}
}

Related

save(Object)" because "this.userRepo" is null

When I post the data that time getting this error
Cannot invoke "com.helpmydesk.Repo.UserRepo.save(Object)" because "this.userRepo" is null
at com.helpmydesk.InterFaceAndService.ServiceClass.execute(ServiceClass.java:17) ~[classes/:na]
at com.helpmydesk.ControllerClass.execute(ControllerClass.java:27) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
Main Class
#EnableJpaRepositories("package com.helpmydesk.Repo.UserRepo")
#SpringBootApplication
public class HelpmydeskApplication {
public static void main(String[] args) {
SpringApplication.run(HelpmydeskApplication.class, args);
}
}
Controller Class
#Controller
public class ControllerClass {
#Autowired
private InterfaceClass interfaceClass;
public ControllerClass(InterfaceClass interfaceClass) {
this.interfaceClass = interfaceClass;
}
#PostMapping("/doregister")
public User execute(#RequestBody User user) {
return this.interfaceClass.execute(user);
}
#RequestMapping("/")
public String home() {
return "home";
}
#RequestMapping("/singup")
public String singup() {
return "singup";
}
}
Repository Class
#Repository
public interface UserRepo extends CrudRepository<User, Integer> {
}
interface Class
public interface InterfaceClass {
public User execute(User user);
}
Service Class
#Service
public class ServiceClass implements InterfaceClass {
private UserRepo userRepo;
public User execute(User user) {
this.userRepo.save(user);
return user;
}
}
User Class
#org.hibernate.annotations.Entity
#Table(name = "USER")
public class User {
#Id
#GeneratedValue(strategy= GenerationType.AUTO)
private int id;
private String name;
#Column(unique = true)
private String email;
private String password;
private String role;
private boolean enabled;
private String imageUrl;
#Column(length = 500)
private String about;
#OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user")
private java.util.List<Blog> blogs = new ArrayList<>();
public User() {
super();
// TODO Auto-generated constructor stub
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public String getAbout() {
return about;
}
public void setAbout(String about) {
this.about = about;
}
#Override
public String toString() {
return "User [id=" + id + ", name=" + name + ", email=" + email + ", password=" + password + ", role=" + role
+ ", enabled=" + enabled + ", imageUrl=" + imageUrl + ", about=" + about + "]";
}
}
enter image description here
You don't have #Autowired on your UserRepo variable. You can add it; the better fix is to eliminate field injection and use an ordinary constructor. Spring will provide all of the necessary dependencies when it calls the constructor, it makes testing much easier, and it prevents problems of this sort.
you should add #Autowired in your service class before ligne UserRepo userRepo
because userRepo must be injected before using it

org.springframework.orm.jpa.JpaSystemException: Error accessing field by reflection for persistent property

I am using Spring Boot (v 2.4.0) with Hibernate 5.4.24 and, when trying to get some information from my database, I keep getting this error message:
org.springframework.orm.jpa.JpaSystemException: Error accessing field [private int es.uc3m.orders.model.Shoppingcart.usID] by reflection for persistent property [es.uc3m.orders.model.Shoppingcart#usID] : 1; nested exception is org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [private int es.uc3m.orders.model.Shoppingcart.usID] by reflection for persistent property [es.uc3m.orders.model.Shoppingcart#usID] : 1
It is kind of weird for me, because it only happens when I try to access the table Shoppingcart, since I can get informatin from the rest of the tables.
I also used the exact same entities with another project but, insetad of using Spring Boot, persistence was made with EntityManagers and it worked perfectly fine.
These are my entities:
Shoppingcart
#Entity
#NamedQuery(name="Shoppingcart.findAll", query="SELECT s FROM Shoppingcart s")
public class Shoppingcart implements Serializable {
private static final long serialVersionUID = 1L;
#Id
#GeneratedValue(strategy=GenerationType.IDENTITY)
private int scID;
private int usID;
//bi-directional many-to-many association to Product
#ManyToMany
#JoinTable(
name="sc_has_product"
, joinColumns={
#JoinColumn(name="scID")
}
, inverseJoinColumns={
#JoinColumn(name="productID")
}
)
private List<Product> products;
//bi-directional one-to-one association to User
#OneToOne(mappedBy="shoppingcart")
private User user;
public Shoppingcart() {
}
public int getScID() {
return this.scID;
}
public void setScID(int scID) {
this.scID = scID;
}
public int getusID() {
return this.usID;
}
public void setusID(int usID) {
this.usID = usID;
}
public List<Product> getProducts() {
return this.products;
}
public void setProducts(List<Product> products) {
this.products = products;
}
public User getUser() {
return this.user;
}
public void setUser(User user) {
this.user = user;
}
public boolean isNull() {
return getProducts().isEmpty();
}
User
#Entity
#Table(name="users")
#NamedQuery(name="User.findAll", query="SELECT u FROM User u")
public class User implements Serializable {
private static final long serialVersionUID = 1L;
#Id
#GeneratedValue(strategy=GenerationType.IDENTITY)
private int id;
private String address;
#Column(name="card_n")
private Long cardN;
private String city;
private String country;
private int cvv;
private String email;
private String exp;
private String name;
private String pass;
private String surname1;
private String surname2;
private String typeOfUser;
#Column(name="zip_code")
private int zipCode;
//bi-directional many-to-one association to Order
#OneToMany(mappedBy="user")
private List<Orders> orders;
//bi-directional many-to-one association to Product
#OneToMany(mappedBy="user")
private List<Product> products;
//bi-directional one-to-one association to Shoppingcart
#OneToOne(cascade=CascadeType.REMOVE)
#JoinColumn(name="ID", referencedColumnName="usID", insertable=false, updatable=false)
private Shoppingcart shoppingcart;
public User() {
}
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public Long getCardN() {
return this.cardN;
}
public void setCardN(Long cardN) {
this.cardN = cardN;
}
public String getCity() {
return this.city;
}
public void setCity(String city) {
this.city = city;
}
public String getCountry() {
return this.country;
}
public void setCountry(String country) {
this.country = country;
}
public int getCvv() {
return this.cvv;
}
public void setCvv(int cvv) {
this.cvv = cvv;
}
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public String getExp() {
return this.exp;
}
public void setExp(String exp) {
this.exp = exp;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getPass() {
return this.pass;
}
public void setPass(String pass) {
this.pass = pass;
}
public String getSurname1() {
return this.surname1;
}
public void setSurname1(String surname1) {
this.surname1 = surname1;
}
public String getSurname2() {
return this.surname2;
}
public void setSurname2(String surname2) {
this.surname2 = surname2;
}
public int getZipCode() {
return this.zipCode;
}
public void setZipCode(int zipCode) {
this.zipCode = zipCode;
}
public List<Orders> getOrders() {
return this.orders;
}
public void setOrders(List<Orders> orders) {
this.orders = orders;
}
public Orders addOrder(Orders order) {
getOrders().add(order);
order.setUser(this);
return order;
}
public Orders removeOrder(Orders order) {
getOrders().remove(order);
order.setUser(null);
return order;
}
public List<Product> getProducts() {
return this.products;
}
public void setProducts(List<Product> products) {
this.products = products;
}
public Product addProduct(Product product) {
getProducts().add(product);
product.setUser(this);
return product;
}
public Product removeProduct(Product product) {
getProducts().remove(product);
product.setUser(null);
return product;
}
public Shoppingcart getShoppingcart() {
return this.shoppingcart;
}
public void setShoppingcart(Shoppingcart shoppingcart) {
this.shoppingcart = shoppingcart;
}
public String getTypeOfUser() {
return typeOfUser;
}
public void setTypeOfUser(String typeOfUser) {
this.typeOfUser = typeOfUser;
}
}
This is the ShoppingcartDAO class:
public interface ShoppingCartDAO extends CrudRepository<Shoppingcart, Integer> {
#Query("SELECT s FROM Shoppingcart s JOIN User u ON u.id = s.usID AND u.id LIKE :id")
Shoppingcart findByUser(#Param("id") int id);
#Query("SELECT s FROM Shoppingcart s")
List<Shoppingcart> findAllShoppingCart();
}
And, finally, this is my ShoppingcartController class:
#RestController
#CrossOrigin
#EnableAutoConfiguration
public class ShoppingCartController {
#Autowired
ShoppingCartDAO scDAO;
#RequestMapping(value = "sc", method = RequestMethod.POST, produces = "application/json")
public ResponseEntity<?> assignShoppingCart(#RequestBody(required = true) Shoppingcart sc) {
try {
scDAO.save(sc);
return new ResponseEntity<Void>(HttpStatus.CREATED);
} catch(Exception e) {
return new ResponseEntity<Void>(HttpStatus.BAD_REQUEST);
}
}
#RequestMapping(value = "sc", method = RequestMethod.GET, produces = "application/json")
public ResponseEntity<?> getEveryShoppingCart() {
try {
List<Shoppingcart> sc = scDAO.findAllShoppingCart();
return new ResponseEntity<List<Shoppingcart>>(sc, (sc != null) ? HttpStatus.OK : HttpStatus.NOT_FOUND);
} catch(Exception e) {
System.out.println(e);
return new ResponseEntity<Void>(HttpStatus.BAD_REQUEST);
}
}
}
I am really going nuts as I canĀ“t figure out what is going on with my code, so thank you in advance if you help me.
I finally fixed it. For those of you who are wondering how, I deleted the relationships between tables that I had, ending with:
Shoppingcart:
#Entity
public class Shoppingcart implements Serializable {
private static final long serialVersionUID = 1L;
#Id
#GeneratedValue(strategy=GenerationType.IDENTITY)
private int scID;
#Column(name = "usID")
private Integer userID;
public Shoppingcart() {
}
public int getScID() {
return this.scID;
}
public void setScID(int scID) {
this.scID = scID;
}
public Integer getUserID() {
return userID;
}
public void setUserID(Integer userID) {
this.userID = userID;
}
Product:
#Entity
public class Product implements Serializable {
private static final long serialVersionUID = 1L;
#Id
#GeneratedValue(strategy=GenerationType.IDENTITY)
private int productID;
private String category;
private String color;
private String description;
private String estadoProducto;
private String fecha;
private int orderID;
private String photo;
private double price;
private int seller;
private String sexo;
private String state = "Disponible";
private String talla;
private String title;
public Product() {
}
public int getProductID() {
return this.productID;
}
public void setProductID(int productID) {
this.productID = productID;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getColor() {
return this.color;
}
public void setColor(String color) {
this.color = color;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getEstadoProducto() {
return this.estadoProducto;
}
public void setEstadoProducto(String estadoProducto) {
this.estadoProducto = estadoProducto;
}
public String getFecha() {
return this.fecha;
}
public void setFecha(String fecha) {
this.fecha = fecha;
}
public String getPhoto() {
return this.photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public double getPrice() {
return this.price;
}
public void setPrice(double price) {
this.price = price;
}
public String getSexo() {
return this.sexo;
}
public void setSexo(String sexo) {
this.sexo = sexo;
}
public String getState() {
return this.state;
}
public void setState(String state) {
this.state = state;
}
public String getTalla() {
return this.talla;
}
public void setTalla(String talla) {
this.talla = talla;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public int getOrderID() {
return orderID;
}
public void setOrderID(int orderID) {
this.orderID = orderID;
}
public int getSeller() {
return seller;
}
public void setSeller(int seller) {
this.seller = seller;
}
With this, everything worked fine, but don't ask me why, because I don't know it.
Your Getters/Setters are wrongly implemented.
Like :
Actual :
public int getusID() {
return this.usID;
}
Expected :
public int getUsID() {
return this.usID;
}
Same with setter

get data in json format between two mapping classes

I have mapping with class admin and class role I want to show the data od admin class in Json format but I have error Http 500 because this is a mapping between class admin and role how can I do this?
this is my class Admin
#Entity
public class Admin implements Serializable {
#Id
#GeneratedValue
private int idAdmin;
private String email;
private String cin;
private String nom;
private String prenom;
private String loginAdmin;
private String adresse;
private Long tele;
private String motPasse;
private boolean actived;
#ManyToOne
#JoinColumn(name = "idRole")
private Role role;
public Admin() {
super();
}
public int getIdAdmin() {
return idAdmin;
}
public void setIdAdmin(int idAdmin) {
this.idAdmin = idAdmin;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public String getPrenom() {
return prenom;
}
public void setPrenom(String prenom) {
this.prenom = prenom;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMotPasse() {
return motPasse;
}
public void setMotPasse(String motPasse) {
this.motPasse = motPasse;
}
public boolean isActived() {
return actived;
}
public void setActived(boolean actived) {
this.actived = actived;
}
public String getCin() {
return cin;
}
public void setCin(String cin) {
this.cin = cin;
}
public Role getRole() {
return role;
}
public void setRole(Role role) {
this.role = role;
}
public String getLoginAdmin() {
return loginAdmin;
}
public void setLoginAdmin(String loginAdmin) {
this.loginAdmin = loginAdmin;
}
public String getAdresse() {
return adresse;
}
public void setAdresse(String adresse) {
this.adresse = adresse;
}
public Long getTele() {
return tele;
}
public void setTele(Long tele) {
this.tele = tele;
}
}
And this is my role class
#Entity
public class Role implements Serializable {
#Id
#GeneratedValue
private Long idRole;
private String roleName;
#OneToMany(mappedBy = "role")
private List<Admin> admin;
public Role() {
super();
}
public Long getIdRole() {
return idRole;
}
public void setIdRole(Long idRole) {
this.idRole = idRole;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public void setAdmin(List<Admin> admin) {
this.admin = admin;
}
public List<Admin> getAdmin() {
return admin;
}
}
And this is my function in controller to show the data in json format
#RequestMapping(value =" /jsonPosts", method = RequestMethod.GET,produces =
"application/json")
#ResponseBody
public List<Admin> generateJSONPosts() {
return adminService.selectAll();
}
The problem is the mapping between role and admin

Java Arraylist change one attribute value in all objects at the same time

I have a model with this attribute
public class Audit extends BaseModel implements Comparable {
#Column
#PrimaryKey
#SerializedName("audit_id")
private int id;
#Column
#SerializedName("address_line_1")
private String addressLine1;
#Column
#SerializedName("address_line_2")
private String addressLine2;
#Column
#SerializedName("city_name")
private String city;
#Column
#SerializedName("zip_code")
private String zipcode;
#Column
#SerializedName("company_id")
private int companyId;
#Column
#SerializedName("company_name")
private String companyName;
#Column
#SerializedName("loc_name")
private String location;
#Column
#SerializedName("inspection_date_time")
private OffsetDateTime inspectionTime;
#Column
#SerializedName("inspection_number")
private String inspectionNumber;
#Column(defaultValue = "0")
private int auditStatus;
#Column(defaultValue = "0")
private int userId;
public int getId() {
return id;
}
public String getAddressLine1() {
return addressLine1;
}
public String getAddressLine2() {
return addressLine2;
}
public String getCity() {
return city;
}
public String getZipcode() {
return zipcode;
}
public int getCompanyId() {
return companyId;
}
public String getCompanyName() {
return companyName;
}
public String getLocation() {
return location;
}
public OffsetDateTime getInspectionTime() {
return inspectionTime;
}
public String getInspectionNumber() {
return inspectionNumber;
}
public void setId(int id) {
this.id = id;
}
public void setAddressLine1(String addressLine1) {
this.addressLine1 = addressLine1;
}
public void setAddressLine2(String addressLine2) {
this.addressLine2 = addressLine2;
}
public void setCity(String city) {
this.city = city;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public void setCompanyId(int companyId) {
this.companyId = companyId;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public void setLocation(String location) {
this.location = location;
}
public void setInspectionTime(OffsetDateTime inspectionTime) {
this.inspectionTime = inspectionTime;
}
public void setInspectionNumber(String inspectionNumber) {
this.inspectionNumber = inspectionNumber;
}
#Override
public int compareTo(#NonNull Object audits) {
int result = -1;
if (audits instanceof Audit) {
Audit audit = (Audit) audits;
if (this.getInspectionTime().isEqual(audit.getInspectionTime())) {
result = 0;
} else if
(this.getInspectionTime().isAfter(audit.getInspectionTime())) {
result = 1;
}
}
return result;
}
public int getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(int auditStatus) {
this.auditStatus = auditStatus;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
In here I get all values to Arraylist using this model
List<Audit> auditList
My list is "auditList", It contains Audit objects, In this auditList I want to chnge one attribute
for ex: I want to change userId value to "3" in all objects, How can I do it once, Is there any solution please Help Me
Using Java 8 Stream :
auditList.stream().forEach(elt -> elt.setUserId(3));
It corresponds to :
for (Audit aud : auditList) {
aud.setUserId(3);
}
You will need to iterate through all elements and update
for (Audit aud : auditList) {
aud.setUserId(3);
}
If you want it on one line then
for (Audit aud : auditList) aud.setUserId(3);

org.hibernate.QueryException: could not resolve property with where clause

I am trying to get customers data in database based on condition where status of each customer is "Actve" this is the default value at the time of insertion but I am setting it deactivated in some query ultimately I want only those who have status "Active"
I did this
#Override
public List<Customer> listCustomers() {
return this.sessionFactory.getCurrentSession().createQuery("from customer).list();
}
But I am getting all active and deactivated customer
Then I did this
#Override
public List<Customer> listCustomers() {
return this.sessionFactory.getCurrentSession().createQuery("from com.mphasis.bharathbank.bean.customer where status="+"'Active'").list();
}
Here I am getting Exception
SEVERE: Servlet.service() for servlet [dispatcher] in context with
path [/BharathBank] threw exception [Request processing failed; nested
exception is org.hibernate.QueryException: could not resolve property:
status of: com.mphasis.bharathbank.bean.Customer [from
com.mphasis.bharathbank.bean.Customer as c where c.status=Active]]
with root cause org.hibernate.QueryException: could not resolve
property: status of: com.mphasis.bharathbank.bean.Customer [from
com.mphasis.bharathbank.bean.Customer as c where c.status=Active]
Model Customer Class
#Entity(name="customer")
#Table(name="customer")
public class Customer implements Serializable{
private static final long serialVersionUID = 1L;
#Id
#GeneratedValue(strategy =GenerationType.AUTO)
#Column(name="CustID")
private int CustID;
#Column(name="Mobile_No")
private String mobileno;
#Column(name="F_Name")
private String fname;
#Column(name="L_Name")
private String lname;
#Column(name="Email_Id")
private String emailid;
#Column(name="DOB")
private String dob;
#Column(name="Gender")
private String gender;
#Column(name="Acc_No")
private String accno;
#Column(name="Pwd")
private String Pwd;
#Column(name="present_address")
private String present_address;
#Column(name="permanent_address")
private String permanent_address;
#Column(name="occupation")
private String occupation;
#Column(name="marital_status")
private String marital_status;
#Column(name="adhaar_card_no")
private String adhaar_no;
#Column(name="pan")
private String pan;
#Column(name="Balance")
private String initial_bal;
#Column(name="status")
private String accstatus;
public String getAccstatus() {
return accstatus;
}
public void setAccstatus(String accstatus) {
this.accstatus = accstatus;
}
public int getCustID() {
return CustID;
}
public void setCustID(int custID) {
CustID = custID;
}
public String getMobileno() {
return mobileno;
}
public void setMobileno(String mobileno) {
this.mobileno = mobileno;
}
public String getFname() {
return fname;
}
public void setFname(String fname) {
this.fname = fname;
}
public String getLname() {
return lname;
}
public void setLname(String lname) {
this.lname = lname;
}
public String getEmailid() {
return emailid;
}
public void setEmailid(String emailid) {
this.emailid = emailid;
}
public String getDob() {
return dob;
}
public void setDob(String dob) {
this.dob = dob;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getAccno() {
return accno;
}
public void setAccno(String accno) {
this.accno = accno;
}
public String getPwd() {
return Pwd;
}
public void setPwd(String pwd) {
Pwd = pwd;
}
public String getPresent_address() {
return present_address;
}
public void setPresent_address(String present_address) {
this.present_address = present_address;
}
public String getPermanent_address() {
return permanent_address;
}
public void setPermanent_address(String permanent_address) {
this.permanent_address = permanent_address;
}
public String getOccupation() {
return occupation;
}
public void setOccupation(String occupation) {
this.occupation = occupation;
}
public String getMarital_status() {
return marital_status;
}
public void setMarital_status(String marital_status) {
this.marital_status = marital_status;
}
public String getAdhaar_no() {
return adhaar_no;
}
public void setAdhaar_no(String adhaar_no) {
this.adhaar_no = adhaar_no;
}
public String getPan() {
return pan;
}
public void setPan(String pan) {
this.pan = pan;
}
public String getInitial_bal() {
return initial_bal;
}
public void setInitial_bal(String initial_bal) {
this.initial_bal = initial_bal;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}

Categories