Interface IMetaObject


public interface IMetaObject
Represents an entity in the domain model. Current names are used in javadoc, even though the classes are still named after legacy objects for compatibility reasons.
  • MetaObject refers to an entity
  • SuperObject refers to a generalization
  • SubObject refers to an entity that has a generalization
  • MetaPrimitive refers to a attribute
  • Member refers to an attribute as well
  • NonVirtual refers to a stored attribute
  • Virtual refers to a calculated attribute
  • DataValidations refers to a validation rule
  • Method Details Link icon

    • getModuleName Link icon

      String getModuleName()
      Returns the name of the module in which this entity is declared.
      Returns:
      the module name
    • getName Link icon

      String getName()
      Returns the name of the entity.
      Returns:
      the entity name
    • getSuperName Link icon

      String getSuperName()
      Returns the name of the direct generalizations of this entity (if any).
      Returns:
      the name of the generalization if it exists, null otherwise
    • getSuperObject Link icon

      IMetaObject getSuperObject()
      Returns the (direct) generalization of this entity if it exists.
      Returns:
      the generalization if it exists, null otherwise
    • getSuperObjects Link icon

      List<? extends IMetaObject> getSuperObjects()
      Returns all generalizations of this entity. All generalizations are returned, including generalizations of generalizations.
      Returns:
      all generalizations or an empty list if no generalizations exists
    • getSubObjects Link icon

      List<? extends IMetaObject> getSubObjects()
      Returns all entities that have declared this entity as a generalization, either directly or indirectly through other generalizations.
      Returns:
      all entities that generalize from this entity or an empty list if none exist
    • isSubClassOf Link icon

      default boolean isSubClassOf(IMetaObject superObject)
      Returns whether this entity has the specified entity as a generalization, either directly or indirectly through other generalizations. Note that an entity is also considered a sub-class of itself.
      Parameters:
      superObject - the entity to check
      Returns:
      true if the specified entity is a generalization, false otherwise
    • isSubClassOf Link icon

      boolean isSubClassOf(String superObject)
      Returns whether this entity has the specified entity as a generalization, either directly or indirectly through other generalizations. Note that an entity is also considered a sub-class of itself.
      Parameters:
      superObject - name of the entity to check
      Returns:
      true if the specified entity is a generalization, false otherwise
    • isPersistable Link icon

      Boolean isPersistable()
      Returns whether this entity is persistable (i.e. storeable in the Mendix database).
      Returns:
      true if this entity is persistable, false otherwise
    • hasCreatedDateAttr Link icon

      boolean hasCreatedDateAttr()
      Returns whether this entity has a 'createdDate' system member.
      Returns:
      true if this entity has a 'createdDate' member, false otherwise
    • hasChangedDateAttr Link icon

      boolean hasChangedDateAttr()
      Returns whether this entity has a 'changedDate' system member.
      Returns:
      true if this entity has a 'changedDate' member, false otherwise
    • hasOwnerAttr Link icon

      boolean hasOwnerAttr()
      Returns whether this entity has an 'owner' system member.
      Returns:
      true if this entity has an 'owner' member, false otherwise
    • hasChangedByAttr Link icon

      boolean hasChangedByAttr()
      Returns whether this entity has a 'changedBy' system member.
      Returns:
      true if this entity has a 'changedBy' member, false otherwise
    • getMetaPrimitives Link icon

      Collection<? extends IMetaPrimitive> getMetaPrimitives()
      Returns all attributes of this entity. All attributes are returned: those declared in the entity itself as well as those declared in generalizations (if any). An attribute exists for each primitive value that is defined in an entity.
      Returns:
      all attributes, including those declared in generalizations
    • getMetaPrimitive Link icon

      IMetaPrimitive getMetaPrimitive(String name)
      Returns the attribute with the specified name. The attribute can either be declared in this entity or in a generalization (if any).
      Parameters:
      name - the name of the attribute to return
      Returns:
      the attribute for the given name if it exists in this entity or one of its generalizations, null otherwise
    • getDeclaredMetaPrimitives Link icon

      Collection<? extends IMetaPrimitive> getDeclaredMetaPrimitives()
      Returns all attributes that are declared in this entity. Only attributes declared in the entity itself are returned, attributes declared in generalizations (if any) are not returned.
      Returns:
      all attributes that are declared in this entity, excluding attributes declared in generalizations
    • getNonVirtualDeclaredMetaPrimitives Link icon

      Collection<? extends IMetaPrimitive> getNonVirtualDeclaredMetaPrimitives()
      Returns all stored (non-virtual) attributes of this entity. Only attributes declared in the entity itself are returned, attributes declared in generalizations (if any) are not returned.
      Returns:
      all stored attributes that are declared in this entity, excluding attributes declared in generalizations
    • getDeclaredMetaPrimitive Link icon

      IMetaPrimitive getDeclaredMetaPrimitive(String name)
      Returns the attribute with the specified name. The attribute must declared in this entity, not in a generalization (if any).
      Parameters:
      name - the name of the attribute to return
      Returns:
      the attribute for the given name if it exists and is declared in the entity itself, null otherwise
    • getMetaAssociationsChild Link icon

      Collection<? extends IMetaAssociation> getMetaAssociationsChild()
      Returns all associations where this entity is a child. All associations are returned: those declared in the entity itself as well as those declared in generalizations (if any).
      Returns:
      all child associations, including those declared in generalizations
    • getMetaAssociationChild Link icon

      IMetaAssociation getMetaAssociationChild(String name)
      Returns the association with the specified name where this entity is a child. The association can either be declared in this entity or in a generalization (if any).
      Parameters:
      name - the name of the association to return
      Returns:
      the child association for the given name if it exists in this entity or one of its generalizations, null otherwise
    • getMetaAssociationsParent Link icon

      Collection<? extends IMetaAssociation> getMetaAssociationsParent()
      Returns all associations where this entity is a parent. All associations are returned: those declared in the entity itself as well as those declared in generalizations (if any).
      Returns:
      all parent associations, including those declared in generalizations
    • getMetaAssociationParent Link icon

      IMetaAssociation getMetaAssociationParent(String name)
      Returns the association with the specified name where this entity is a parent. The association can either be declared in this entity or in a generalization (if any).
      Parameters:
      name - the name of the association to return
      Returns:
      the parent association for the given name if it exists in this entity or one of its generalizations, null otherwise
    • getDeclaredMetaAssociationsChild Link icon

      Collection<? extends IMetaAssociation> getDeclaredMetaAssociationsChild()
      Returns all associations where this entity is a child. Only associations declared in the entity itself are returned, associations declared in generalizations (if any) are not returned.
      Returns:
      all child associations that are declared in this entity, excluding associations declared in generalizations
    • getDeclaredMetaAssociationChild Link icon

      IMetaAssociation getDeclaredMetaAssociationChild(String name)
      Returns the association with the specified name where this entity is a child. The association must be declared in this entity, not in a generalization (if any).
      Parameters:
      name - the name of the association to return
      Returns:
      the child association for the given name if it exists and is declared in the entity itself, null otherwise
    • getDeclaredMetaAssociationsParent Link icon

      Collection<? extends IMetaAssociation> getDeclaredMetaAssociationsParent()
      Returns all associations where this entity is a parent. Only associations declared in the entity itself are returned, associations declared in generalizations (if any) are not returned.
      Returns:
      all parent associations that are declared in this entity, excluding associations declared in generalizations
    • getDeclaredMetaAssociationParent Link icon

      IMetaAssociation getDeclaredMetaAssociationParent(String name)
      Returns the association with the specified name where this entity is a parent. The association must be declared in this entity, not in a generalization (if any).
      Parameters:
      name - the name of the association to return
      Returns:
      the parent association for the given name if it exists and is declared in the entity itself, null otherwise
    • getDataValidations Link icon

      List<? extends IDataValidation> getDataValidations()
      Returns all validation rules that are defined for this entity.
      Returns:
      all validation rules or an empty list if none exist
    • getDataValidationsByMember Link icon

      List<? extends IDataValidation> getDataValidationsByMember(String memberName)
      Returns all validation rules that are defined for the specified attribute.
      Parameters:
      memberName - the name of the attribute to return validations rules for
      Returns:
      all validation rules for the given attribute or an empty list if none exist
    • getIndices Link icon

      List<? extends IMetaObjectIndex> getIndices()
      Returns all indices that are defined for this entity.
      Returns:
      the indices or an empty list if none exist
    • getMetaObjectAccesses Link icon

      List<? extends IMetaObjectAccess> getMetaObjectAccesses()
      Returns all access rules that apply to this entity.
      Returns:
      all access rules or an empty list if none apply
    • getMetaObjectAccessesWithoutXPath Link icon

      List<? extends IMetaObjectAccess> getMetaObjectAccessesWithoutXPath(IContext context)
      Returns the access rules with XPath constraints for the specified context that apply to this entity. Only those rules are returned that apply to the user roles of the specified context.
      Parameters:
      context - the context to use for filtering the security rules
      Returns:
      the applicable access rules that have XPath constraints or an empty list if none apply
    • getMetaObjectAccessesWithXPath Link icon

      List<? extends IMetaObjectAccess> getMetaObjectAccessesWithXPath(IContext context)
      Returns the security rules (access control lists) for the specified context that apply to this entity. Only those rules are returned that apply to the user roles of the specified context.
      Parameters:
      context - the context to use for filtering the security rules
      Returns:
      the applicable access rules that have no XPath constraints or an empty list if none apply
    • getModelGUID Link icon

      UUID getModelGUID()
      Returns the identifier of the modeled entity which is the base of this meta object.
      Returns:
      the identifier of the modeled entity
    • getId Link icon

      @Deprecated short getId()
      Deprecated.
      since 9.24. This method was exposed for internal purposes. There is no replacement.
      Returns the (short) identifier of the meta object, generated by the connection bus (database connection). Each meta object has a unique identifier that is used in client communication.
      Returns:
      the identifier
    • isRemote Link icon

      boolean isRemote()
      Returns whether this entity exists somewhere else than in the database (or in the client in case of non-persistable entities).
      Returns:
      true if this entity needs to be stored and retrieved from a non-local source, false otherwise
    • isRemoteFileEntity Link icon

      boolean isRemoteFileEntity()
      Returns whether this entity is a remote file entity and contains a binary attribute.
      Returns:
      true if this entity is a remote file entity and contains a binary attribute, false otherwise
    • hasMetaDataAccess Link icon

      boolean hasMetaDataAccess(IContext context)
      Returns whether the specified context can access meta-data for this entity.
      Parameters:
      context - the context to check
      Returns:
      true if the context has meta-data access, false otherwise
    • isUser Link icon

      boolean isUser()
      Returns whether this entity is a (system) user entity.
      Returns:
      true if the entity is a user, false otherwise
    • isFileDocument Link icon

      boolean isFileDocument()
      Returns whether this entity is a file document entity.
      Returns:
      true if the entity is a file document, false otherwise