📄 typeserviceimpl.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -