Newer
Older
import com.uca.core.*;
import com.uca.dao.*;
import com.uca.entity.*;
import java.util.*;
public class ProfCore extends _DefaultCore<ProfEntity> {
public static final ProfCore Instance = new ProfCore();
private ProfCore()
{
super(new ProfDAO());
public ProfEntity create(String firstName, String lastName, String userName, String password) {
ProfEntity entity = new ProfEntity();
entity.setFirstName(firstName);
entity.setLastName (lastName);
entity.setUserName (userName);
entity.setPassword(password);
public ProfEntity getByLoginPair(String username, String password)
{
for(ProfEntity p : dao.getAll())
{
if(p.getUserName() == username && p.getPassword() == password)
{
return p;
}
}
return null;
}