Class MetaClassImpl
java.lang.Object
io.jmix.core.metamodel.model.impl.MetadataObjectImpl
io.jmix.core.metamodel.model.impl.MetaClassImpl
- All Implemented Interfaces:
MetaClass,MetadataObject
-
Field Summary
FieldsFields inherited from class io.jmix.core.metamodel.model.impl.MetadataObjectImpl
annotations, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAncestor(MetaClass ancestorClass) protected voidaddDescendant(MetaClass descendantClass) @Nullable MetaPropertyfindProperty(String name) Get MetaProperty by its name.@Nullable MetaClassImmediate ancestor of the object, or null if there is no one.protected @Nullable MetaPropertygetAncestorProperty(MetaProperty ancestorProperty) All ancestors of the metaclass, in order going up from the immediate ancestor.All descendants of the metaclass, recursively.<T> Class<T> getProperty(String name) Get MetaProperty by its name.getPropertyPath(String propertyPath) Returns MetaPropertyPath object, representing path to the property from the current class Note that this method don't take into account extensions(e.g.getStore()protected voidpublishOwnPropertySnapshots(Collection<MetaProperty> ownProperties) protected voidpublishOwnPropertySnapshots(Map<String, MetaProperty> ownProperties) protected voidpublishPropertySnapshots(Collection<MetaProperty> properties) protected voidpublishPropertySnapshots(Map<String, MetaProperty> properties) protected voidprotected voidvoidregisterProperty(MetaProperty metaProperty) voidreplaceHierarchy(List<MetaClass> ancestors, Collection<MetaClass> descendants) Replaces ancestor and descendant relations of the meta class.voidreplaceProperties(Collection<MetaProperty> properties, Collection<MetaProperty> ownProperties) Replaces all resolved and own properties of the meta class.voidsetJavaClass(Class<?> javaClass) voidtoString()voidunregisterProperty(MetaProperty metaProperty) Methods inherited from class io.jmix.core.metamodel.model.impl.MetadataObjectImpl
getAnnotations, getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.jmix.core.metamodel.model.MetadataObject
getAnnotations, getName
-
Field Details
-
ancestors
-
descendants
-
-
Constructor Details
-
MetaClassImpl
-
-
Method Details
-
getAncestor
Description copied from interface:MetaClassImmediate ancestor of the object, or null if there is no one.- Specified by:
getAncestorin interfaceMetaClass
-
getAncestors
Description copied from interface:MetaClassAll ancestors of the metaclass, in order going up from the immediate ancestor.- Specified by:
getAncestorsin interfaceMetaClass
-
getDescendants
Description copied from interface:MetaClassAll descendants of the metaclass, recursively. Order is undefined.- Specified by:
getDescendantsin interfaceMetaClass
-
getSession
- Specified by:
getSessionin interfaceMetaClass- Returns:
- containing MetaModel instance. Null signifies a temporary metaclass, not associated with an entity class.
-
getJavaClass
- Specified by:
getJavaClassin interfaceMetaClass- Returns:
- corresponding Java class
-
getProperties
- Specified by:
getPropertiesin interfaceMetaClass- Returns:
- collection of meta properties owned by this metaclass and all its ancestors.
-
getStore
-
setStore
-
findProperty
Description copied from interface:MetaClassGet MetaProperty by its name.- Specified by:
findPropertyin interfaceMetaClass- Returns:
- MetaProperty instance, or null if no such property found
-
getProperty
Description copied from interface:MetaClassGet MetaProperty by its name.- Specified by:
getPropertyin interfaceMetaClass- Returns:
- MetaProperty instance. Throws exception if not found.
-
getPropertyPath
Description copied from interface:MetaClassReturns MetaPropertyPath object, representing path to the property from the current class Note that this method don't take into account extensions(e.g. Dynamic Attributes add-on) and it returns null in case of not static attributes(attributes from extension). For getting all attributes (including attributes from extensions) useMetadataTools.resolveMetaPropertyPath(MetaClass, String)orMetadataTools.resolveMetaPropertyPathOrNull(MetaClass, String)methods.- Specified by:
getPropertyPathin interfaceMetaClass- Parameters:
propertyPath- dot-separated string- Returns:
- MetaPropertyPath instance, or null if the input parameter doesn't represent a valid path.
-
getOwnProperties
- Specified by:
getOwnPropertiesin interfaceMetaClass- Returns:
- collection of meta properties directly owned by this metaclass.
-
setJavaClass
-
addAncestor
-
registerProperty
-
unregisterProperty
-
toString
-
replaceProperties
public void replaceProperties(Collection<MetaProperty> properties, Collection<MetaProperty> ownProperties) Replaces all resolved and own properties of the meta class.Intended for rebuilding cloned metadata snapshots without mutating published property maps in place.
- Parameters:
properties- all properties visible on the meta classownProperties- properties declared directly on the meta class
-
replaceHierarchy
Replaces ancestor and descendant relations of the meta class.Intended for rebuilding a cloned metadata hierarchy before the new snapshot is published.
- Parameters:
ancestors- ancestor chain of the meta classdescendants- descendant meta classes
-
addDescendant
-
rebuildPropertySnapshots
protected void rebuildPropertySnapshots() -
refreshDescendantSnapshots
protected void refreshDescendantSnapshots() -
getAncestorProperty
-
publishPropertySnapshots
-
publishPropertySnapshots
-
publishOwnPropertySnapshots
-
publishOwnPropertySnapshots
-