Package org.nervousync.database.query
Class QueryInfo.Builder
java.lang.Object
org.nervousync.database.query.QueryInfo.Builder
- Enclosing class:
- QueryInfo
The type Builder.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAnalyze builder boolean.voidbetweenAnd(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add between and condition query builder.voidbetweenAnd(ConnectionCode connCode, String identifyKey, Class<?> entityClass, MatchCondition matchCondition) Add between and condition query builder.build()Build query info.voidconfigPager(int pageNo, int pageLimit) Config pager query builder.voidequal(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add equal condition query builder.voidequal(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add equal condition query builder.voidforUpdate(boolean forUpdate) For update query builder.voidgreater(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add greater condition query builder.voidgreater(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add greater condition query builder.voidgreaterEqual(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add greater equal condition query builder.voidgreaterEqual(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add greater equal condition query builder.voidgroup(QueryCondition... queryConditions) Add group condition query builder.voidgroup(ConnectionCode connCode, QueryCondition... queryConditions) Add group condition query builder.voidgroupByItem(Class<?> entityClass, String identifyName) Add order by column and sort typevoidin(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add in condition query builder.voidin(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add in condition query builder.voidAdd is null condition query builder.voidisNull(ConnectionCode connCode, Class<?> entityClass, String identifyKey) Add is null condition query builder.voidAdd join table builder.voidless(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add less condition query builder.voidless(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add less condition query builder.voidlessEqual(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add less equal condition query builder.voidlessEqual(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add less equal condition query builder.voidlike(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add like condition query builder.voidlike(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add like condition query builder.voidlockOption(LockOption lockOption) Lock option builder.booleanMatch database alias boolean.voidnotBetweenAnd(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add not between and condition query builder.voidnotBetweenAnd(ConnectionCode connCode, String identifyKey, Class<?> entityClass, MatchCondition matchCondition) Add not between and condition query builder.voidnotEqual(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add not equal condition query builder.voidnotEqual(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add not equal condition query builder.voidnotLike(Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add not like condition query builder.voidnotLike(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add not like condition query builder.voidAdd not null condition query builder.voidnotNull(ConnectionCode connCode, Class<?> entityClass, String identifyKey) Add not null condition query builder.voidorderByItem(Class<?> entityClass, String columnName) Add order by columnvoidorderByItem(Class<?> entityClass, String identifyName, OrderByColumn.OrderByType orderByType) Add order by column and sort typevoidpagerParameter(int offset, int pageLimit) voidqueryColumn(Class<?> entityClass, String identifyKey) Add query column query builder.voidqueryColumn(Class<?> entityClass, String identifyKey, boolean distinct) Add query column query builder.voidqueryColumn(Class<?> entityClass, String identifyKey, boolean distinct, String aliasName) Add query column query builder.voidqueryFunction(Class<?> entityClass, String aliasName, String sqlFunction, QueryItem... functionParams) Add query function.voiduseCache(boolean cacheables) Use cache builder.
-
Method Details
-
joinTable
public void joinTable(JoinType joinType, String aliasName, Class<?> entityClass, Class<?> referenceClass) throws EntityStatusException Add join table builder.- Parameters:
joinType- the join typealiasName- the alias nameentityClass- the entity classreferenceClass- the reference class- Throws:
EntityStatusException- the entity status exception
-
queryColumn
Add query column query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify key
-
queryColumn
Add query column query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keydistinct- the distinct
-
queryColumn
public void queryColumn(Class<?> entityClass, String identifyKey, boolean distinct, String aliasName) Add query column query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keydistinct- the distinctaliasName- the alias name
-
queryFunction
public void queryFunction(Class<?> entityClass, String aliasName, String sqlFunction, QueryItem... functionParams) Add query function.- Parameters:
entityClass- the entity classaliasName- the alias namesqlFunction- SQL functionfunctionParams- Function parameter array
-
greater
Add greater condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
greater
public void greater(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add greater condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
greaterEqual
Add greater equal condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
greaterEqual
public void greaterEqual(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add greater equal condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
less
Add less condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
less
public void less(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add less condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
lessEqual
Add less equal condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
lessEqual
public void lessEqual(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add less equal condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
equal
Add equal condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
equal
public void equal(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add equal condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
notEqual
Add not equal condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
notEqual
public void notEqual(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add not equal condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
betweenAnd
Add between and condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
betweenAnd
public void betweenAnd(ConnectionCode connCode, String identifyKey, Class<?> entityClass, MatchCondition matchCondition) Add between and condition query builder.- Parameters:
connCode- the connection codeidentifyKey- the identify keyentityClass- the entity classmatchCondition- the match condition
-
notBetweenAnd
Add not between and condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
notBetweenAnd
public void notBetweenAnd(ConnectionCode connCode, String identifyKey, Class<?> entityClass, MatchCondition matchCondition) Add not between and condition query builder.- Parameters:
connCode- the connection codeidentifyKey- the identify keyentityClass- the entity classmatchCondition- the match condition
-
like
Add like condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
like
public void like(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add like condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
notLike
Add not like condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
notLike
public void notLike(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add not like condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
isNull
Add is null condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify key
-
isNull
Add is null condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify key
-
notNull
Add not null condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify key
-
notNull
Add not null condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify key
-
in
Add in condition query builder.- Parameters:
entityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
in
public void in(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition) Add in condition query builder.- Parameters:
connCode- the connection codeentityClass- the entity classidentifyKey- the identify keymatchCondition- the match condition
-
group
Add group condition query builder.- Parameters:
queryConditions- the query conditions
-
group
Add group condition query builder.- Parameters:
connCode- the connection codequeryConditions- the query conditions
-
orderByItem
Add order by column- Parameters:
entityClass- the entity classcolumnName- column name
-
orderByItem
public void orderByItem(Class<?> entityClass, String identifyName, OrderByColumn.OrderByType orderByType) throws QueryException Add order by column and sort type- Parameters:
entityClass- the entity classidentifyName- column identify nameorderByType- sort type- Throws:
QueryException- the query exception
-
groupByItem
Add order by column and sort type- Parameters:
entityClass- the entity classidentifyName- column identify name- Throws:
QueryException- the query exception
-
useCache
public void useCache(boolean cacheables) Use cache builder.- Parameters:
cacheables- the cacheables
-
configPager
public void configPager(int pageNo, int pageLimit) Config pager query builder.- Parameters:
pageNo- the page nopageLimit- the page limit
-
pagerParameter
public void pagerParameter(int offset, int pageLimit) -
forUpdate
public void forUpdate(boolean forUpdate) For update query builder.- Parameters:
forUpdate- the for update
-
lockOption
Lock option builder.- Parameters:
lockOption- the lock option
-
analyzeBuilder
public boolean analyzeBuilder()Analyze builder boolean.- Returns:
- the boolean
-
match
Match database alias boolean.- Parameters:
databaseName- the database name- Returns:
- the boolean
-
build
Build query info.- Returns:
- the query info
-