Uses of Class
com.github.drinkjava2.jsqlbox.SqlBoxContext

Packages that use SqlBoxContext
com.github.drinkjava2.jsqlbox   
com.github.drinkjava2.jsqlbox.entitynet   
com.github.drinkjava2.jsqlbox.sharding   
 

Uses of SqlBoxContext in com.github.drinkjava2.jsqlbox
 

Fields in com.github.drinkjava2.jsqlbox declared as SqlBoxContext
protected static SqlBoxContext SqlBoxContext.globalSqlBoxContext
           
 

Methods in com.github.drinkjava2.jsqlbox that return SqlBoxContext
 SqlBoxContext ActiveRecord.ctx(Object... items)
           
static SqlBoxContext SqlBoxContext.gctx()
          Shortcut method equal to getGlobalSqlBoxContext()
static SqlBoxContext JSQLBOX.gctx()
          Shortcut method equal to SqlBoxContext.getGlobalSqlBoxContext()
static SqlBoxContext SqlBoxContext.getGlobalSqlBoxContext()
          Get the global static SqlBoxContext instance
 SqlBoxContext SqlBoxContext.getShardedDB(Object entityOrClass, Object... shardvalues)
          Get the sharded DB(=SqlBoxContext) instance by given shard values
static SqlBoxContext SqlBoxContextUtils.getShardedDB(SqlBoxContext currentCtx, Object entityOrClass, Object... shardKey)
          Use current SqlBoxContext's shardingTools to calculate the master SqlBoxContext
 SqlBoxContext ActiveRecord.shardDB(Object... items)
          Return current SqlBoxContext based on shard key value
 

Methods in com.github.drinkjava2.jsqlbox with parameters of type SqlBoxContext
static EntityNet SqlBoxContextUtils.entityAutoNet(SqlBoxContext ctx, Class<?>... entityClasses)
           
static int SqlBoxContextUtils.entityCountAll(SqlBoxContext ctx, Class<?> entityClass, Object... optionItems)
          Count quantity of all entity, this method does not support sharding
static int SqlBoxContextUtils.entityDeleteByIdTry(SqlBoxContext ctx, Class<?> entityClass, Object id, Object... optionItems)
          Try delete entity by Id, return row affected, return row affected
static int SqlBoxContextUtils.entityDeleteTry(SqlBoxContext ctx, Object entityBean, Object... optionItems)
          Delete entityBean in database according primary key value, return row affected
static boolean SqlBoxContextUtils.entityExist(SqlBoxContext ctx, Object entityBean, Object... optionItems)
          Check if entityBean exist in database by its id
static boolean SqlBoxContextUtils.entityExistById(SqlBoxContext ctx, Class<?> entityClass, Object id, Object... optionItems)
          Try delete entity by Id, return row affected
static
<T> List<T>
SqlBoxContextUtils.entityFindAll(SqlBoxContext ctx, Class<T> entityClass, Object... optionItems)
           
static
<T> List<T>
SqlBoxContextUtils.entityFindBySample(SqlBoxContext ctx, Object sampleBean, Object... sqlItems)
           
static
<E> List<E>
SqlBoxContextUtils.entityFindRelatedList(SqlBoxContext ctx, Object entity, Object... sqlItems)
           
static
<E> Map<Object,E>
SqlBoxContextUtils.entityFindRelatedMap(SqlBoxContext ctx, Object entity, Object... sqlItems)
           
static
<E> E
SqlBoxContextUtils.entityFindRelatedOne(SqlBoxContext ctx, Object entity, Object... sqlItems)
           
static
<E> Set<E>
SqlBoxContextUtils.entityFindRelatedSet(SqlBoxContext ctx, Object entity, Object... sqlItems)
           
static int SqlBoxContextUtils.entityInsertTry(SqlBoxContext ctx, Object entityBean, Object... optionItems)
          Insert entityBean into database, and change ID fields to values generated by IdGenerator (identity or sequence or UUID...), return row affected
static
<T> T
SqlBoxContextUtils.entityLoadByIdTry(SqlBoxContext ctx, Class<T> entityClass, Object id, Object... optionItems)
          Create a new Entity, load from DB according given ID, return null if entity does not exist in DB
static int SqlBoxContextUtils.entityLoadTry(SqlBoxContext ctx, Object entityBean, Object... optionItems)
          Load entity according entity's id fields, return row affected
static int SqlBoxContextUtils.entityUpdateTry(SqlBoxContext ctx, Object entityBean, Object... optionItems)
          Update entityBean according primary key, return row affected
static TableModel SqlBoxContextUtils.findTailModel(SqlBoxContext ctx, TableModel entityModel, Object... optionItems)
          Return first tail TableModel, if not found return null
static SqlBoxContext SqlBoxContextUtils.getShardedDB(SqlBoxContext currentCtx, Object entityOrClass, Object... shardKey)
          Use current SqlBoxContext's shardingTools to calculate the master SqlBoxContext
static String SqlBoxContextUtils.getShardedTB(SqlBoxContext ctx, Object entityOrClass, Object... shardKey)
          Use current SqlBoxContext's shardingTools to calculate the real shardTable name
static TableModel[] SqlBoxContextUtils.loadMetaTableModels(SqlBoxContext ctx, Dialect dialect)
          Read database Meta info into SqlBox[]
static void SqlBoxContext.setGlobalSqlBoxContext(SqlBoxContext globalSqlBoxContext)
           
 T ActiveRecord.useContext(SqlBoxContext ctx)
           
 

Uses of SqlBoxContext in com.github.drinkjava2.jsqlbox.entitynet
 

Methods in com.github.drinkjava2.jsqlbox.entitynet with parameters of type SqlBoxContext
<E> List<E>
EntityNet.findRelatedList(SqlBoxContext ctx, Object entity, Object... sqlItems)
          Search related entity list inside of current EntityNet
<E> Map<Object,E>
EntityNet.findRelatedMap(SqlBoxContext ctx, Object entity, Object... sqlItems)
          Inside of current EntityNet, search related entity Map
<E> Set<E>
EntityNet.findRelatedSet(SqlBoxContext ctx, Object entity, Object... sqlItems)
          Search related entity set inside of current EntityNet
 

Uses of SqlBoxContext in com.github.drinkjava2.jsqlbox.sharding
 

Methods in com.github.drinkjava2.jsqlbox.sharding that return SqlBoxContext
 SqlBoxContext[] ShardingTool.handleShardDatabase(SqlBoxContext ctx, TableModel tableModel, Object... shardKey)
          Dealing a shardKey array based on current SqlBoxContext and TableModel, return SqlBoxContext array, in this jSqlBox version, only support return 1 SqlBoxContext
 SqlBoxContext[] ShardingRangeTool.handleShardDatabase(SqlBoxContext ctx, TableModel model, Object... shardkey)
           
 SqlBoxContext[] ShardingModTool.handleShardDatabase(SqlBoxContext ctx, TableModel model, Object... shardkey)
           
 

Methods in com.github.drinkjava2.jsqlbox.sharding with parameters of type SqlBoxContext
 SqlBoxContext[] ShardingTool.handleShardDatabase(SqlBoxContext ctx, TableModel tableModel, Object... shardKey)
          Dealing a shardKey array based on current SqlBoxContext and TableModel, return SqlBoxContext array, in this jSqlBox version, only support return 1 SqlBoxContext
 SqlBoxContext[] ShardingRangeTool.handleShardDatabase(SqlBoxContext ctx, TableModel model, Object... shardkey)
           
 SqlBoxContext[] ShardingModTool.handleShardDatabase(SqlBoxContext ctx, TableModel model, Object... shardkey)
           
 String[] ShardingTool.handleShardTable(SqlBoxContext ctx, TableModel tableModel, Object... shardKey)
          Dealing a shardKey array based on current SqlBoxContext and TableModel, return table name array, in this jSqlBox version, only support return 1 table name
 String[] ShardingRangeTool.handleShardTable(SqlBoxContext ctx, TableModel model, Object... shardkey)
           
 String[] ShardingModTool.handleShardTable(SqlBoxContext ctx, TableModel model, Object... shardkey)
           
 



Copyright © 2018. All rights reserved.