Package io.jmix.core
Class ReferenceToEntitySupport
java.lang.Object
io.jmix.core.ReferenceToEntitySupport
Utility class to provide common functionality for entities with different type of primary keys
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPrimaryKeyForLoadingEntity
(MetaClass metaClass) getPrimaryKeyForLoadingEntityFromLink
(MetaClass metaClass) getReferenceId
(Object entity) getReferenceIdForLink
(Object entity) getReferenceIdPropertyName
(MetaClass metaClass)
-
Field Details
-
metadataTools
-
metadata
-
-
Constructor Details
-
ReferenceToEntitySupport
public ReferenceToEntitySupport()
-
-
Method Details
-
getReferenceId
- Parameters:
entity
- entity- Returns:
- entity id to store in database
-
getReferenceIdForLink
- Parameters:
entity
- entity- Returns:
- entity id for links
-
getReferenceIdPropertyName
- Parameters:
metaClass
- of entity- Returns:
- metaProperty name for storing corresponding primary key in the database
-
getPrimaryKeyForLoadingEntity
- Parameters:
metaClass
- of entity- Returns:
- metaProperty name for loading entity from database by primary key stored in the database
-
getPrimaryKeyForLoadingEntityFromLink
- Parameters:
metaClass
- of entity- Returns:
- metaProperty name for loading entity from database by primary key for links
-