Package io.jmix.ui.relatedentities
Class RelatedEntitiesSupportImpl
java.lang.Object
io.jmix.ui.relatedentities.RelatedEntitiesSupportImpl
- All Implemented Interfaces:
RelatedEntitiesSupport
@Component("ui_RelatedEntities")
public class RelatedEntitiesSupportImpl
extends Object
implements RelatedEntitiesSupport
-
Field Summary
Modifier and TypeFieldDescriptionprotected ExtendedEntities
protected JpqlFilterSupport
protected Messages
protected MessageTools
protected Metadata
protected MetadataTools
protected SingleFilterSupport
protected UiComponents
protected WindowConfig
-
Constructor Summary
ConstructorDescriptionRelatedEntitiesSupportImpl
(Metadata metadata, MessageTools messageTools, WindowConfig windowConfig, Messages messages, ExtendedEntities extendedEntities, UiComponents uiComponents, JpqlFilterSupport jpqlFilterSupport, SingleFilterSupport singleFilterSupport, MetadataTools metadataTools) -
Method Summary
Modifier and TypeMethodDescriptionbuilder
(FrameOwner frameOwner) Creates a related screen builder.protected Screen
buildScreen
(RelatedEntitiesBuilder builder) protected DesignTimeConfiguration
createFilterConfiguration
(Filter filter, String configurationName) protected JpqlFilter
createJpqlFilter
(DataLoader dataLoader, MetaProperty metaProperty, MetaClass parentMetaClass, Collection selectedParentEntities) protected Screen
createScreen
(RelatedEntitiesBuilder builder, MetaClass metaClass, MetaProperty metaProperty) protected String
generateConfigurationName
(RelatedEntitiesBuilder builder, MetaProperty metaProperty) protected String
getManyToManyJpqlCondition
(MetaProperty metaProperty, MetaClass parentMetaClass) protected String
getManyToOneJpqlCondition
(MetaProperty metaProperty, MetaClass parentMetaClass) protected MetaClass
getMetaClass
(RelatedEntitiesBuilder builder) protected MetaProperty
getMetaProperty
(RelatedEntitiesBuilder builder, MetaClass metaClass) protected String
getOneToManyJpqlCondition
(MetaProperty metaProperty, MetaClass parentMetaClass) protected String
getWhereExpression
(MetaProperty metaProperty, MetaClass parentMetaClass)
-
Field Details
-
messages
-
messageTools
-
metadata
-
windowConfig
-
extendedEntities
-
uiComponents
-
jpqlFilterSupport
-
singleFilterSupport
-
metadataTools
-
-
Constructor Details
-
RelatedEntitiesSupportImpl
public RelatedEntitiesSupportImpl(Metadata metadata, MessageTools messageTools, WindowConfig windowConfig, Messages messages, ExtendedEntities extendedEntities, UiComponents uiComponents, JpqlFilterSupport jpqlFilterSupport, SingleFilterSupport singleFilterSupport, MetadataTools metadataTools)
-
-
Method Details
-
builder
Description copied from interface:RelatedEntitiesSupport
Creates a related screen builder.Note, it is necessary to set MetaClass or entity class and property or MetaProperty to builder.
Example of creating screen with entity class and property:
RelatedEntitiesBuilder builder = RelatedEntitiesSupport.builder(this); Screen colourBrowser = builder .withEntityClass(Car.class) .withProperty("colour") .withSelectedEntities(carsTable.getSelected()) .withScreenClass(ColourBrowser.class) .build(); colourBrowser.show();
- Specified by:
builder
in interfaceRelatedEntitiesSupport
- Parameters:
frameOwner
- invoking screen- Returns:
- builder instance
-
createFilterConfiguration
protected DesignTimeConfiguration createFilterConfiguration(Filter filter, String configurationName) -
createJpqlFilter
protected JpqlFilter createJpqlFilter(DataLoader dataLoader, MetaProperty metaProperty, MetaClass parentMetaClass, Collection selectedParentEntities) -
getWhereExpression
-
getManyToOneJpqlCondition
-
getOneToManyJpqlCondition
-
getManyToManyJpqlCondition
-