public class Example extends Object implements IDynamicTableName
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Example.Builder |
static class |
Example.Criteria |
static class |
Example.Criterion |
protected static class |
Example.GeneratedCriteria |
static class |
Example.OrderBy |
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
countColumn |
protected boolean |
distinct |
protected Class<?> |
entityClass |
protected Set<String> |
excludeColumns |
protected boolean |
exists |
protected boolean |
forUpdate |
protected boolean |
notNull |
protected Example.OrderBy |
ORDERBY |
protected String |
orderByClause |
protected List<Example.Criteria> |
oredCriteria |
protected Map<String,EntityColumn> |
propertyMap |
protected Set<String> |
selectColumns |
protected EntityTable |
table |
protected String |
tableName |
| 构造器和说明 |
|---|
Example(Class<?> entityClass)
默认exists为true
|
Example(Class<?> entityClass,
boolean exists)
带exists参数的构造方法,默认notNull为false,允许为空
|
Example(Class<?> entityClass,
boolean exists,
boolean notNull)
带exists参数的构造方法
|
protected String orderByClause
protected boolean distinct
protected boolean exists
protected boolean notNull
protected boolean forUpdate
protected String countColumn
protected List<Example.Criteria> oredCriteria
protected Class<?> entityClass
protected EntityTable table
protected Map<String,EntityColumn> propertyMap
protected String tableName
protected Example.OrderBy ORDERBY
public Example(Class<?> entityClass)
entityClass - public Example(Class<?> entityClass, boolean exists)
entityClass - exists - - true时,如果字段不存在就抛出异常,false时,如果不存在就不使用该字段的条件public Example(Class<?> entityClass, boolean exists, boolean notNull)
entityClass - exists - - true时,如果字段不存在就抛出异常,false时,如果不存在就不使用该字段的条件notNull - - true时,如果值为空,就会抛出异常,false时,如果为空就不使用该字段的条件public static Example.Builder builder(Class<?> entityClass)
public Example.OrderBy orderBy(String property)
public Example excludeProperties(String... properties)
properties - 属性名的可变参数public Example selectProperties(String... properties)
properties - public void or(Example.Criteria criteria)
public Example.Criteria or()
public void and(Example.Criteria criteria)
public Example.Criteria and()
public Example.Criteria createCriteria()
protected Example.Criteria createCriteriaInternal()
public void clear()
public String getCountColumn()
public String getDynamicTableName()
IDynamicTableNamegetDynamicTableName 在接口中 IDynamicTableNamepublic Class<?> getEntityClass()
public String getOrderByClause()
public void setOrderByClause(String orderByClause)
public List<Example.Criteria> getOredCriteria()
public boolean isDistinct()
public void setDistinct(boolean distinct)
public boolean isForUpdate()
public void setForUpdate(boolean forUpdate)
public void setCountProperty(String property)
property - public void setTableName(String tableName)
tableName - Copyright © 2018. All Rights Reserved.