📄 topicquery.java
字号:
package com.easyjf.simpleblog.query;
import com.easyjf.container.annonation.POLoad;
import com.easyjf.core.support.query.QueryObject;
import com.easyjf.simpleblog.domain.TopicCategory;
public class TopicQuery extends QueryObject {
@POLoad(name="categoryId")
private TopicCategory category;
private String title="";
public TopicCategory getCategory() {
return category;
}
public void setCategory(TopicCategory category) {
this.category = category;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public void customizeQuery() {
if(category!=null)
{
this.addQuery("obj.category",category,"=");
}
if(!"".equals(title))
{
this.addQuery("obj.title","%"+title+"%","like");
}
if(this.getOrderBy()==null|| "".equals(this.getOrderBy()))
{
this.setOrderBy("inputTime");
this.setOrderType("desc");
}
super.customizeQuery();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -