JavaBean persistence

zhaozj2021-02-12  144

JavaBean persistence

When a JavaBean is userned within the construction tool and establishes a connection with other beans, it should be saved, and the next time the LOAD can be constructed or during operation, it should be the last modification. information. In order to do this, save the information of certain fields of the bean to the Java.io.Serializable interface when defining the bean. For example: Public class button is implemented, the information of the paragraph in the BEAN in the serialization interface will be saved automatically. If you don't want to save some fields, you can crown in these fields with Transient or Static keywords, Transient and Static variables are not saved. Typically, all of the publication of a BEAN should be saved, or the internal state can be selected. When you modify the software, the bean developer can add a field to remove a reference to other classes, change a field of private / protected / public status, which does not affect the storage structure relationship of the class. However, when a field is removed from the class, change a variable in the location of the class system, change a field to transient / static, or it is transient / static, which is now changed to other features, will cause storage relationships. The change. 5 JavaBean's storage format JavaBean component is designed, generally in the ZIP format file stored in the extended JAR, contains information related to JavaBean in JAR, and specifies which classes of the manifest file are Javabean. Javabean stored in JAR files Greater the number of data transmission is greatly reduced, and some of the resources required by JavaBean runtime are mainly discussed with some internal characteristics of JavaBeans and their routine design methods, reference Is the JavaBeans specification 1.0a version. As the world's large ISV is more and more support for JavaBeans, the specification is still evolving in some details, but the basic framework will not change.

转载请注明原文地址:https://www.9cbs.com/read-6402.html

New Post(0)