156 Persistence descriptor . The default-fetch-group attribute has

156 Persistence descriptor . The default-fetch-group attribute has values true or false. It specifies whether a particular field s value will be retrieved from the data store and populated into the instance s corresponding attribute when the instance itself is first read. This action typically takes place during a transition away from the Hollow state. The default value is true for fields of all Java primitive types, Date (from package java.util), String and Number (from package java.lang), BigDecimal and BigInteger (from java.math), and all array types. Note that although arrays are in the default fetch group by default, collections are not. Fields that are not part of the default fetch group are not read from the data store until their values are requested by the application. . The embedded attribute has values true or false. If true, it is a hint to the implementation that the object referenced by that field should be stored as part of this instance instead of as a separate instance. Where supported by the implementation, the targets of such references are stored as second-class objects. Where not supported by the implementation, the targets of such references will be stored as first-class objects. The significant differences between first-class and second-class objects were discussed in Chapter 5. The default value is the same as that for the default-fetch-group attribute. Note that although arrays are embedded by default, collections are not. 10.3.6 jdo.dtd (extract) This element is used to identify fields of collection types as being collections of specific object types. By default all fields of collection types are deemed to be collections of Object type. All implementations are required to support such references of Object type but may restrict the class of instances that can be assigned to these references, throwing a ClassCastException as required. Explicitly identifying the contained object type is recommended when storing references to other persistence-capable instances, as it removes the instance s dependency on the implementation being capable of storing such references as Object types. ClassCastExceptions will not then be thrown as long as the instances added to the collection are instances of the declared persistence-capable class. The element has two attributes. . The element-type attribute is the fully qualified name of the class, instances of which will be contained in the collection.

Hint: If you are looking for very good and affordable webspace to host and run your java hosting application check Virtualwebstudio java web hosting provider

Comments are closed.