PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/web/DRCP/src/com/bluesky/drcp/business/service/LogService.java

http://drcp.googlecode.com/
Java | 38 lines | 29 code | 9 blank | 0 comment | 0 complexity | df513ecdbb1144fce21a2819103b8f3e MD5 | raw file
 1package com.bluesky.drcp.business.service;
 2
 3import java.util.Date;
 4
 5import com.bluesky.drcp.business.Log;
 6import com.bluesky.drcp.persistence.dao.LogDao;
 7
 8public class LogService {
 9	private LogDao logDao;
10
11	public void addLog(String userId, String computerName, String source,
12			int type, String category, String action, String comment) {
13
14		Log o = new Log();
15		o.setUserId(userId);
16		o.setDatetime(new Date());
17		o.setComputerName(computerName);
18		o.setSource(source);
19		o.setType(type);
20		o.setCategory(category);
21		o.setAction(action);
22		o.setComment(comment);
23
24		logDao.insert(o);
25	}
26
27	public void insert(Log o) {
28		logDao.insert(o);
29	}
30
31	public LogDao getLogDao() {
32		return logDao;
33	}
34
35	public void setLogDao(LogDao logDao) {
36		this.logDao = logDao;
37	}
38}