Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package edu.pitt.is1017;
- import javax.ejb.Stateless;
- import javax.persistence.EntityManager;
- import javax.persistence.PersistenceContext;
- import javax.persistence.Query;
- @Stateless
- public class LoginFacade {
- @PersistenceContext(unitName="INFSCI017")
- private EntityManager em;
- public LoginFacade(){
- super();
- }
- public boolean checkLogin(String username, String password){
- Query check = em.createQuery("SELECT username, password FROM user WHERE username = :login AND password = :password LIMIT 1;");
- check.setParameter("login", username);
- check.setParameter("password", password);
- return false;
- }
Add Comment
Please, Sign In to add comment