Commits

Anonymous committed 1824642

18:04 2010/07/08

  • Participants
  • Parent commits 4e40bcc

Comments (0)

Files changed (1)

File src/info/mrchen/gae/blog/service/SysConfService.java

+package info.mrchen.gae.blog.service;
+
+import info.mrchen.gae.blog.dao.SysConfDao;
+import info.mrchen.gae.blog.pojo.SysConf;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.google.appengine.api.users.User;
+
+@Component
+public class SysConfService {
+
+	@Autowired
+	SysConfDao SysConfDao;
+
+	public SysConf get(Long id) {
+		return SysConfDao.get(id);
+	}
+
+	public SysConf get(String key) {
+		return SysConfDao.get(key);
+	}
+
+	public SysConf get(User user, String key) {
+		return SysConfDao.get(user, key);
+	}
+
+	public String getValue(String SysConfKey) {
+		SysConf conf = this.get(SysConfKey);
+		if (conf != null && conf.getValue() != null) {
+			return conf.getValue();
+		} else {
+			return null;
+		}
+	}
+}