topicquery.java

来自「blog,介绍:ui层是用ext做的」· Java 代码 · 共 46 行

JAVA
46
字号
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 + =
减小字号Ctrl + -
显示快捷键?