<nonPersistentEntity> elements and related data object types
The <nonPersistentEntity> XML root element defines non-persistent entity
data object types. A non-persistent entity data object type defines a temporary
entity instance or object. PolicyCenter creates and
uses this object only during the time that the PolicyCenter server is running. When the server shuts down,
PolicyCenter discards the object data. It is not
possible to commit a non-persistent entity object to the database.
Guidewire defines non-persistent entities in data model metadata files.
Guidewire recommendations for non-persistent entities
As a general rule, Guidewire recommends that you do not create new non-persistent entities. In addition, do not extend existing non-persistent entities unless instructed to do so. For example, the base configuration contains non-persistent entities that you can extend to specify new search criteria.A major issue with non-persistent entities is that they do not interact well with data bundles. For example, passing a non-persistent entity instance to a PCF page is generally a bad idea because it generally does not work in the manner that you expect.
A non-persistent entity instance has to live in a bundle and can only live in one bundle. Therefore, passing it to one context removes it from the other context. Even worse, it is possible that in passing the non-persistent entity instance from one context to another, the object loses any nested arrays or links associated with it. Thus, it is possible to lose parts of the entity graph as the non-persistent entity instance moves around.
In situations where you want the behavior of a non-persistent entity, use a Gosu class instead. For example:
- If you want the behavior of a non-persistent entity in web services, create a Gosu class. Then, expose the class as a web service. Do not rely on non-persistent entities and entity serialization.
- If you want a field that behaves as a column, specify a data
type through the use of annotations. For example, you could use this technique
for
nonnegativeintegercolumn behavior. After specifying the data type, add the wanted data type behavior to properties on Gosu classes. For information on how to associate data types with object properties using the annotation syntax, see Defining a data type for a property.
Attributes of <nonPersistentEntity>
The <nonPersistentEntity>
element contains the following attributes.
|
Description |
Default |
|---|---|---|
|
If |
|
|
A description of the purpose and use of the entity. |
None |
|
Optional. Creates a more human-readable form of the entity name. You can access this name using the following:
If you do not specify a value for the |
None |
|
Required. The name of the entity. You use this name to access the entity in data views, rules, and other areas within PolicyCenter. |
None |
|
Unused. |
|
|
If |
|
|
If |
|
|
Internal. Do not use. The only real effect is to change the location in which the table appears in a data distribution report. |
|
|
The priority of the
corresponding subtype key. This value is meaningful only for entities
participating in a subtype hierarchy, which can be either the |
|
|
If you create a non-final entity, then PolicyCenter automatically creates a typelist to keep track of the subtypes of that entity. That typelist has an associated database table. If you do not specify a value for this attribute, then PolicyCenter uses the name of the entity as the table name for the subtype typelist. However, PolicyCenter places a restriction of 25 characters on the length of the database table name. You use this attribute to specify the database table name for the typelist if an entity name is too long to become a valid typelist table name. It is not valid to use this attribute with entity types marked as final. |
None |
Subelements of <nonPersistentEntity>
The <nonPersistentEntity>
element contains the following subelements.
|
Description |
|---|---|
|
See <array>. |
|
See <column>. |
|
See <edgeForeignKey>. |
|
See <foreignkey>. |
|
See <fulldescription>. |
|
See <implementsEntity>. |
|
|
|
Handles monetary amounts. The |
|
See <onetoone>. |
|
See <typekey>. |
