typeserviceimpl.java

来自「EasyJF开源新闻系统是一个由EasyJF开源团队组织开发的基于Java平台的」· Java 代码 · 共 34 行

JAVA
34
字号
package com.easyjf.news.logic.impl;

import java.util.List;

import com.easyjf.news.logic.TypeService;
import com.easyjf.news.model.Type;

public class TypeServiceImpl extends DAOSupportService implements TypeService {
    private static TypeServiceImpl typedao=new TypeServiceImpl();
    public static TypeServiceImpl getInstance(){
    	return typedao;
    }
	public boolean saveType(Type type) {
		return this.dao.save(type);
	}

	public boolean delType(Type type) {
		return this.dao.del(type);
	}

	public List getType() {
		return this.dao.query(Type.class, "id!=''");
	}

	public Type getTypeById(String id) {
		return (Type) this.dao.get(Type.class, id);
	}
	public List getTypeBySql(String sql) {
		// TODO Auto-generated method stub
		return this.dao.query(Type.class,sql);
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?