Interface IMendixObject


public interface IMendixObject
Represents an entity (IMetaObject) instance.
  • Method Details

    • getMembers

      Map<String,? extends IMendixObjectMember<?>> getMembers(IContext context)
      Returns a HashMap with all members of this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the map with all members
    • getChangedMembers

      List<? extends IMendixObjectMember<?>> getChangedMembers(IContext context)
      Returns a list with all members of this object that changed since creation, retrieval or commit.
      Parameters:
      context - the context for accessing the object
      Returns:
      the list with all changed members
    • getReferences

      List<? extends MendixObjectReference> getReferences(IContext context)
      Returns a list with all 'to-one' association members of this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the list with all MendixObjectReferences
    • getReferenceSets

      List<? extends MendixObjectReferenceSet> getReferenceSets(IContext context)
      Returns a list with all 'to-many' association members of this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the list with all MendixObjectReferenceSets
    • getPrimitives

      List<? extends IMendixObjectMember<?>> getPrimitives(IContext context)
      Returns a list with all primitive (non-association) members of this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the list with all primitive members
    • getVirtualMembers

      Map<String,? extends IMendixObjectMember<?>> getVirtualMembers(IContext context)
      Returns a HashMap with all virtual members of this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the map with all virtual members
    • isVirtual

      boolean isVirtual(IContext context, String name)
      Returns whether a certain attribute is virtual.
      Parameters:
      context - the context for accessing the object
      name - the attribute name
      Returns:
      true if the attribute is virtual, false otherwise
    • getType

      String getType()
      Returns the type of this object as a string.
      Returns:
      the type
    • setValue

      void setValue(IContext context, String memberName, Object value)
      Set the value for the member with name memberName.
      Parameters:
      context - the context for accessing the object
      memberName - the name of the member to set
      value - the value to set
    • getValue

      <T> T getValue(IContext context, String memberName)
      Returns the value of the member with memberName.
      Parameters:
      context - the context for accessing the object
      memberName - the name of the member to get
      Returns:
      the value of the member
    • hasMember

      boolean hasMember(String memberName)
      Returns whether this object has a member named memberName.
      Parameters:
      memberName - to name of the member to check
      Returns:
      true if the member exists, false otherwise (security is not checked)
    • getMember

      IMendixObjectMember<?> getMember(IContext context, String memberName)
      Returns the member object with memberName.
      Parameters:
      context - the context for accessing the object
      memberName - the name of the member to get (should exist)
      Returns:
      the MendixObjectMember for the given name
    • getId

      Returns the identifier of this object.
      Returns:
      the id
    • getState

      Returns the object state of this object.
      Returns:
      the object state
    • isChanged

      boolean isChanged()
      Returns whether at least one member of this object has changed since creation, retrieval or commit.
      Returns:
      true if a changed member exists, false otherwise
    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
    • clone

      Returns a deep copy of this object.
      Returns:
      deep clone of this object
      Throws:
      CloneNotSupportedException - when cloning is not supported
    • hasChangedByAttribute

      boolean hasChangedByAttribute()
      Returns whether at least one attribute of this object has changed since creation, retrieval or commit.
      Returns:
      true if a changed attribute exists, false otherwise
    • hasChangedDateAttribute

      boolean hasChangedDateAttribute()
      Returns whether at least one date attribute of this object has changed since creation, retrieval or commit.
      Returns:
      true if a changed date attribute exists, false otherwise
    • hasOwnerAttribute

      boolean hasOwnerAttribute()
      Returns whether at least one owner attribute of this object has changed since creation, retrieval or commit.
      Returns:
      true if a changed owner attribute exists, false otherwise
    • getChangedBy

      IMendixIdentifier getChangedBy(IContext context) throws CoreException
      Returns the Mendix identifier of the last user that changed this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the identifier of the last user that changed this object
      Throws:
      CoreException - if hasChangedByAttribute == false
    • getChangedDate

      Date getChangedDate(IContext context) throws CoreException
      Returns the last Date that changed in this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the last Date that changed
      Throws:
      CoreException - if hasChangedDateAttribute == false
    • getOwner

      IMendixIdentifier getOwner(IContext context) throws CoreException
      Returns the IMendixIdentifier of the user that owns this object.
      Parameters:
      context - the context for accessing the object
      Returns:
      the identifier of the owner
      Throws:
      CoreException - if hasOwnerAttribute == false
    • hasCreatedDateAttribute

      boolean hasCreatedDateAttribute()
      Returns whether this object has a created data attribute.
      Returns:
      true if a created date attribute exists, false otherwise
    • getCreatedDate

      Date getCreatedDate(IContext context) throws CoreException
      Returns the date/time at which this object was created.
      Parameters:
      context - the context for accessing the object
      Returns:
      the creation date
      Throws:
      CoreException - if hasCreatedDateAttribute == false
    • hasNullValues

      boolean hasNullValues(IContext context)
      Returns whether this object contains empty members.
      Parameters:
      context - the context for accessing the object
      Returns:
      true if an empty member exists, false otherwise
    • getMetaObject

      IMetaObject getMetaObject()
      Returns the meta object for this object.
      Returns:
      the meta object
    • hasDeleteRights

      boolean hasDeleteRights(IContext context)
      Returns whether this object has delete rights.
      Parameters:
      context - the context for accessing the object
      Returns:
      true if this object has delete rights, false otherwise
    • isNew

      boolean isNew()
      Returns whether this object has not been committed yet. Only returns true when this object is explicitly committed. If this object is auto-committed, this method returns false.
      Returns:
      true if this object is new, false otherwise