Back to project page Learn-From-Me.
The source code is released under:
Apache License
If you think the Android project Learn-From-Me listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.overnightApps.myapplication.app.service; /*from www . j av a 2 s .c o m*/ import com.overnightApps.myapplication.app.core.User; import com.overnightApps.myapplication.app.dao.UserDao; /** * Created by andre on 3/28/14. */ public class UserLogIn { private final UserDao userDao; private final String email; private final String password; public UserLogIn(String email, String password, UserDao userDao) { this.userDao = userDao; this.email = email; this.password = password; } public StatusCode logUserIn() { User user = null; user = userDao.logIn(email, password); if (user != null) { return StatusCode.SUCCESS; } else { return StatusCode.FAILURE; } } public enum StatusCode { SUCCESS("Successful login attempt"), FAILURE("Invalid Username/Password"); private String message; StatusCode(String message) { this.message = message; } public String getMessage() { return message; } public void appendMessage(String additionalInfo) { this.message += additionalInfo; } } }