# MyBatis Generator新增功能
## Version 1.3.3
### 公告
* MyBatis Generator 需要 JRE 1.6 或更高版本的支持
### 改进
* 从 MyBatis 3.2 开始使用了新的 SQL 生成器类。 如果您必须在 MyBatis 旧版本上运行,在您的 < JavaClientGenerator > 配置上设置属性"useLegacyBuilder"为"true"。
* Issue #11 - maven插件现在会输出到maven日志 (thanks to Paul Krause)
* Issue #4 - 如果任何列将解析为一个 Java 保留字,生成器现在会抛出一个警告
### Bugs 修复
* Fixed issue #648 - Missing imports when using constructor based models
* Issues #10 - EqualsHashCodePlugin now uses the java.util.Arrays methods for array attributes.
## Version 1.3.2
### Bugs 修复
* Add comments to generated constructors in the model classes so they can be merged.
* Support package names with Uppercase elements.
* Fixed issue #288 - Incorrect annotated countByExample method
* Fixed the Maven plugin so <properties> files can be found in the project classpath.
* Fixed issue #359 - make JdbcTypeInformation public
* Fixed Context.toXmlElement() method to include missing attributes
* Fixed CaseInsensitiveLikePlugin to add new methods to GeneratedCriteria inner class
* Issue #412 - update the documentation to reflect the difference in MyBatis3 regarding generated keys.
* Issue #440 - incorrect code generated for primitives with type handlers
* Issue #439 - use auto boxing for primitives when appropriate
* Issue #438 - keep primary key properties in database sequence
* Issue #507 - RowBounds plugin generates duplicate statements
* Issue #593 - CaseInsensitiveLikePlugin skipped Jdbc4 National Character Types
### 改进
* Added a new target runtime - MyBatis3Simple - that can be used to generate very simple CRUD operations on tables. This runtime produces far simpler MyBatis code than the normal MyBatis3 runtime. The produced code also has lower functionality that the normal MyBatis3 runtime. If you do not regularly use the "by example" methods, then the code produced by the MyBatis3Siple runtime may be more suitable to your project.
* Added a new plugin - VirtualPrimaryKey plugin - that can be used to specify columns that act as a primary key, even if they are not defined as primary keys in the database.
* Issue #328 - Added a new plugin - RowBounds plugin - that will generate an additional version of `selectByExample` that supports the MyBatis RowBounds function.
* Created a new reference page for supplied plugins: [Supplied Plugins](reference/plugins.html)
* Issue #368 - Allowed for generation of Java Model only. If no SQLMapGenerator or JavaClientGenerator is specified in a context, then only a Java Model is generated. Also, if property "modelOnly" is set to "true" on a <table> element, then only model object and, possibly XML result maps, will be generated.
* Issue #374 - Allow for specification of a file encoding for reading/writing Java files on the file system. There is a new property "javaFileEncoding" on the <context> element that can be used to specify a Java file encoding. (XML files are always read/written in UTF-8 per the spec).
* Added the ability to specify custom code formatters for generated Java and XML files. See new properties on the <context> element for more information.
* Added support for varargs to `org.mybatis.generator.api.dom.java.Parameter` class
* Added support for `synchronized` and `native` to `org.mybatis.generator.api.dom.java.Method` class
* Added support for `transient` and `volatile` to `org.mybatis.generator.api.dom.java.Field` class
* Issue #375 - Added a new plugin - ToStringPlugin - that will generate a toString() method in the model classes. Thanks Alexei and Iwao!
* Issue #233 - added GWT capability to the Serializable plugin
* Issue #564 - support subpackages at the table level
* Issue #590 - new plugin for <cache>. Thanks Jason Bennett!
## Version 1.3.1
### Bugs 修复
* Always specify <selectKey> order for MyBatis3 - position within the <insert> is not relevant.
* "rootInterface" was ignored for XMLMAPPER clients
* Fixed bug when a lower case class name is specified as a domain object name
* Fixed issue #174 - incorrect format of order by clause in selectByExampleWithBlobs
### 改进
* Added a new MyBatis3 generator that generates code based solely on annotations with no generated XML. Configuration settings for this new generator are as follows:
* The `targetRuntime` attribute of [<context>](configreference/context.html) element is **MyBatis3**
* The `type` attribute of [<javaClientGenerator>](configreference/javaClientGenerator.html) element is **ANNOTATEDMAPPER**
* Added a new MyBatis3 generator that generates code based on a mix of annotations and generated XML. Configuration settings for this new generator are as follows:
* The `targetRuntime` attribute of [<context>](configreference/context.html) element is **MyBatis3**
* The `type` attribute of [<javaClientGenerator>](configreference/javaClientGenerator.html) element is **MIXEDMAPPER**
* Add support for JDBC types NCHAR, NCLOB, NVARCHAR to match MyBatis3.
* Added support for "useGeneratedKeys" in MyBatis3\. See [<generatedKey>](configreference/generatedKey.html) for details.
* Added support for immutable objects and constructor based result maps in MyBatis3\. See [<table>](configreference/table.html) and/or [<javaModelGenerator>](configreference/javaModelGenerator.html) for details.
* Added support for initialization blocks in the Java DOM
* Issue #214 - Added the ability to supress all comments in generated code. See [<commentGenerator>](configreference/commentGenerator.html) for details.
## Version 1.3.0
1. Moved to mybatis.org, renamed MyBatis Generator
2. MyBatis generator will continue to support XML configuration files from Ibator. However, any new features will only be implemented in MyBatis formatted configuration files. Some minimal changes are required to migrate Ibator formatted configuration files to the new DTD for MyBatis Generator.
3. Configuration settings for MyBatis 3 are as follows:
1. The `targetRuntime` attribute of [<context>](configreference/context.html) element must be changed to **MyBatis3**
2. The `type` attribute of [<javaClientGenerator>](configreference/javaClientGenerator.html) element must be changed to **XMLMAPPER**
4. Removed support for `suppressTypeWarnings` property in the `<context>` element. This confusing property has become unmanagable due to confusion between @SuppressWarnings("unchecked") and @SuppressWarnings("rawtypes") in the different compilers. This was only used in the corner case where code generated with Ibatis2Java2 targetRuntime was to be compiled with a JSE 5.0 compiler.
## Version 1.2.2 (Never Released)
### Announcements
* The `org.apache.ibatis.ibator.api.CommentGenerator` interface has changed. Classes that implement this interface **must be changed**. With this change, implementing classes have access to many more data elements from which to generate comments. Additionally, this change makes the comment generator interface more consistent with the other public Ibator interfaces. Details of the change follow:
* Methods which accepted the parameter `FullyQualifiedTable` now accept the parameter `IntrospectedTable` instead. The `FullyQualifiedTable` instance is available through the method `IntrospectedTable.getFullyQualifiedTable()`.
* Methods which accepted the `String` parameter `columnName` now accept the parameter `IntrospectedColumn` instead. The column name is available through the method `IntrospectedColumn.getActualColumnName()`.
**重要提示:** any implementation that subclasses the Ibator supplied class `DefaultCommentGenerator` does not need to change immediately with this release. The old methods have been deprecated and will be removed with the next release of Ibator - so subclasses should be reworked as soon as convenient.
* The SQL Map generator has changed in that it no longer prepends the string "ibatorgenerated_" to every generated XML id. If you were relying on these generated names in other code, you can force Ibator to prepend the string with the property `useLegacyXMLIds` on the [<SqlMapGenerator>](configreference/sqlMapGenerator.html) configuration.
* Ibator is now built with Maven and includes a Maven plugin
### Bugs 修复
* NPE when no DAOs are generated.
* IBATIS-579 - Don't allow column names that contain spaces to break across lines in generated XML.
* Fixed NPE and incorrect calculation in generated equals method (from EqualsHashCodePlugin) when certain fields are null - thanks to Benjamin Klatt for finding this bug.
* IBATIS-601 - improper validation of <generatedKey>
* IBATIS-609 - incorrect parsing of Java generic types
* Fixed spelling error LONCVARCHAR to LONGVARCHAR (thanks Allard)
* Fixed IBATIS-731 - change name of primary key variable to avoid conflicts
* Fixed IBATIS-699 - Overwrite unmergeable XML files if enabled
* Fixed issue where insertSelective failed if there is a sequence generating the primary key (issue only with iBATIS3)
### 改进
* IBATIS-569 - Modified the IbatorRules implementation to make it easier for plugins to provide custom implementations of IbatorRules. See the Javadoc for the new class `org.apache.ibatis.ibator.internal.rules.IbatorRulesDelegate` for more information.
* IBATIS-571 - Added support for automatically delimiting SQL keywords if they are used as column names in tables. See the [<ibatorContext>](configreference/ibatorContext.html) page for more information.
* IBATIS-577 - Define SQL fragments for column lists to improve reusability of generated code. Thanks to Iwao AVE! for the idea and the initial patch.
* Added new `-verbose` command line argument. See the [Running Ibator](running.html) page for more information.
* Added logging statements for use in debug. See the [Logging](reference/logging.html) page for more information.
* Added new example plugin to demonstrate adding case insensitive LIKE support to generated Example classes. See the [<ibatorPlugin>](configreference/ibatorPlugin.html) page for more information.
* Added "delimitAllColumns" attribute to table configurations. This supports databases like PosgreSQL that are case sensitive for identifiers. See the [<table>](configreference/table.html) page for more information.
* Added a page explaining how to deal with case sensitivity in PostgreSQL. See the [PostgreSQL](usage/postgresql.html) page for more information.
* IBATIS-586 - Added the ability to specify nested property elements on columnOverrides. See the [<columnOverride>](configreference/columnOverride.html) page for more information. Thanks to Dan Turkenkopf for the idea and a nice initial patch.
* The IntrospectedColumn class now contains any column remarks returned during database introspection. This may be useful for some CommentGenerators.
* IBATIS-592 - Added attributes to IntrospectedTable that contain the calculated SqlMap namespace, and the calculated runtime table names. These can now be overridden in plugins.
* Fixed addCriterionfor JDBC* methods so that they all do a null check.
* Fixed IbatorRunner so that configuration errors are shown (thanks to Karel Rank)
* IBATIS-605 - Added Informix Dialect for [<generatedKey>](configreference/generatedKey.html)
* Addedd support for "distinct" on select by example methods
* Added new "or" method to example classes
* Added new "useCompoundPropertyNames" property on <table>
* Enabled a far simpler method for extending the example classes
* EqualsHashCodePlugin now generates far superior methods
## Version 1.2.1
### Bugs 修复
* Fixed the IbatorObjectFactory so it will find internal classes from the context classloader.
* Fixed IBATIS-565 - ill formed comment in the SqlMapConfigPlugin
### 改进
* Modified plugin methods for model fields, getters, and setters so that the plugin will know which type of class (Primary Key, Base Record, or Record with BLOBs) is being generated.
* Added methods to IntrospectedTable to get/set attributes. This allows plugin classes to maintain table based state between plugin calls.
* Added `initialized` method to the plugin API. This allows plugins to alter some of the fundamental code generation items (like the name of a generated class, for example).
* Added an example plugin to show usage of the `initialized` method.
## Version 1.2.0
### Announcements
* With version 1.2, Abator is renamed to Apache iBATIS Ibator. Several changes have been made to the XML configuration as well as the Java API. See the [Migrating from Abator](migratingFromAbator.html) page for detailed information about changes needed to existing Abator configuration files.
### Bugs 修复
* Fixed the JavaTypeResolver so that columns with unsupported data types may be overridden by configuration.
* Fixed IBATIS-523 - a bug in the pre-release version of the EqualsHashCodePlugin
* Fixed IBATIS-542 - upgrade the build to Ant version 1.7.1
### 改进
* Ibator now includes a plugin mechanism. This mechanism can be used to add to or modify the code generated by Ibator. If you have previously extended one of Abator's code generators to change their behavior, we strongly suggest that you move to a plugin. See the [<ibatorPlugin>](configreference/ibatorPlugin.html) page for detailed information.
* Ibator ships with the following plugins:
* A plugin that will generate an SQL Map Config File (`org.apache.ibatis.ibator.plugins.SqlMapConfigPlugin`)
* A plugin that will make generated model classes Serializable (`org.apache.ibatis.ibator.plugins.SerializablePlugin`)
* A plugin that will add `equals` and `hashCode` methods to generated model classes (`org.apache.ibatis.ibator.plugins.EqualsHashCodePlugin`)
* Added support for "runtimeCatalog" and "runtimeSchema" properties to the [<table>](configreference/table.html) configuration element. Thanks to Dan Turkenkopf for the idea and the patch!
* New generated method - insertSelective. This method will allow you to use column defaults on a table definition on insert
* Added the ability to specify a that DAO implementation classes be in a separate package from the DAO interface classes.
### Changes from Abator
There are several breaking changes between Ibator and Abator. This list details the changes, and has methods of resolving the differences.
* JSE 5.0 or higher is required for Ibator
* Ibator does not contain the "legacy" code generators from Abator. You must choose "Ibatis2Java2" or "Ibatis2Java5" as a target runtime - and code generated from Ibator is compatible with iBATIS version 2.2.0 or higher only. If you are using an earlier version of iBATIS - upgrade! If you are not able to upgrade, then you must continue to use Abator.
* The classloading strategy in Ibator is changed from Abator. In all cases, we now recommend specifying the classpath external to Ibator and we further recommend that you do not use the `<classPathEntry>` element. You may specify classpath entries if you feel you must, but those entries will only be used when loading JDBC drivers of Java model root classes. If you write a custom extension to Ibator, or a plugin, you must specify that classpath entry external to Ibator.
* The API for extending Ibator is significantly changed from Abator. In most cases, implementations of the old Abator interfaces should be converted to Ibator plugins. See the [Extending Ibator](reference/extending.html) for more information.
* The `afterXXXGenerationHook` methods have been removed from all Ibator supplied implementations of the core interfaces. If you were extending an Ibator supplied implementation to make use of these methods, then you _must_ migrate your code to an Ibator plugin.
* The build has been significantly modified and now includes an Emma based code coverage report.
* Changes to the XML configuration file are required. See the [Migrating from Abator](migratingFromAbator.html) page for detailed information
## Version 1.1.0
### Announcements
* The next release of Abator will require JRE 5.0 or higher.
* Java2 is now the default generator set. This will cause different code to be generated if you have not specified a generator set previously. To remedy this, set the generator set to "Legacy".
### New Generated Methods
Abator will generate these new methods:
**countByExample**
This method will return an integer representing the number of rows in a table that match the given criteria.
**updateByExample**
This method will update all rows in a table that match a given criteria. This method is available in the Java2 and Java5 generator sets only. There is also a "selective" version of the method that only updates certain columns of a table (the selective version of this method is probably the more useful version to use in most situations).
### Bugs 修复
* Fixed bug for corner case where a criteria class is created, but no criteria are set.
* Fixed a bug that caused the JavaModelGenerator's "trimStrings" property to fail
* Fixed the XML file merger so that internal entities are preserved
* Fixed the XML configuration parser so that external entities are handled properly
* Fixed bug - incorrect datatype mapping for JDBC BIT datatype
* Fixed bug where Abator generated incorrect properties for certain database columns (for example, if the column name is I_NAME)
### Miscellaneous Changes
* Added the ability to specify properties to ignore qualifiers and change runtime table names in the generated SQL for a table. Primary use cases for this support include:
* Generating objects for a table that has a public synonym or alias
* Generating objects for a table that exists in many schemas, and the schema will be selected at runtimeSee the [<table>](configreference/table.html) reference page for more information, or the [Oracle](usage/oracle.html) reference page for an example.
* Added support for delimiting SQL identifiers for the use cases where identifiers contain spaces or SQL reserved words. See the [<table>](configreference/table.html), [<abatorContext>](configreference/abatorContext.html), and [<columnOverride>](configreference/columnOverride.html) reference pages for more information.
* Added SYBASE dialect for generated keys. See the [<generatedKey>](configreference/generatedKey.html) reference page for more information.
* Added DB2_MF (DB2 on Main Frames) dialect for generated keys. See the [<generatedKey>](configreference/generatedKey.html) reference page for more information.
* Abator will now automatically escape identifiers that contain the $ or # characters as these characters have special meaning in iBATIS configuration files.
* Added a `clear` method to the generated example classes (in the Java2 and Java5 generator sets only). This allows reuse of these classes.
* Added the ability to specify that result maps should use column indexes rather than column names in the result mappings. Primary use cases for this support include:
* When tables have columns whose name is only differentiated by case (e.g. "first name" and "First Name")
* When you want to make the selects as fast as possible (there is a slight performance benefit when using column indexes)See the [<table>](configreference/table.html) reference page for more information.
* Made the generated Example and Criteria classes extendable. Added some documentation about how to extend these classes. See the [Extending the Example Classes](generatedobjects/extendingExampleClass.html) reference page for more information.
* Made the legacy DAOs extendable.
* Added the ability to provide a renaming rule for columns. This is for the use case where columns have a common prefix that should be removed before calculating the property name. See the [<columnRenamingRule>](configreference/columnRenamingRule.html) reference page for more information.
* Added support for persisting a configuration to XML - this to enable a graphical editor in the future.
* Add afterXXXGenerationHook() methods in all generators to enable adding extra Java code or XML elements to any generated object. This will make it easier to create customized generators.
* API change to allow generating with selected contexts rather than the entire config file.
* API change to allow generating with selected tables rather than the entire config file.
* Exposed new support for selecting tables and/or contexts to the command line and the Ant task - this has added an advanced syntax to the command line for Abator. See the [Running Abator](running.html) reference page for more information.
* `rootClass` and `rootInterface` may now be specified for each table. See the [<table>](configreference/table.html) reference page for more information.
* If a `rootClass` is specified for any table, Abator will now check in the rootClass to see if a generated property already exists in the root class. If it does, Abator will not generate the property. The <javaModelGenerator> element now accepts a property to specify the classpath of the `rootClass`. See the [<javaModelGenerator>](configreference/javaModelGenerator.html) reference page for more information. Thanks to Ashok Madhavan for the beginnings of this code.
* Allowed specifying a type (pre or post) for the generated key element. See the [<generatedKey>](configreference/generatedKey.html) reference page for more information.
* Added a comment generator interface to enable generation of custom comments. See the [<commentGenerator>](configreference/commentGenerator.html) reference page for more information.
## Version 1.0.0
### Generator Sets
A generator set is a set of code generators (SQL Map Generator, Java Model Generator, DAO Generator, and Java Type Resolver). Abator now ships three different generator sets. The generated code from these three generator sets is slightly different, and the use of the generated objects is slightly different too. The concepts are exactly the same. With the newer generator sets, the "by example" methods have been vastly improved. It is now possible to generate **virtually any** WHERE clause (including IN and BETWEEN predicates). Lastly, the new generator sets generate much more concise code - the DAOs and SQL Maps are of normal size, and there are no extraneous methods. The example class in the new generator sets encapsulates all the function needed to generate dynamic queries.
The three generator sets shipped with Abator are as follows:
Legacy
This generator set generates code that is the same as previous versions of Abator. There are some limitations with this generator set and we strongly recommend that you choose one of the other sets. However, this set remains the default for now. **This generator set will likely be removed in a future version of Abator.**
Java2
This generator set generates code that is compatible with iBATIS versions 2.2.0 and higher. With this generator set the "by example" methods are much more powerful than in the legacy set. It is now possible to generate virtually unlimited SQL WHERE clauses with Abator generated code (including "IN" and "BETWEEN" clauses). **This generator set will likely become the default set in a future version of Abator.**
Java5
This generator set has the same capabilities as the Java2 generator set with the added feature of generating code that is JSE 5.0 compliant using parameterized types and annotations.
**重要:** code generated with the Java2 or Java5 generator sets is not 100% compatible with code generated with the Legacy set - especially in the use of the "by example" methods. Also note that the "by example" methods in these generator sets rely on iBATIS dynamic SQL support that is missing in iBATIS versions prior to version 2.2.0.
A generator set is selected with the `generatorSet` attribute of the `<abatorContext>` element. See the [<abatorContext>](configreference/abatorContext.html) reference page for more information.
Use of the example classes is different with the different generator sets. See the [Example Class Usage](generatedobjects/exampleClassUsage.html) page for more information.
### Model Types
A model type is used to give you more control over the types of domain objects generated by Abator. Abator now supports three different types of domain models as follows:
conditional
This model is similar to the hierarchical model except that a separate class will not be generated if that separate class would only contain one field. So if a table has only one primary key field, that field will be merged into the base record class. This model type is the default. **Note that this model type may generate classes that are not 100% with classes generated in previous versions of Abator.**
flat
This model generates only one domain class for any table. The class will hold all fields in the table.
hierarchical
This model is the same as the model shipped with the initial versions of Abator. This model will generate a primary key class if the table has a primary key, another class that holds any BLOB columns in the table, and another class that holds the remaining fields. There is an appropriate inheritance relationship between the classes.
Model types can be specified as a default for an entire context, and you may override the default for each table in a context. See the [<abatorContext>](configreference/abatorContext.html) reference page for more information about setting the context default.. See the [<table>](configreference/table.html) reference page for more information about setting a model type for specific tables.
**重要:** the default value is conditional - this is a non-backward compatible change from previous versions of Abator.
### updateByPrimaryKeySelective
This is a new mapped SQL statement, and new DAO method, that will only update columns whose corresponding properties in the parameter class are non-null. This can be used to update certain columns in a record without needing to update the entire record.
**重要:** any column that is mapped to a primitive type will always be updated.
### Miscellaneous Changes
* Added the ability to specify a table alias. This aids in reuse of generated SQL map elements. See the [<table>](configreference/table.html) reference page for more information.
* Fixed the XML file merger so that extraneous blank lines at the end of the file are removed.
* Added the ability to specify a type handler for table columns. See the [<columnOverride>](configreference/columnOverride.html) reference page for more information.
* Added the ability to specify the visibility of the DAO "by example" methods. This allows you to make the methods private for internal use only. See the [<javaClientGenerator>](configreference/javaClientGenerator.html) reference page for more information.
* Added the ability to override the naming convention for DAO method names. See the [<javaClientGenerator>](configreference/javaClientGenerator.html) reference page for more information.
* Added the ability to specify wildcards for schema or tableName in a table configuration. This will allow generation of many tables with a simple XML configuration. See the [<table>](configreference/table.html) reference page for more information.
* Added the ability to escape wildcard characters in schema or table names if required by the driver. See the [<table>](configreference/table.html) reference page for more information.
* Added the ability to suppress JSE 5.0 type warning messages for non-parameterized types if you are using the Legacy or Java2 generator sets in a JSE 5.0 environment. See the [<abatorContext>](configreference/abatorContext.html) reference page for more information.
* Added the ability to specify an external properties file for passing parameters into an Abator configuration file (like the iBATIS properties file). See the [<properties>](configreference/properties.html) reference page for more information.
* The Ant task now supports a "verbose" attribute. See the [Running Abator](running.html) page for more information.
* The Ant task now supports a nested property set for passing values into an Abator configuration file. See the [Running Abator](running.html) page for more information.
- Spring 中文文档 3.1
- 第一部分 Spring framework 概述
- 第 1 章 Spring Framework 介绍
- 1.1 依赖注入和控制反转
- 1.2 模块
- 1.3 使用方案
- 第二部分 Spring 3 的新特性
- 第 2 章 Spring 3.0 的新特性和增强
- 2.1 Java 5
- 2.2 改进的文档
- 2.3 新的文章和教程
- 2.4 新的模块组织方式和系统构建方式
- 2.5 新特性概述
- 第 3 章 Spring 3.1 的新特性和增强
- 3.1 新特性概述
- 第三部分 核心技术
- 第 4 章 IoC 容器
- 4.1 Spring IoC 容器和 bean 的介绍
- 4.2 容器概述
- 4.3 Bean 概述
- 4.4 依赖
- 4.5 Bean 的范围
- 4.6 自定义 bean 的性质
- 4.7 Bean 定义的继承
- 4.8 容器扩展点
- 4.9 基于注解的容器配置
- 4.10 类路径扫描和管理的组件
- 4.11 使用 JSR 330 标准注解
- 4.12 基于 Java 的容器配置
- Hibernate 中文文档 3.2
- 前言
- 1. 翻译说明
- 2. 版权声明
- 第 1 章 Hibernate入门
- 1.1. 前言
- 1.2. 第一部分 - 第一个Hibernate应用程序
- 1.2.1. 第一个class
- 1.2.2. 映射文件
- 1.2.3. Hibernate配置
- 1.2.4. 用Ant构建
- 1.2.5. 启动和辅助类
- 1.2.6. 加载并存储对象
- 1.3. 第二部分 - 关联映射
- 1.3.1. 映射Person类
- 1.3.2. 单向Set-based的关联
- 1.3.3. 使关联工作
- 1.3.4. 值类型的集合
- 1.3.5. 双向关联
- 1.3.6. 使双向连起来
- 1.4. 第三部分 - EventManager web应用程序
- 1.4.1. 编写基本的servlet
- 1.4.2. 处理与渲染
- 1.4.3. 部署与测试
- 1.5. 总结
- 第 2 章 体系结构(Architecture)
- 2.1. 概况(Overview)
- 2.2. 实例状态
- 2.3. JMX整合
- 2.4. 对JCA的支持
- 2.5. 上下文相关的(Contextual)Session
- 第 3 章 配置
- 3.1. 可编程的配置方式
- 3.2. 获得SessionFactory
- 3.3. JDBC连接
- 3.4. 可选的配置属性
- 3.4.1. SQL方言
- 3.4.2. 外连接抓取(Outer Join Fetching)
- 3.4.3. 二进制流 (Binary Streams)
- 3.4.4. 二级缓存与查询缓存
- 3.4.5. 查询语言中的替换
- 3.4.6. Hibernate的统计(statistics)机制
- 3.5. 日志
- 3.6. 实现NamingStrategy
- 3.7. XML配置文件
- 3.8. J2EE应用程序服务器的集成
- 3.8.1. 事务策略配置
- 3.8.2. JNDI绑定的SessionFactory
- 3.8.3. 在JTA环境下使用Current Session context (当前session上下文)管理
- 3.8.4. JMX部署
- 第 4 章 持久化类(Persistent Classes)
- 4.1. 一个简单的POJO例子
- 4.1.1. 实现一个默认的(即无参数的)构造方法(constructor)
- 4.1.2. 提供一个标识属性(identifier property)(可选)
- 4.1.3. 使用非final的类 (可选)
- 4.1.4. 为持久化字段声明访问器(accessors)和是否可变的标志(mutators)(可选)
- 4.2. 实现继承(Inheritance)
- 4.3. 实现equals()和hashCode()
- 4.4. 动态模型(Dynamic models)
- 4.5. 元组片断映射(Tuplizers)
- 第 5 章 对象/关系数据库映射基础(Basic O/R Mapping)
- 5.1. 映射定义(Mapping declaration)
- 5.1.1. Doctype
- 5.1.1.1. EntityResolver
- 5.1.2. hibernate-mapping
- 5.1.3. class
- 5.1.4. id
- 5.1.4.1. Generator
- 5.1.4.2. 高/低位算法(Hi/Lo Algorithm)
- 5.1.4.3. UUID算法(UUID Algorithm )
- 5.1.4.4. 标识字段和序列(Identity columns and Sequences)
- 5.1.4.5. 程序分配的标识符(Assigned Identifiers)
- 5.1.4.6. 触发器实现的主键生成器(Primary keys assigned by triggers)
- 5.1.5. composite-id
- 5.1.6. 鉴别器(discriminator)
- 5.1.7. 版本(version)(可选)
- 5.1.8. timestamp (可选)
- 5.1.9. property
- 5.1.10. 多对一(many-to-one)
- 5.1.11. 一对一
- 5.1.12. 自然ID(natural-id)
- 5.1.13. 组件(component), 动态组件(dynamic-component)
- 5.1.14. properties
- 5.1.15. 子类(subclass)
- 5.1.16. 连接的子类(joined-subclass)
- 5.1.17. 联合子类(union-subclass)
- 5.1.18. 连接(join)
- 5.1.19. 键(key)
- 5.1.20. 字段和规则元素(column and formula elements)
- 5.1.21. 引用(import)
- 5.1.22. any
- 5.2. Hibernate 的类型
- 5.2.1. 实体(Entities)和值(values)
- 5.2.2. 基本值类型
- 5.2.3. 自定义值类型
- 5.3. 多次映射同一个类
- 5.4. SQL中引号包围的标识符
- 5.5. 其他元数据(Metadata)
- 5.5.1. 使用 XDoclet 标记
- 5.5.2. 使用 JDK 5.0 的注解(Annotation)
- 5.6. 数据库生成属性(Generated Properties)
- 5.7. 辅助数据库对象(Auxiliary Database Objects)
- 第 6 章 集合类(Collections)映射
- 6.1. 持久化集合类(Persistent collections)
- 6.2. 集合映射( Collection mappings )
- 6.2.1. 集合外键(Collection foreign keys)
- 6.2.2. 集合元素(Collection elements)
- 6.2.3. 索引集合类(Indexed collections)
- 6.2.4. 值集合于多对多关联(Collections of values and many-to-many associations)
- 6.2.5. 一对多关联(One-to-many Associations)
- 6.3. 高级集合映射(Advanced collection mappings)
- 6.3.1. 有序集合(Sorted collections)
- 6.3.2. 双向关联(Bidirectional associations)
- 6.3.3. 双向关联,涉及有序集合类
- 6.3.4. 三重关联(Ternary associations)
- 6.3.5. 使用&amp;lt;idbag&amp;gt;
- 6.4. 集合例子(Collection example)
- 第 7 章 关联关系映射
- 7.1. 介绍
- 7.2. 单向关联(Unidirectional associations)
- 7.2.1. 多对一(many to one)
- 7.2.2. 一对一(one to one)
- 7.2.3. 一对多(one to many)
- 7.3. 使用连接表的单向关联(Unidirectional associations with join tables)
- 7.3.1. 一对多(one to many)
- 7.3.2. 多对一(many to one)
- 7.3.3. 一对一(one to one)
- 7.3.4. 多对多(many to many)
- 7.4. 双向关联(Bidirectional associations)
- 7.4.1. 一对多(one to many) / 多对一(many to one)
- 7.4.2. 一对一(one to one)
- 7.5. 使用连接表的双向关联(Bidirectional associations with join tables)
- 7.5.1. 一对多(one to many) /多对一( many to one)
- 7.5.2. 一对一(one to one)
- 7.5.3. 多对多(many to many)
- 7.6. 更复杂的关联映射
- 第 8 章 组件(Component)映射
- 8.1. 依赖对象(Dependent objects)
- 8.2. 在集合中出现的依赖对象 (Collections of dependent objects)
- 8.3. 组件作为Map的索引(Components as Map indices )
- 8.4. 组件作为联合标识符(Components as composite identifiers)
- 8.5. 动态组件 (Dynamic components)
- 第 9 章 继承映射(Inheritance Mappings)
- 9.1. 三种策略
- 9.1.1. 每个类分层结构一张表(Table per class hierarchy)
- 9.1.2. 每个子类一张表(Table per subclass)
- 9.1.3. 每个子类一张表(Table per subclass),使用辨别标志(Discriminator)
- 9.1.4. 混合使用“每个类分层结构一张表”和“每个子类一张表”
- 9.1.5. 每个具体类一张表(Table per concrete class)
- 9.1.6. Table per concrete class, using implicit polymorphism
- 9.1.7. 隐式多态和其他继承映射混合使用
- 9.2. 限制
- 第 10 章 与对象共事
- 10.1. Hibernate对象状态(object states)
- 10.2. 使对象持久化
- 10.3. 装载对象
- 10.4. 查询
- 10.4.1. 执行查询
- 10.4.1.1. 迭代式获取结果(Iterating results)
- 10.4.1.2. 返回元组(tuples)的查询
- 10.4.1.3. 标量(Scalar)结果
- 10.4.1.4. 绑定参数
- 10.4.1.5. 分页
- 10.4.1.6. 可滚动遍历(Scrollable iteration)
- 10.4.1.7. 外置命名查询(Externalizing named queries)
- 10.4.2. 过滤集合
- 10.4.3. 条件查询(Criteria queries)
- 10.4.4. 使用原生SQL的查询
- 10.5. 修改持久对象
- 10.6. 修改脱管(Detached)对象
- 10.7. 自动状态检测
- 10.8. 删除持久对象
- 10.9. 在两个不同数据库间复制对象
- 10.10. Session刷出(flush)
- 10.11. 传播性持久化(transitive persistence)
- 10.12. 使用元数据
- 第 11 章 事务和并发
- 11.1. Session和事务范围(transaction scope)
- 11.1.1. 操作单元(Unit of work)
- 11.1.2. 长对话
- 11.1.3. 关注对象标识(Considering object identity)
- 11.1.4. 常见问题
- 11.2. 数据库事务声明
- 11.2.1. 非托管环境
- 11.2.2. 使用JTA
- 11.2.3. 异常处理
- 11.2.4. 事务超时
- 11.3. 乐观并发控制(Optimistic concurrency control)
- 11.3.1. 应用程序级别的版本检查(Application version checking)
- 11.3.2. 扩展周期的session和自动版本化
- 11.3.3. 脱管对象(deatched object)和自动版本化
- 11.3.4. 定制自动版本化行为
- 11.4. 悲观锁定(Pessimistic Locking)
- 11.5. 连接释放模式(Connection Release Modes)
- 第 12 章 拦截器与事件(Interceptors and events)
- 12.1. 拦截器(Interceptors)
- 12.2. 事件系统(Event system)
- 12.3. Hibernate的声明式安全机制
- 第 13 章 批量处理(Batch processing)
- 13.1. 批量插入(Batch inserts)
- 13.2. 批量更新(Batch updates)
- 13.3. StatelessSession (无状态session)接口
- 13.4. DML(数据操作语言)风格的操作(DML-style operations)
- 第 14 章 HQL: Hibernate查询语言
- 14.1. 大小写敏感性问题
- 14.2. from子句
- 14.3. 关联(Association)与连接(Join)
- 14.4. join 语法的形式
- 14.5. select子句
- 14.6. 聚集函数
- 14.7. 多态查询
- 14.8. where子句
- 14.9. 表达式
- 14.10. order by子句
- 14.11. group by子句
- 14.12. 子查询
- 14.13. HQL示例
- 14.14. 批量的UPDATE和DELETE
- 14.15. 小技巧 & 小窍门
- 第 15 章 条件查询(Criteria Queries)
- 15.1. 创建一个Criteria 实例
- 15.2. 限制结果集内容
- 15.3. 结果集排序
- 15.4. 关联
- 15.5. 动态关联抓取
- 15.6. 查询示例
- 15.7. 投影(Projections)、聚合(aggregation)和分组(grouping)
- 15.8. 离线(detached)查询和子查询
- 15.9. 根据自然标识查询(Queries by natural identifier)
- 第 16 章 Native SQL查询
- 16.1. 使用SQLQuery
- 16.1.1. 标量查询(Scalar queries)
- 16.1.2. 实体查询(Entity queries)
- 16.1.3. 处理关联和集合类(Handling associations and collections)
- 16.1.4. 返回多个实体(Returning multiple entities)
- 16.1.4.1. 别名和属性引用(Alias and property references)
- 16.1.5. 返回非受管实体(Returning non-managed entities)
- 16.1.6. 处理继承(Handling inheritance)
- 16.1.7. 参数(Parameters)
- 16.2. 命名SQL查询
- 16.2.1. 使用return-property来明确地指定字段/别名
- 16.2.2. 使用存储过程来查询
- 16.2.2.1. 使用存储过程的规则和限制
- 16.3. 定制SQL用来create,update和delete
- 16.4. 定制装载SQL
- 第 17 章 过滤数据
- 17.1. Hibernate 过滤器(filters)
- 第 18 章 XML映射
- 18.1. 用XML数据进行工作
- 18.1.1. 指定同时映射XML和类
- 18.1.2. 只定义XML映射
- 18.2. XML映射元数据
- 18.3. 操作XML数据
- 第 19 章 提升性能
- 19.1. 抓取策略(Fetching strategies)
- 19.1.1. 操作延迟加载的关联
- 19.1.2. 调整抓取策略(Tuning fetch strategies)
- 19.1.3. 单端关联代理(Single-ended association proxies)
- 19.1.4. 实例化集合和代理(Initializing collections and proxies)
- 19.1.5. 使用批量抓取(Using batch fetching)
- 19.1.6. 使用子查询抓取(Using subselect fetching)
- 19.1.7. 使用延迟属性抓取(Using lazy property fetching)
- 19.2. 二级缓存(The Second Level Cache)
- 19.2.1. 缓存映射(Cache mappings)
- 19.2.2. 策略:只读缓存(Strategy: read only)
- 19.2.3. 策略:读/写缓存(Strategy: read/write)
- 19.2.4. 策略:非严格读/写缓存(Strategy: nonstrict read/write)
- 19.2.5. 策略:事务缓存(transactional)
- 19.3. 管理缓存(Managing the caches)
- 19.4. 查询缓存(The Query Cache)
- 19.5. 理解集合性能(Understanding Collection performance)
- 19.5.1. 分类(Taxonomy)
- 19.5.2. Lists, maps 和sets用于更新效率最高
- 19.5.3. Bag和list是反向集合类中效率最高的
- 19.5.4. 一次性删除(One shot delete)
- 19.6. 监测性能(Monitoring performance)
- 19.6.1. 监测SessionFactory
- 19.6.2. 数据记录(Metrics)
- 第 20 章 工具箱指南
- 20.1. Schema自动生成(Automatic schema generation)
- 20.1.1. 对schema定制化(Customizing the schema)
- 20.1.2. 运行该工具
- 20.1.3. 属性(Properties)
- 20.1.4. 使用Ant(Using Ant)
- 20.1.5. 对schema的增量更新(Incremental schema updates)
- 20.1.6. 用Ant来增量更新schema(Using Ant for incremental schema updates)
- 20.1.7. Schema 校验
- 20.1.8. 使用Ant进行schema校验
- 第 21 章 示例:父子关系(Parent Child Relationships)
- 21.1. 关于collections需要注意的一点
- 21.2. 双向的一对多关系(Bidirectional one-to-many)
- 21.3. 级联生命周期(Cascading lifecycle)
- 21.4. 级联与未保存值(Cascades and unsaved-value)
- 21.5. 结论
- 第 22 章 示例:Weblog 应用程序
- 22.1. 持久化类
- 22.2. Hibernate 映射
- 22.3. Hibernate 代码
- 第 23 章 示例:复杂映射实例
- 23.1. Employer(雇主)/Employee(雇员)
- 23.2. Author(作家)/Work(作品)
- 23.3. Customer(客户)/Order(订单)/Product(产品)
- 23.4. 杂例
- 23.4.1. "Typed" one-to-one association
- 23.4.2. Composite key example
- 23.4.3. 共有组合键属性的多对多(Many-to-many with shared composite key attribute)
- 23.4.4. Content based discrimination
- 23.4.5. Associations on alternate keys
- 第 24 章 最佳实践(Best Practices)
- HttpClient 教程
- 前言
- 第一章 基础
- 第二章 连接管理
- 第三章 HTTP状态管理
- 第四章 HTTP认证
- 第五章 HTTP客户端服务
- 第六章 高级主题
- Mybatis 中文文档 3.4
- 参考文档
- 简介
- 入门
- XML 映射配置文件
- Mapper XML 文件
- 动态 SQL
- Java API
- SQL语句构建器类
- Logging
- 项目文档
- 项目总体信息
- 访问
- 提醒方法
- 项目依赖
- Dependency Information
- Overview
- 问题跟踪
- 项目授权
- 项目邮件列表
- Project Plugin Management
- Project Build Plugins
- Project Report Plugins
- 团队
- Web访问
- 匿名访问
- 开发者访问
- 通过防火墙访问
- 项目概要
- 生成报表
- MyBatis Generator 用户手册
- MyBatis Generator介绍
- MyBatis Generator新增功能
- MyBatis Generator 快速入门指南
- 运行 MyBatis Generator
- 从命令行运行 MyBatis Generator
- 使用Ant运行 MyBatis Generator
- 通过Maven运行 MyBatis Generator
- 使用Java运行 MyBatis Generator
- 运行 MyBatis Generator 后的任务
- Migrating from Ibator
- Migrating from Abator
- MyBatis Generator XML 配置参考
- &lt;classPathEntry&gt; 元素
- &lt;columnOverride&gt; 元素
- &lt;columnRenamingRule&gt; 元素
- &lt;commentGenerator&gt; 元素
- &lt;context&gt; 元素
- &lt;generatedKey&gt; 元素
- &lt;generatorConfiguration&gt; 元素
- &lt;ignoreColumn&gt; 元素
- &lt;javaClientGenerator&gt; 元素
- The &lt;javaModelGenerator&gt; Element
- The &lt;javaTypeResolver&gt; Element
- &lt;jdbcConnection&gt; 元素
- &lt;plugin&gt; 元素
- &lt;properties&gt; 元素
- &lt;property&gt; 元素
- &lt;sqlMapGenerator&gt; 元素
- &lt;table&gt; 元素
- 使用生成的对象
- JAVA实体对象
- SQL映射文件
- Java客户端对象
- Example类使用说明
- 扩展Example类
- 使用注意事项
- DB2 使用注意事项
- MySql 使用注意事项
- Oracle 使用注意事项
- PostgreSQL 使用注意事项
- 参考资料
- 从源码构建
- 扩展MyBatis Generator
- 开发插件
- 日志信息
- 提供的插件
- 设计理念
- Velocity 中文文档
- 1. 关于
- 2. 什么是Velocity?
- 3. Velocity 可以做什么?
- 3.1. Mud Store 示例
- 4. Velocity模板语言(VTL): 介绍
- 5. Hello Velocity World!
- 6. 注释
- 7. 引用
- 7.1. 变量Variables
- 7.2. 属性
- 7.3. 方法
- 8. 形式引用符Formal Reference Notation
- 9. 安静引用符Quiet Reference Notation
- 11. Case Substitution
- 12. 指令
- 12.1. #set
- 12.2. 字面字符串
- 12.3. 条件
- 12.3.1 If / ElseIf / Else
- 12.3.2 关系和逻辑操作符
- 12.4. 循环
- 12.4.1. Foreach 循环
- 12.5. 包含
- 12.6. 解析
- 12.7. 停止
- 12.10. 宏
- 12.10.1. Velocimacro 参数
- 12.10.2. Velocimacro 属性
- 12.10.3. Velocimacro Trivia
- 13. Getting literal
- 13.1. 货币字符
- 13.2. 转义 有效的 VTL 指令
- 13.3. 转义 无效的 VTL 指令
- 14. VTL 格式化问题
- 15. 其它特征和杂项
- 15.1. 数学特征
- 15.2. 范围操作符
- 15.3. 进阶:转义和!
- 15.4. Velocimacro 杂记
- 15.5. 字符串联
- Google Guava官方教程(中文版)
- 1-基本工具
- 1.1-使用和避免null
- 1.2-前置条件
- 1.3-常见Object方法
- 1.4-排序: Guava强大的”流畅风格比较器”
- 1.5-Throwables:简化异常和错误的传播与检查
- 2-集合
- 2.1-不可变集合
- 2.2-新集合类型
- 2.3-强大的集合工具类:java.util.Collections中未包含的集合工具
- 2.4-集合扩展工具类
- 3-缓存
- 4-函数式编程
- 5-并发
- 5.1-google Guava包的ListenableFuture解析
- 5.2-Google-Guava Concurrent包里的Service框架浅析
- 6-字符串处理:分割,连接,填充
- 7-原生类型
- 8-区间
- 9-I/O
- 10-散列
- 11-事件总线
- 12-数学运算
- 13-反射
- JFreeChart 开发者指南
- 1 简介
- 1.1 什么是JFreeChart
- 1.2 使用文档
- 1.3 感谢
- 1.4 建议
- 2 图表实例
- 2.1 介绍
- 2.2 饼图(Pie Charts)
- 2.3 直方条形图(Bar Charts)
- 2.4 折线图(Line Charts)
- 2.5 XY(散点图)
- 2.6 时序图
- 2.7 柱状图
- 2.8 面积图
- 2.9 差异图
- 2.10 梯形图
- 2.11 甘特图
- 2.12 多轴图
- 2.13 复合/覆盖图
- 2.14 开发远景
- 3 下载和安装JFreeChart 1.0.6
- 3.1 简介
- 3.2 下载
- 3.3 解包
- 3.4 运行演示实例
- 3.5 编译源代码
- 3.6 产生javadoc文档
- 4 使用JFreeChart1.0.6
- 4.1 概述
- 4.2 创建第一个图表
- 5 饼图(Pie Charts)
- 5.1 简介
- 5.2 创建一个简单的饼图(Pie Charts)
- 5.3 片区颜色
- 5.4 片区外廓
- 5.5 空置、零值和负值
- 5.6 片区和图例标签
- 5.7 “取出”某个片区
- 5.8 3D饼图
- 5.9 多饼图
- 5.10 实例讲解
- 6 直方条形图(Bar Charts)
- 6.1 简介
- 6.2 创建一个直方条形图
- 6.3 ChartFactory类
- 6.4 直方条形图的简单定制
- 6.5 定制外观
- 6.6 示例代码解读
- 7 折线图
- 7.1 简介
- 7.2 使用categoryDataset数据集创建折线图
- 7.3 使用XYDataset数据集创建折线图
- 8 时序图
- 8.1 简介
- 8.2 创建时序图
- 9 定制图表(Customising Charts)
- 9.1 简介
- 9.2 图表属性
- 9.3 图区属性
- 9.4 轴属性
- 9.5 心得体会
- 10 动态图(Dynamic Charts)
- 10.1 简介
- 10.2 知识背景
- 10.3 实例应用
- 11 图表工具条(Tooltips)
- 11.1 概述
- 11.2 创建图表工具条
- 11.3 收集图表工具条
- 11.4 显示图表工具条
- 11.5 隐藏图表工具条
- 11.6 定制图表工具条
- 12 图表条目标签(Item Label)
- 12.1 简介
- 12.2 显示条目标签
- 12.3 条目标签外观
- 12.4 条目标签位置
- 12.5 定制条目标签文本
- 12.6 实例1
- 12.7 实例2
- 13 多轴和数据源图表(Multi Axis and Dataset)
- 13.1 简介
- 13.2 实例
- 13.3 建议和技巧
- 14 组合图表(Combined Charts)
- 14.1 简介
- 14.2 组合X种类图区
- 14.3 组合Y种类图区
- 14.4 组合X-XY图区
- 14.5 组合Y-XY图区
- 15 数据源和JDBC(Dataset And JDBC)
- 15.1 简介
- 15.2 关于JDBC
- 15.3 样本数据
- 15.4 PostgreSQL
- 15.5 JDBC驱动
- 15.6 应用演示
- 16 导出图表为PDF格式
- 16.1 简介
- 16.2 什么是Acrobat PDF
- 16.3 IText
- 16.4 Graphics2D
- 16.5 开始导出
- 16.6 实例应用
- 16.7 查看PDF 文件
- 16.8 Unicode字符问题
- 17 导出图表为SVG格式
- 17.1 简介
- 17.2 背景
- 17.3 实例代码
- 18 Applet
- 18.1 简介
- 18.2 问题
- 18.3 实例应用
- 19 Servlets
- 19.1 介绍
- 19.2 编写一个简单的Servlet应用
- 19.3 编译实例Servlet
- 19.4 部署实例Servlet
- 19.5 在HMTL页面种嵌入图表
- 19.6 支持文件
- 19.7 部署Servlets
- 20 JFreeChart相关技术
- 20.1 简介
- 20.2 X11/Headless Java
- 20.3 JSP
- 20.4 加载图片
- 21 包
- 21.1 概述