Class EntityAssociationImpl
java.lang.Object
com.foreach.across.core.support.AttributeSupport
com.foreach.across.modules.entity.registry.EntityAssociationImpl
- All Implemented Interfaces:
com.foreach.across.core.support.ReadableAttributes
,com.foreach.across.core.support.WritableAttributes
,ConfigurableEntityViewRegistry
,EntityAssociation
,EntityViewRegistry
,MutableEntityAssociation
,org.springframework.core.AttributeAccessor
public class EntityAssociationImpl
extends com.foreach.across.core.support.AttributeSupport
implements MutableEntityAssociation
- Author:
- Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.foreach.across.modules.entity.registry.EntityAssociation
EntityAssociation.ParentDeleteMode, EntityAssociation.Type
-
Constructor Summary
ConstructorDescriptionEntityAssociationImpl
(String name, MutableEntityConfiguration sourceEntityConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
getName()
<Y extends EntityViewFactory>
YgetViewFactory
(String viewName) String[]
boolean
boolean
isHidden()
void
registerView
(String viewName, EntityViewFactory viewFactory) void
removeView
(String viewName) Remove a view from the registry.void
setAssociationType
(EntityAssociation.Type associationType) void
Should the association be hidden or explicitly shown in the administrative UI.void
setParentDeleteMode
(EntityAssociation.ParentDeleteMode parentDeleteMode) void
setSourceProperty
(EntityPropertyDescriptor sourceProperty) void
setTargetEntityConfiguration
(EntityConfiguration targetEntityConfiguration) void
setTargetProperty
(EntityPropertyDescriptor targetProperty) Methods inherited from class com.foreach.across.core.support.AttributeSupport
attributeMap, attributeNames, getAttribute, getAttribute, getAttribute, hasAttribute, hasAttribute, removeAttribute, removeAttribute, setAttribute, setAttribute, setAttributes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.AttributeAccessor
attributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttribute
Methods inherited from interface com.foreach.across.core.support.ReadableAttributes
attributeMap, attributeNames, getAttribute, getAttribute, getAttribute, hasAttribute, hasAttribute
Methods inherited from interface com.foreach.across.core.support.WritableAttributes
removeAttribute, setAttribute, setAttributes
-
Constructor Details
-
EntityAssociationImpl
-
-
Method Details
-
getAssociationType
- Specified by:
getAssociationType
in interfaceEntityAssociation
- Returns:
- type of association
-
setAssociationType
- Specified by:
setAssociationType
in interfaceMutableEntityAssociation
-
setHidden
Description copied from interface:MutableEntityAssociation
Should the association be hidden or explicitly shown in the administrative UI. If the property is not set explicitly on the association (or set to null), an association should be hidden if any of its participatingEntityConfiguration
instances is hidden.- Specified by:
setHidden
in interfaceMutableEntityAssociation
- Parameters:
hidden
- true if should not show in the UI, can be null to revert to default check
-
isHidden
public boolean isHidden()- Specified by:
isHidden
in interfaceEntityAssociation
- Returns:
- True if the association should be hidden from administrative UI implementations.
-
getName
- Specified by:
getName
in interfaceEntityAssociation
-
getEntityType
- Specified by:
getEntityType
in interfaceEntityAssociation
-
getSourceEntityConfiguration
- Specified by:
getSourceEntityConfiguration
in interfaceEntityAssociation
-
setTargetEntityConfiguration
- Specified by:
setTargetEntityConfiguration
in interfaceMutableEntityAssociation
-
getTargetEntityConfiguration
- Specified by:
getTargetEntityConfiguration
in interfaceEntityAssociation
-
getSourceProperty
- Specified by:
getSourceProperty
in interfaceEntityAssociation
-
setSourceProperty
- Specified by:
setSourceProperty
in interfaceMutableEntityAssociation
-
getTargetProperty
- Specified by:
getTargetProperty
in interfaceEntityAssociation
-
setTargetProperty
- Specified by:
setTargetProperty
in interfaceMutableEntityAssociation
-
getParentDeleteMode
- Specified by:
getParentDeleteMode
in interfaceEntityAssociation
- Returns:
- behaviour in case the parent entity will be deleted but associated entities still exist
-
setParentDeleteMode
- Specified by:
setParentDeleteMode
in interfaceMutableEntityAssociation
-
hasView
- Specified by:
hasView
in interfaceEntityViewRegistry
-
getViewFactory
- Specified by:
getViewFactory
in interfaceEntityViewRegistry
-
registerView
- Specified by:
registerView
in interfaceConfigurableEntityViewRegistry
-
removeView
Description copied from interface:ConfigurableEntityViewRegistry
Remove a view from the registry.- Specified by:
removeView
in interfaceConfigurableEntityViewRegistry
- Parameters:
viewName
- name of the view
-
getViewNames
- Specified by:
getViewNames
in interfaceEntityViewRegistry
-