Package io.jmix.core
Interface InstanceNameProvider
- All Known Implementing Classes:
InstanceNameProviderImpl
public interface InstanceNameProvider
Provide instance name and instance name properties.
-
Method Summary
Modifier and TypeMethodDescriptiongetInstanceName
(Object instance) Get entity instance name defined byInstanceName
annotationgetInstanceName
(Object instance, MetaClass metaClass) Gets entity instance name defined byInstanceName
annotation inmetaClass
or its ancestor ifCoreProperties.instanceNameFallbackEnabled
is true.getInstanceName
(Object instance, Class<?> entityClass) Gets entity instance name defined byInstanceName
annotation inentityClass
or its ancestor ifCoreProperties.instanceNameFallbackEnabled
is true.getInstanceNameRelatedProperties
(MetaClass metaClass, boolean useOriginal) Return a collection of properties included into entity's name pattern (seeInstanceName
).
-
Method Details
-
getInstanceName
Get entity instance name defined byInstanceName
annotation- Parameters:
instance
- instance- Returns:
- instance name
-
getInstanceName
Gets entity instance name defined byInstanceName
annotation inmetaClass
or its ancestor ifCoreProperties.instanceNameFallbackEnabled
is true.- Parameters:
instance
- instancemetaClass
- class to get @InstanceName definition from- Returns:
- instance name
- See Also:
-
CoreProperties.instanceNameFallbackEnabled
-
getInstanceName
Gets entity instance name defined byInstanceName
annotation inentityClass
or its ancestor ifCoreProperties.instanceNameFallbackEnabled
is true.- Parameters:
instance
- instanceentityClass
- class to get @InstanceName definition from- Returns:
- instance name
- See Also:
-
CoreProperties.instanceNameFallbackEnabled
-
getInstanceNameRelatedProperties
Return a collection of properties included into entity's name pattern (seeInstanceName
).- Parameters:
metaClass
- entity metaclassuseOriginal
- if true, and if the given metaclass doesn't define aInstanceName
and if it is an extended entity, this method tries to find a name pattern in an original entity- Returns:
- collection of the name pattern properties
-