Version list API methods that query an array of entities
The following are methods on the version list that query an array of entities. There is one of each of these members for every property on a policy entity that contains arrays of other entities. This commonly represents navigating down a hierarchy, but that is not always the case. For example, a policy object contains an array of policy lines, a vehicle object contains an array of drivers. This applies only to directly database-backed properties, not to enhancement properties or to any methods.
Examples assume an entity instance of type PersonalVehicle with a property
called Drivers. Each Driver is of the type
PolicyDriver.
property
Use
property where property is the name of the property in
source entity instance returns a list of all version lists for this property. The version
lists are typed to the property type on the source entity with a suffix of
VersionList. Each version list in the result represents the source entity
instance and all its versions for this period. The source entity instance and its versions
have the same fixed ID.There is a
method for each property on the source entity instance that contains an array. For
PersonalVehicle, the Drivers property returns
List<VehicleDriverVersionList>.
propertyAsOf(date)
There is an AsOf(date) method for each property on the original entity
instance that contains an array.
This method gets the contents of this property as of a particular date. Add the
AsOf suffix to the name of the property in the source entity instance.
This is a method even though its first character is capitalized. Pass the date as an
argument.
For PersonalVehicle.Drivers, the DriversAsOf method
returns List<VehicleDriver>.
Returns a list, not an array, of the type contained in the array property. This could be an
empty list if no child entity instances in that array are effective at that date due to
being removed or canceled. The return value can be an empty array. This method does not
return null nor throw an exception.
addToProperty(obj)
There is an addTo method for each property on the original entity instance
that contains an array.
Add an entity instance to the version list that represents the property that is array of entity instances of that type.
This method returns void.
The method is addTo appended with the source property name. This method
takes an entity instance of the type of the original property (in this example,
VehicleDriver). This change always happens in window mode to preserve
the effective and expiration dates on the entity instance. In contrast, when adding entities
in slice mode, PolicyCenter overrides the effective date with the slice date.
