Class QueryInfo.Builder

java.lang.Object
org.nervousync.database.query.QueryInfo.Builder
Enclosing class:
QueryInfo

public static final class QueryInfo.Builder extends Object
The type 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 type
      aliasName - the alias name
      entityClass - the entity class
      referenceClass - the reference class
      Throws:
      EntityStatusException - the entity status exception
    • queryColumn

      public void queryColumn(Class<?> entityClass, String identifyKey)
      Add query column query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
    • queryColumn

      public void queryColumn(Class<?> entityClass, String identifyKey, boolean distinct)
      Add query column query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      distinct - the distinct
    • queryColumn

      public void queryColumn(Class<?> entityClass, String identifyKey, boolean distinct, String aliasName)
      Add query column query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      distinct - the distinct
      aliasName - the alias name
    • queryFunction

      public void queryFunction(Class<?> entityClass, String aliasName, String sqlFunction, QueryItem... functionParams)
      Add query function.
      Parameters:
      entityClass - the entity class
      aliasName - the alias name
      sqlFunction - SQL function
      functionParams - Function parameter array
    • greater

      public void greater(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add greater condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • greater

      public void greater(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add greater condition query builder.
      Parameters:
      connCode - the connection code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • greaterEqual

      public void greaterEqual(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add greater equal condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - 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 code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • less

      public void less(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add less condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • less

      public void less(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add less condition query builder.
      Parameters:
      connCode - the connection code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • lessEqual

      public void lessEqual(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add less equal condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - 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 code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • equal

      public void equal(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add equal condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • equal

      public void equal(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add equal condition query builder.
      Parameters:
      connCode - the connection code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • notEqual

      public void notEqual(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add not equal condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - 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 code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • betweenAnd

      public void betweenAnd(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add between and condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - 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 code
      identifyKey - the identify key
      entityClass - the entity class
      matchCondition - the match condition
    • notBetweenAnd

      public void notBetweenAnd(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add not between and condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - 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 code
      identifyKey - the identify key
      entityClass - the entity class
      matchCondition - the match condition
    • like

      public void like(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add like condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • like

      public void like(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add like condition query builder.
      Parameters:
      connCode - the connection code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • notLike

      public void notLike(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add not like condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - 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 code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • isNull

      public void isNull(Class<?> entityClass, String identifyKey)
      Add is null condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
    • isNull

      public void isNull(ConnectionCode connCode, Class<?> entityClass, String identifyKey)
      Add is null condition query builder.
      Parameters:
      connCode - the connection code
      entityClass - the entity class
      identifyKey - the identify key
    • notNull

      public void notNull(Class<?> entityClass, String identifyKey)
      Add not null condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
    • notNull

      public void notNull(ConnectionCode connCode, Class<?> entityClass, String identifyKey)
      Add not null condition query builder.
      Parameters:
      connCode - the connection code
      entityClass - the entity class
      identifyKey - the identify key
    • in

      public void in(Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add in condition query builder.
      Parameters:
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • in

      public void in(ConnectionCode connCode, Class<?> entityClass, String identifyKey, MatchCondition matchCondition)
      Add in condition query builder.
      Parameters:
      connCode - the connection code
      entityClass - the entity class
      identifyKey - the identify key
      matchCondition - the match condition
    • group

      public void group(QueryCondition... queryConditions)
      Add group condition query builder.
      Parameters:
      queryConditions - the query conditions
    • group

      public void group(ConnectionCode connCode, QueryCondition... queryConditions)
      Add group condition query builder.
      Parameters:
      connCode - the connection code
      queryConditions - the query conditions
    • orderByItem

      public void orderByItem(Class<?> entityClass, String columnName)
      Add order by column
      Parameters:
      entityClass - the entity class
      columnName - 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 class
      identifyName - column identify name
      orderByType - sort type
      Throws:
      QueryException - the query exception
    • groupByItem

      public void groupByItem(Class<?> entityClass, String identifyName) throws QueryException
      Add order by column and sort type
      Parameters:
      entityClass - the entity class
      identifyName - 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 no
      pageLimit - 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

      public void lockOption(LockOption lockOption)
      Lock option builder.
      Parameters:
      lockOption - the lock option
    • analyzeBuilder

      public boolean analyzeBuilder()
      Analyze builder boolean.
      Returns:
      the boolean
    • match

      public boolean match(String databaseName)
      Match database alias boolean.
      Parameters:
      databaseName - the database name
      Returns:
      the boolean
    • build

      public QueryInfo build()
      Build query info.
      Returns:
      the query info