public class RelatedEntitiesBuilder
extends java.lang.Object
RelatedEntitiesBuilder builder = RelatedEntitiesSupport.builder(this);
Screen colourBrowser = builder
.withEntityClass(Car.class)
.withProperty("colour")
.withSelectedEntities(carsTable.getSelected())
.withScreenId("ColourBrowser")
.build();
colourBrowser.show();
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
configurationName |
protected java.lang.Class<?> |
entityClass |
protected java.util.function.Function<RelatedEntitiesBuilder,Screen> |
handler |
protected io.jmix.core.metamodel.model.MetaClass |
metaClass |
protected io.jmix.core.metamodel.model.MetaProperty |
metaProperty |
protected OpenMode |
openMode |
protected ScreenOptions |
options |
protected FrameOwner |
origin |
protected java.lang.String |
property |
protected java.lang.String |
screenId |
protected java.util.Collection<?> |
selectedEntities |
Constructor and Description |
---|
RelatedEntitiesBuilder(FrameOwner origin,
java.util.function.Function<RelatedEntitiesBuilder,Screen> handler) |
RelatedEntitiesBuilder(RelatedEntitiesBuilder builder) |
Modifier and Type | Method and Description |
---|---|
Screen |
build()
Builds the screen.
|
java.lang.String |
getConfigurationName() |
java.lang.Class<?> |
getEntityClass() |
io.jmix.core.metamodel.model.MetaClass |
getMetaClass() |
io.jmix.core.metamodel.model.MetaProperty |
getMetaProperty() |
OpenMode |
getOpenMode() |
ScreenOptions |
getOptions() |
FrameOwner |
getOrigin() |
java.lang.String |
getProperty() |
java.lang.String |
getScreenId() |
java.util.Collection<?> |
getSelectedEntities() |
RelatedEntitiesBuilder |
withConfigurationName(java.lang.String configurationName)
Sets a name to filter configuration in opened screen.
|
RelatedEntitiesBuilder |
withEntityClass(java.lang.Class<?> entityClass)
Sets class of entity for which you want to see related entities.
|
RelatedEntitiesBuilder |
withMetaClass(io.jmix.core.metamodel.model.MetaClass metaClass)
Sets MetaClass of entity for which you want to see related entities.
|
RelatedEntitiesBuilder |
withMetaProperty(io.jmix.core.metamodel.model.MetaProperty metaProperty)
Sets MetaProperty from which you want to show related entities.
|
RelatedEntitiesBuilder |
withOpenMode(OpenMode openMode)
Sets
OpenMode for the lookup screen and returns the builder for chaining. |
RelatedEntitiesBuilder |
withOptions(ScreenOptions options)
Sets
ScreenOptions for the lookup screen and returns the builder for chaining. |
RelatedEntitiesBuilder |
withProperty(java.lang.String property)
Sets property from which you want to show related entities.
|
<S extends Screen> |
withScreenClass(java.lang.Class<S> screenClass)
Sets screen class and returns the
RelatedEntitiesClassBuilder for chaining. |
RelatedEntitiesBuilder |
withScreenId(java.lang.String screenId)
Sets screen id and returns the builder for chaining.
|
RelatedEntitiesBuilder |
withSelectedEntities(java.util.Collection<?> selectedEntities)
Sets collection of selected items.
|
protected final java.util.function.Function<RelatedEntitiesBuilder,Screen> handler
protected java.lang.String property
protected io.jmix.core.metamodel.model.MetaProperty metaProperty
protected java.lang.Class<?> entityClass
protected io.jmix.core.metamodel.model.MetaClass metaClass
protected OpenMode openMode
protected java.lang.String screenId
protected FrameOwner origin
protected ScreenOptions options
protected java.util.Collection<?> selectedEntities
protected java.lang.String configurationName
public RelatedEntitiesBuilder(RelatedEntitiesBuilder builder)
public RelatedEntitiesBuilder(FrameOwner origin, java.util.function.Function<RelatedEntitiesBuilder,Screen> handler)
@Nullable public java.lang.String getProperty()
withProperty(String)
@Nullable public io.jmix.core.metamodel.model.MetaProperty getMetaProperty()
withMetaProperty(MetaProperty)
@Nullable public java.lang.Class<?> getEntityClass()
withEntityClass(Class)
public OpenMode getOpenMode()
withOpenMode(OpenMode)
@Nullable public java.lang.String getScreenId()
withScreenId(String)
public FrameOwner getOrigin()
public ScreenOptions getOptions()
withOptions(ScreenOptions)
@Nullable public io.jmix.core.metamodel.model.MetaClass getMetaClass()
withMetaClass(MetaClass)
@Nullable public java.util.Collection<?> getSelectedEntities()
withSelectedEntities(Collection)
@Nullable public java.lang.String getConfigurationName()
withConfigurationName(String)
public RelatedEntitiesBuilder withProperty(java.lang.String property)
property
- propertypublic RelatedEntitiesBuilder withMetaProperty(io.jmix.core.metamodel.model.MetaProperty metaProperty)
metaProperty
- meta propertypublic RelatedEntitiesBuilder withEntityClass(java.lang.Class<?> entityClass)
entityClass
- classpublic RelatedEntitiesBuilder withOpenMode(OpenMode openMode)
OpenMode
for the lookup screen and returns the builder for chaining.
For example: builder.withOpenMode(OpenMode.DIALOG).build();
openMode
- open modepublic RelatedEntitiesBuilder withScreenId(java.lang.String screenId)
screenId
- identifier of the screenpublic <S extends Screen> RelatedEntitiesClassBuilder<S> withScreenClass(java.lang.Class<S> screenClass)
RelatedEntitiesClassBuilder
for chaining.screenClass
- class of the screen controllerpublic RelatedEntitiesBuilder withOptions(ScreenOptions options)
ScreenOptions
for the lookup screen and returns the builder for chaining.options
- screen optionspublic RelatedEntitiesBuilder withMetaClass(io.jmix.core.metamodel.model.MetaClass metaClass)
metaClass
- meta classpublic RelatedEntitiesBuilder withSelectedEntities(java.util.Collection<?> selectedEntities)
selectedEntities
- selected entitiespublic RelatedEntitiesBuilder withConfigurationName(java.lang.String configurationName)
configurationName
- a configuration namepublic Screen build()