The contributing-item-creation-policy dictates how contributing items are created (if at all) in a MutableRepository. This attribute can have a value of eager, lazy, or none.


When users create a new composite item via the createItem() method in MutableCompositeRepository, new instances of the primary item and of all contributing items are created. So, for example, if you have a user item type defined in your composite repository that borrows properties from the SQL and LDAP repositories, any new user composite repository item that is created creates both an SQL repository item and an LDAP repository item. However, before these items can be added to their respective repositories, the correct link needs to exist between them. If the items are linked by a certain property, this property needs to be set on the primary item before the items are added, otherwise an error occurs as those two items cannot be linked back together later.


If this option is chosen, contributing items are created only when they are needed. In this case, when users call setPropertyValue on a property that is defined in the contributing repository, the composite repository creates the item in the contributing then and there. There are two different behaviors depending on whether the CompositeItem is transient or not.

The check for valid linking properties occurs during the updateItem call, and not during the setPropertyValue call on the contributing item. So if you use lazy item creation and call setPropertyValue on a persistent item, you do not need to already have valid values set for any linking properties on the primary item at that exact point in time. As long as the values of the linking properties are set before updateItem is called, the item should be successfully created.


If this option is chosen, no repository items are created in the underlying repositories under any circumstance. Any contributing items used in the composite repository must already exist in order for valid results to be returned from property value requests.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices