Version list API methods that query an effective dated object

The following methods on the version list act upon an effective dated object (entity instance). Every version list has properties and methods that are common to all version lists. The version list also has properties that mirror property names on the source object.

The version list name includes the entity instance for which it is a version list appended with the suffix VersionList. For example, a version list for a PersonalAutoLine entity instance has type PersonalAutoLineVersionList.

Examples assume an entity instance of type PersonalVehicle with a property called Drivers. Each Driver is of the type PolicyDriver.

AllVersions

Gets all versions of this entity instance in this period.

Returns a list of entity instances of the entity type. Each entity instance has a unique effective date range that does not overlap. For PersonalVehicle, this property returns List<PersonalVehicle>.

This property gets all versions of this entity instance across effective time in this policy period. Each entity instance reference is set to edit in window mode.

This property can access properties on an entity instance where the properties are not array properties. You use this to iterate across all versions and get the desired property from each one.

You can use this method in rating code to iterate across all effective time versions of an object that you need to send to the rating engine.

Note: When getting this property on a version list for a PolicyPeriod (the graph root), this property contains only one version since this root entity instance is not revisioned.

asOf(date)

Gets the version of this entity instance that is effective at the specified date, if such version exists.

Returns one entity instance as of the specified date, if such instance exists. The entity instance is in window mode. If the entity instance does not exist on the specified date, returns null. This can occur if the entity instance has been removed, canceled, or not yet added to the policy. For PersonalVehicle, this property returns a PersonalVehicle.

Use this method to access properties on an entity instance where the property is not an array. This is because you can choose a date to pass to this method, and get the desired property from the result.

hasGaps

Check if an entity instance has effective-date gaps.

Returns boolean.

If true, the entity instance has at least some amount of non-effective time between two ranges of effective time in that contractual period.

hasOverlaps

Check if an entity instance has overlapping duplicates across effective time.

Returns boolean.

If true, some code created invalid data. This is most likely due to incorrect manipulation of entities in window mode. PolicyCenter has built-in validation routines that use this method to detect certain types of problems before binding the branch. You can choose to use this method in your own validation code or other Gosu code.

getAllVersionsUntyped

Get all versions of this object, but typed to the root of all revisioned entities.

Returns a list of effective dated entities: List<EffDatedBean>. The type for each item is the root class of all revisioned entities, which is EffDatedBean. Typically, you need to cast each item to the specific entity subtype.

This method is similar to the AllVersions property, but with a different return type declaration.

getVersionAsOf(date)

Gets the entity instance as of a date, but typed to the root of all revisioned entities, EffDatedBean.

Returns an entity instance typed as the root of all revisioned entities (EffDatedBean).

This method is the same as the asOf method, but with a slightly different return type.