Package io.jmix.core.impl
Class InstanceNameProviderImpl
java.lang.Object
io.jmix.core.impl.InstanceNameProviderImpl
- All Implemented Interfaces:
InstanceNameProvider
@Component("core_InstanceNameProvider")
public class InstanceNameProviderImpl
extends Object
implements InstanceNameProvider
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DatatypeRegistryprotected ExtendedEntitiesprotected com.google.common.cache.LoadingCache<MetaClass,Optional<InstanceNameProviderImpl.InstanceNameRec>> protected Messagesprotected Metadataprotected MetadataToolsprotected MethodArgumentsProviderprotected ContextArgumentResolverComposite -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstanceName(Object instance) Get entity instance name defined byInstanceNameannotationprotected Collection<MetaProperty>getInstanceNameProperties(MetaClass metaClass, Method nameMethod, MetaProperty nameProperty) getInstanceNameRelatedProperties(MetaClass metaClass, boolean useOriginal) Return a collection of properties included into entity's name pattern (seeInstanceName).parseNamePattern(MetaClass metaClass) voidsetResolvers(ContextArgumentResolverComposite resolvers)
-
Field Details
-
metadata
-
extendedEntities
-
datatypeRegistry
-
messages
-
metadataTools
-
resolvers
-
methodArgumentsProvider
-
instanceNameRecCache
protected com.google.common.cache.LoadingCache<MetaClass,Optional<InstanceNameProviderImpl.InstanceNameRec>> instanceNameRecCache
-
-
Constructor Details
-
InstanceNameProviderImpl
public InstanceNameProviderImpl()
-
-
Method Details
-
getResolvers
-
setResolvers
-
getInstanceName
Description copied from interface:InstanceNameProviderGet entity instance name defined byInstanceNameannotation- Specified by:
getInstanceNamein interfaceInstanceNameProvider- Parameters:
instance- instance- Returns:
- instance name
-
getInstanceNameRelatedProperties
public Collection<MetaProperty> getInstanceNameRelatedProperties(MetaClass metaClass, boolean useOriginal) Description copied from interface:InstanceNameProviderReturn a collection of properties included into entity's name pattern (seeInstanceName).- Specified by:
getInstanceNameRelatedPropertiesin interfaceInstanceNameProvider- Parameters:
metaClass- entity metaclassuseOriginal- if true, and if the given metaclass doesn't define aInstanceNameand 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
-
getInstanceNameProperties
protected Collection<MetaProperty> getInstanceNameProperties(MetaClass metaClass, @Nullable Method nameMethod, @Nullable MetaProperty nameProperty) -
parseNamePattern
-