org.kuali.rice.krad.data.metadata
Interface MetadataChild

All Superinterfaces:
MetadataCommon, Serializable
All Known Subinterfaces:
DataObjectCollection, DataObjectRelationship
All Known Implementing Classes:
DataObjectCollectionImpl, DataObjectRelationshipImpl, MetadataChildBase

public interface MetadataChild
extends MetadataCommon

Interface shared by all non-top-level metadata objects which link to other persistable objects. This is used as the base interface for 1:1/M:1 Relationships and 1:M/N:M Collections.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 List<DataObjectAttributeRelationship> getAttributeRelationships()
          Returns the related fields between the parent and child objects.
 String getParentAttributeNameRelatedToChildAttributeName(String childAttribute)
          For a given child key attribute, return the matching foreign key attribute on the parent object.
 Class<?> getRelatedType()
          This is the type of the object referenced by this relationship or contained in this collection.
 boolean isDeletedWithParent()
          For related objects, whether this object will be automatically deleted when the containing object is deleted.
 boolean isLoadedAtParentLoadTime()
          For related objects, whether this related object will be loaded from the persistence layer at the same time as the parent object.
 boolean isLoadedDynamicallyUponUse()
          For related objects, whether this related object will be loaded from the persistence layer automatically when it is accessed by client code.
 boolean isSavedWithParent()
          For related objects, whether this object will be automatically saved when the containing object is persisted.
 
Methods inherited from interface org.kuali.rice.krad.data.metadata.MetadataCommon
getBackingObjectName, getDescription, getLabel, getMergeAction, getName, getShortLabel, isReadOnly
 

Method Detail

getRelatedType

Class<?> getRelatedType()
This is the type of the object referenced by this relationship or contained in this collection.


getAttributeRelationships

List<DataObjectAttributeRelationship> getAttributeRelationships()
Returns the related fields between the parent and child objects. List must not be empty. There always must be at least one related field.


isSavedWithParent

boolean isSavedWithParent()
For related objects, whether this object will be automatically saved when the containing object is persisted.


isDeletedWithParent

boolean isDeletedWithParent()
For related objects, whether this object will be automatically deleted when the containing object is deleted. This is a special case of the isSavedWithParent() method. It probably would never be true if the isSavedWithParent() returns false.


isLoadedAtParentLoadTime

boolean isLoadedAtParentLoadTime()
For related objects, whether this related object will be loaded from the persistence layer at the same time as the parent object. If false, the object will be loaded upon demand, either via automatic lazy-loading provided by the infrastructure or by explicit request.


isLoadedDynamicallyUponUse

boolean isLoadedDynamicallyUponUse()
For related objects, whether this related object will be loaded from the persistence layer automatically when it is accessed by client code. If false, then the object must be refreshed manually by client code. (Though such a refresh may be possible by requesting the refresh from the persistence provider.)


getParentAttributeNameRelatedToChildAttributeName

String getParentAttributeNameRelatedToChildAttributeName(String childAttribute)
For a given child key attribute, return the matching foreign key attribute on the parent object. Will return null if the attribute name given is not part of the key relationship.



Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.