接口的使用
gu.sql2java.BaseBean
使用BaseBean的程序包
-
gu.sql2java中BaseBean的使用
类型参数类型为BaseBean的gu.sql2java中的类修饰符和类型类说明classBeanConverter<L extends BaseBean,R> classMapConverter<L extends BaseBean,R extends Map> interfaceTableManager<B extends BaseBean>Interface to handle database calls (save, load, count, etc...) for table.实现BaseBean的gu.sql2java中的类类型参数类型为BaseBean的gu.sql2java中的字段类型参数类型为BaseBean的gu.sql2java中的方法修饰符和类型方法说明<B extends BaseBean>
Comparator<B>RowMetaData.comparatorOf(int columnId, boolean bReverse) <B extends BaseBean>
BBaseBean.copy(B bean) Copies the passed bean into the current bean.<B extends BaseBean>
BBaseBean.copy(B bean, int... fieldList) Copies the passed bean into the current bean.<B extends BaseBean>
BCopies the passed bean into the current bean.<B extends BaseBean>
BCopies the passed bean into the current bean.<B extends BaseBean>
BCopies the passed bean into the current bean.Copies the passed F bean into the current bean.Copies the passed F bean into the current bean.<B extends BaseBean>
B[ENABLE_FILTER]
Copies the passed values with key-value map into the current bean.<B extends BaseBean>
B[ENABLE_FILTER]
Copies the passed values with key-value map into the current bean.<B extends BaseBean>
BBaseRow.copy(B bean) <B extends BaseBean>
BBaseRow.copy(B bean, int... fieldList) <B extends BaseBean>
B<B extends BaseBean>
B<B extends BaseBean>
B<B extends BaseBean>
B<B extends BaseBean>
B<B extends BaseBean>
BBaseBean.copyIfNonEqual()Read record (old record) from the database based on the primary key, copy all fields of the current object that are be modified and different from the old record, and return the updated old record.
Note: This method can only be used on (local) server side<B extends BaseBean>
BBaseRow.copyIfNonEqual()<B extends BaseBean>
BBaseBean.copyNoFilter(Map values) [DISABLE_FILTER]
Copies the passed values with key-value map into the current bean.<B extends BaseBean>
BBaseBean.copyNoFilter(Map values, com.google.common.base.Function keyTransformer, boolean ignoreUnmap) [DISABLE_FILTER]
Copies the passed values with key-value map into the current bean.<B extends BaseBean>
BBaseRow.copyNoFilter(Map values) <B extends BaseBean>
BBaseRow.copyNoFilter(Map values, com.google.common.base.Function keyTransformer, boolean ignoreUnmap) <B extends BaseBean>
BRowMetaData.createBean()create a new instance ofRowMetaData.beanType<M extends TableManager<? extends BaseBean>>
MRowMetaData.getManager()<M extends TableManager<? extends BaseBean>>
MRowMetaData.getManagerUnchecked()static <T extends BaseBean>
booleanSql2javaSupport.hasNullPk(T bean) <M extends TableManager<? extends BaseBean>>
MTableManagerProvider.instanceOf(Class<M> interfaceClass) 根据表记录类型返回数据库操作实例
优先返回支持缓存的数据库操作实例(cache)<B extends BaseBean>
BBaseRow.loadByPk()try retrieving the corresponding record based on the primary key(has no null) and return it.<B extends BaseBean>
BBaseRow.loadSaved()IfisNew()isfalse, try retrieving the corresponding record based on the primary key and return it.<B extends BaseBean>
TableManager<B>根据表记录类型返回数据库操作实例
优先返回支持缓存的数据库操作实例<B extends BaseBean>
TableManager<B>根据表名返回数据库操作实例
优先返回支持缓存的数据库操作实例(cache)返回BaseBean的gu.sql2java中的方法修饰符和类型方法说明BaseBean.clone()B[]TableManager.loadAll()Loads all the rows from table.B[]TableManager.loadAll(int startRow, int numRows) Loads the given number of rows from table, given the start row.B[]TableManager.loadByWhere(String where) Retrieves an array of B given a sql 'where' clause.B[]TableManager.loadByWhere(String where, int[] fieldList) Retrieves an array of B bean given a sql where clause, and a list of fields.B[]TableManager.loadByWhere(String where, int[] fieldList, int startRow, int numRows) Retrieves an array of B bean given a sql where clause and a list of fields, and startRow and numRows.B[]TableManager.loadUsingTemplate(B bean) Loads an array of B from a template one.B[]TableManager.loadUsingTemplate(B bean, int startRow, int numRows) Loads an array of B bean from a template one, given the start row and number of rows.B[]TableManager.loadUsingTemplate(B bean, int startRow, int numRows, int searchType) Loads a list of B bean from a template one, given the start row and number of rows.B[]Saves an array of B bean into the database.B[]TableManager.saveAsTransaction(B[] beans) Saves an array of B bean into the database as transaction.返回变量类型为BaseBean的类型的gu.sql2java中的方法修饰符和类型方法说明SqlRunner.runSqlAsList(String sql, Object... argList) Load all the elements using a SQL statement specifying a list of fields to be retrieved.Load all the elements using a SQL statement specifying a list of fields to be retrieved.参数类型为BaseBean的gu.sql2java中的方法修饰符和类型方法说明intDelete beans.B[]Saves an array of B bean into the database.B[]TableManager.saveAsTransaction(B[] beans) Saves an array of B bean into the database as transaction.类型变量类型为BaseBean的gu.sql2java中的构造器参数限定符构造器说明protectedRowMetaData(String tablename, String tableType, Class<? extends BaseBean> beanType, String coreClass, Class<? extends TableManager<?>> managerInterfaceClass, String alias, List<String> columnNames, List<String> columnTypeNames, List<String> columnJavaNames, List<String> getters, List<String> setters, Class<?>[] columnTypes, int[] columnSizes, int[] sqlTypes, List<String> primaryKeyNames, Map<String, String> junctionTablePkMap, Class<?> lockColumnType, String lockColumnName, List<String> foreignKeys, List<String> importedFknames, List<String> indices, String autoincrement) protectedRowMetaData(String tablename, String tableType, Class<? extends BaseBean> beanType, String coreClass, Class<? extends TableManager<?>> managerInterfaceClass, List<String> columnNames, List<String> columnJavaNames, List<String> getters, List<String> setters, Class<?>[] columnTypes, int[] columnSizes, int[] sqlTypes, List<String> primaryKeyNames, Map<String, String> junctionTablePkMap, Class<?> lockColumnType, String lockColumnName, List<String> foreignKeys, List<String> indices, String autoincrement) compatibility for previous version -
gu.sql2java.config中BaseBean的使用
返回变量类型为BaseBean的类型的gu.sql2java.config中的方法 -
gu.sql2java.json中BaseBean的使用
返回BaseBean的gu.sql2java.json中的方法修饰符和类型方法说明JacksonDeserializer.doDeserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) 类型变量类型为BaseBean的gu.sql2java.json中的构造器参数限定符构造器说明FastjsonDeserializer(com.alibaba.fastjson.parser.ParserConfig config, Class<? extends BaseBean> beanClass) FastjsonDeserializer(Class<? extends BaseBean> beanClass) FastjsonSerializer(Class<? extends BaseBean> beanType) JacksonDeserializer(Class<? extends BaseBean> beanClass) JacksonSerializer(Class<? extends BaseBean> beanClass)