org.webframe.easy.model.form.ViewElement Maven / Gradle / Ivy
package org.webframe.easy.model.form;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 类功能描述:
*
* @author getValueMap() {
return valueMap;
}
public void setValueMap(Map valueMap) {
this.valueMap = valueMap;
}
public boolean isColumn() {
return column;
}
public void setColumn(boolean column) {
this.column = column;
}
public boolean isQuery() {
return query;
}
public void setQuery(boolean query) {
this.query = query;
}
public boolean isFormed() {
return formed;
}
public ViewElement setFormed(boolean formed) {
this.formed = formed;
return this;
}
public QueryConditionType getQueryConditionType() {
return queryConditionType;
}
/**
* @param column 布尔值,true表示该Entity属性在列表页查询中显示该列,默认值为true
* @param query 布尔值,true表示该Entity属性在列表页查询中显示该查询条件,默认值为true
* @param queryConditionType 枚举类型
* @return
* @author: 黄国庆 2011-1-25 上午10:18:16
*/
public ViewElement setListPageConfig(boolean column, boolean query, QueryConditionType queryConditionType) {
setColumn(column);
setQuery(query);
if (query && queryConditionType == null) {
this.queryConditionType = QueryConditionType.模糊类型;
} else {
this.queryConditionType = queryConditionType;
}
return this;
}
public enum QueryConditionType {
模糊类型("fuzzy"), 布尔类型("bool"), 区间类型("interval"), 等值类型("equal");
private final String value;
private QueryConditionType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public String toString() {
return this.getValue();
}
}
}