package com.mgj.xfiretext.domain;
import java.io.Serializable;
import java.util.Date;
/**
*
* User.java com.mgj.xfiretext.domain xfire
*
* @author magj mailto:m441748725@163.com 2008-10-17 下午04:18:26
*
*/
public class User implements Serializable {
private static final long serialVersionUID = 6517808321041980976L;
private Long userId;
private String accountId;
private String userName;
private Date lastLogin;
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public Date getLastLogin() {
return lastLogin;
}
public void setLastLogin(Date lastLogin) {
this.lastLogin = lastLogin;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
package com.mgj.xfiretext.webserver;
import com.mgj.xfiretext.domain.User;
/**
*
* UserService.java
* com.mgj.xfiretext.webserver
* xfire
* @author magj mailto:m441748725@163.com
* 2008-10-17 下午04:16:09
*
*/
public interface UserService {
public User queryUserByAccoutId(String accountId);
}
package com.mgj.xfiretext.webserver;
import java.util.Date;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.mgj.xfiretext.domain.User;
/**
*
* UserServiceImpl.java
* com.mgj.xfiretext.webserver
* xfire
* @author magj mailto:m441748725@163.com
* 2008-10-17 下午04:17:26
*
*/
public class UserServiceImpl implements UserService{
private static final Log log = LogFactory.getLog(UserServiceImpl.class);
public User queryUserByAccoutId(String accountId){
log.debug("accountId=" + accountId);
User user = new User();
user.setAccountId("testAccount");
user.setLastLogin(new Date());
user.setUserName("mgj");
user.setUserId(new Long(123L));
return user;
}
}
|