Class DataModelProvider
java.lang.Object
io.jmix.datatoolsflowui.datamodel.DataModelProvider
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDataModel(String dataStore, String entityName) Retrieves theDataModelassociated with the given data store and entity name.Retrieves an unmodifiable view of the internal data model storage.getDataModels(String dataStore) Retrieves the data models associated with a specific data store.getEntityAttributes(String dataStore, String entityName) Retrieves a list of attributes for a specific entity within a given data store.getEntityModel(String dataStore, String entityName) Retrieves theEntityModelassociated with the specified data store and entity name.getEntityRelations(String dataStore, String entityName) Retrieves the relationships defined for a specific entity in the data model of a given data store.booleanhasRelations(String dataStore, String entityName) Determines whether the given entity in the specified data store has any relationships defined.
-
Field Details
-
dataModels
-
-
Constructor Details
-
DataModelProvider
-
-
Method Details
-
getDataModels
Retrieves an unmodifiable view of the internal data model storage. The returned map represents an organizational structure where the first-level keys are data store identifiers and the values are nested maps. The nested maps use entity names as keys and their correspondingDataModelobjects as values.- Returns:
- a map containing data store identifiers as keys, where each value is another map that
maps entity names to their respective
DataModelinstances. The returned map is unmodifiable.
-
getDataModels
Retrieves the data models associated with a specific data store.- Parameters:
dataStore- the name of the data store whose data models are to be retrieved; must not be null- Returns:
- a map where the keys are entity names and the values are the corresponding
DataModelinstances
-
getDataModel
Retrieves theDataModelassociated with the given data store and entity name.- Parameters:
dataStore- the name of the data store from which the data model is to be fetchedentityName- the name of the entity whose data model is to be fetched- Returns:
- the
DataModelcorresponding to the specified data store and entity name, ornullif no such data model exists
-
hasRelations
Determines whether the given entity in the specified data store has any relationships defined.- Parameters:
dataStore- the name of the data store to which the entity belongs; must not be nullentityName- the name of the entity to check for relationships; must not be null- Returns:
trueif the entity has at least one relationship defined in the data model,falseotherwise
-
getEntityRelations
Retrieves the relationships defined for a specific entity in the data model of a given data store.- Parameters:
dataStore- the name of the data store containing the desired entity; must not be nullentityName- the name of the entity for which the relationships are to be retrieved; must not be null- Returns:
- a map where the keys specify the type of relationships (e.g., MANY_TO_ONE, ONE_TO_MANY)
and the values are lists of
Relationobjects detailing the relationships; if the entity or data store has no relationships, an empty map is returned
-
getEntityAttributes
Retrieves a list of attributes for a specific entity within a given data store.- Parameters:
dataStore- the name of the data store containing the entity; must not be nullentityName- the name of the entity whose attributes are to be retrieved; must not be null- Returns:
- a list of
AttributeModelrepresenting the attributes defined for the specified entity; an empty list is returned if the entity has no attributes or if the data store or entity does not exist
-
getEntityModel
Retrieves theEntityModelassociated with the specified data store and entity name.- Parameters:
dataStore- the name of the data store where the entity resides; must not be nullentityName- the name of the entity whose model is to be retrieved; must not be null- Returns:
- the
EntityModelcorresponding to the specified data store and entity name, ornullif no such entity model exists
-