Class MetadataChildBase
- All Implemented Interfaces:
Serializable,MetadataCommonInternal,MetadataChild,MetadataCommon
- Direct Known Subclasses:
DataObjectCollectionImpl,DataObjectRelationshipImpl
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<DataObjectAttributeRelationship> protected Booleanprotected MetadataChildprotected MetadataChildprotected Booleanprotected Booleanprotected Class<?> protected BooleanFields inherited from class org.kuali.rice.krad.data.metadata.impl.MetadataCommonBase
backingObjectName, description, embeddedCommonMetadata, label, mergeAction, name, readOnly, shortLabel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the parent-child related fieldsGets the metadata from the childGets bi-directional relationshipgetParentAttributeNameRelatedToChildAttributeName(String childAttribute) Gets foreign key attribute from parent.Class<?> Gets the type of related objectbooleanDetermines whether this object will be automatically deleted when the containing object is deleted.booleanDetermines whether object will be loaded with parentbooleanDetermines whether the object is reloaded automatically with parentbooleanDetermines whether object automatically savedvoidsetAttributeRelationships(List<DataObjectAttributeRelationship> attributeRelationships) voidsetDeletedWithParent(boolean deletedWithParent) voidsetEmbeddedMetadataChild(MetadataChild embeddedMetadataChild) voidsetInverseRelationship(MetadataChild inverseRelationship) voidsetLoadedAtParentLoadTime(boolean loadedAtParentLoadTime) voidsetLoadedDynamicallyUponUse(boolean loadedDynamicallyUponUse) voidsetRelatedType(Class<?> relatedType) voidsetSavedWithParent(boolean savedWithParent) toString()Methods inherited from class org.kuali.rice.krad.data.metadata.impl.MetadataCommonBase
getBackingObjectName, getDescription, getEmbeddedCommonMetadata, getLabel, getLabelFromPropertyName, getMergeAction, getName, getShortLabel, getUniqueKeyForMerging, isReadOnly, mergeLists, setBackingObjectName, setDescription, setEmbeddedCommonMetadata, setLabel, setMergeAction, setName, setReadOnly, setShortLabelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.data.metadata.MetadataCommon
getBackingObjectName, getDescription, getLabel, getMergeAction, getName, getShortLabel, isReadOnly
-
Field Details
-
embeddedMetadataChild
-
attributeRelationships
-
inverseRelationship
-
savedWithParent
-
deletedWithParent
-
loadedAtParentLoadTime
-
loadedDynamicallyUponUse
-
-
Constructor Details
-
MetadataChildBase
public MetadataChildBase()
-
-
Method Details
-
isSavedWithParent
public boolean isSavedWithParent()Determines whether object automatically savedFor related objects, whether this object will be automatically saved when the containing object is persisted.
- Specified by:
isSavedWithParentin interfaceMetadataChild- Returns:
- whether object is automatically saved
-
setSavedWithParent
public void setSavedWithParent(boolean savedWithParent) -
isDeletedWithParent
public boolean isDeletedWithParent()Determines whether this object will be automatically deleted when the containing object is deleted.This is a special case of the
MetadataChild.isSavedWithParent()method. It probably would never be true if theMetadataChild.isSavedWithParent()returns false.- Specified by:
isDeletedWithParentin interfaceMetadataChild- Returns:
- whether automatically deleted
-
setDeletedWithParent
public void setDeletedWithParent(boolean deletedWithParent) -
isLoadedAtParentLoadTime
public boolean isLoadedAtParentLoadTime()Determines whether object will be loaded with parentFor 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.
- Specified by:
isLoadedAtParentLoadTimein interfaceMetadataChild- Returns:
- whether object
-
setLoadedAtParentLoadTime
public void setLoadedAtParentLoadTime(boolean loadedAtParentLoadTime) -
isLoadedDynamicallyUponUse
public boolean isLoadedDynamicallyUponUse()Determines whether the object is reloaded automatically with parentFor 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.)
- Specified by:
isLoadedDynamicallyUponUsein interfaceMetadataChild- Returns:
- whether object loaded automatically with parent
-
setLoadedDynamicallyUponUse
public void setLoadedDynamicallyUponUse(boolean loadedDynamicallyUponUse) -
getAttributeRelationships
Gets the parent-child related fieldsReturns the related fields between the parent and child objects.
- Specified by:
getAttributeRelationshipsin interfaceMetadataChild- Returns:
- related fields. List must not be empty. There always must be at least one related field.
-
setAttributeRelationships
-
getInverseRelationship
Gets bi-directional relationshipIf this metadata element is part of a bi-directional relationship, this method returns the other side of the bi-directional relationship.
- Specified by:
getInverseRelationshipin interfaceMetadataChild- Returns:
- the inverse of this relationship if it is bi-directional, false otherwise
-
setInverseRelationship
-
getParentAttributeNameRelatedToChildAttributeName
Gets foreign key attribute from parent.For a given child key attribute, return the matching foreign key attribute on the parent object.
- Specified by:
getParentAttributeNameRelatedToChildAttributeNamein interfaceMetadataChild- Returns:
- null if the attribute name given is not part of the key relationship.
-
toString
- Overrides:
toStringin classMetadataCommonBase
-
getRelatedType
Gets the type of related objectThis is the type of the object referenced by this relationship or contained in this collection.
- Specified by:
getRelatedTypein interfaceMetadataChild- Returns:
- type of related object
-
setRelatedType
-
getEmbeddedMetadataChild
Gets the metadata from the child- Returns:
- embedded metadata
-
setEmbeddedMetadataChild
-