Class MetaPropertyImpl
java.lang.Object
io.jmix.core.metamodel.model.impl.MetadataObjectImpl
io.jmix.core.metamodel.model.impl.MetaPropertyImpl
- All Implemented Interfaces:
MetadataObject
,MetaProperty
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.core.metamodel.model.MetaProperty
MetaProperty.Type
-
Field Summary
Fields inherited from class io.jmix.core.metamodel.model.impl.MetadataObjectImpl
annotations, name
-
Constructor Summary
ConstructorDescriptionMetaPropertyImpl
(MetaPropertyImpl prototype) MetaPropertyImpl
(MetaClass domain, String name) -
Method Summary
Modifier and TypeMethodDescriptionMetadataObject annotations.Class<?>
Class<?>
getRange()
getStore()
getType()
boolean
boolean
void
setAnnotatedElement
(AnnotatedElement annotatedElement) void
setDeclaringClass
(Class<?> declaringClass) void
void
setInverse
(MetaProperty inverse) void
setJavaType
(Class<?> javaType) void
setMandatory
(boolean mandatory) void
void
setReadOnly
(boolean readOnly) void
void
setType
(MetaProperty.Type type) toString()
protected void
withClones
(Consumer<MetaPropertyImpl> consumer) Methods inherited from class io.jmix.core.metamodel.model.impl.MetadataObjectImpl
getName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.jmix.core.metamodel.model.MetadataObject
getName
-
Constructor Details
-
MetaPropertyImpl
-
MetaPropertyImpl
-
-
Method Details
-
getDomain
- Specified by:
getDomain
in interfaceMetaProperty
- Returns:
- MetaClass, containing this MetaProperty.
In case ofReplaceEntity
returns extended meta class.
-
setDomain
-
getInverse
- Specified by:
getInverse
in interfaceMetaProperty
- Returns:
- a MetaProperty from the opposite side of relation, or null if this is not a reference property
-
setInverse
-
getSession
- Specified by:
getSession
in interfaceMetaProperty
- Returns:
- containing MetaModel instance. Null signifies a temporary metaclass, not associated with an entity class.
-
getRange
- Specified by:
getRange
in interfaceMetaProperty
- Returns:
- Range of this property.
-
setRange
-
getAnnotatedElement
- Specified by:
getAnnotatedElement
in interfaceMetaProperty
- Returns:
- corresponding Java field or method as AnnotatedElement object
-
setAnnotatedElement
-
getJavaType
- Specified by:
getJavaType
in interfaceMetaProperty
- Returns:
- Java class of the corresponding field or method's return type
-
setJavaType
-
getDeclaringClass
- Specified by:
getDeclaringClass
in interfaceMetaProperty
- Returns:
- Java class which declares the corresponding field or method
-
getStore
- Specified by:
getStore
in interfaceMetaProperty
-
setStore
-
setDeclaringClass
-
getType
- Specified by:
getType
in interfaceMetaProperty
- Returns:
- property type (DATATYPE, ENUM, ASSOCIATION, COMPOSITION)
-
setType
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatory
in interfaceMetaProperty
- Returns:
- true if the corresponding entity attribute must contain a value
-
setMandatory
public void setMandatory(boolean mandatory) -
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in interfaceMetaProperty
- Returns:
- true if the corresponding entity attribute is read-only
-
setReadOnly
public void setReadOnly(boolean readOnly) -
getAnnotations
Description copied from interface:MetadataObject
MetadataObject annotations. Annotations here are simply name-value pairs, not directly correlated with Java annotations.- Specified by:
getAnnotations
in interfaceMetadataObject
- Overrides:
getAnnotations
in classMetadataObjectImpl
-
withClones
-
toString
-