Interface IMendixObject
public interface IMendixObject
Represents an entity (IMetaObject) instance.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Defines the possible object states. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a deep copy of this object.boolean
getChangedBy
(IContext context) Returns the Mendix identifier of the last user that changed this object.getChangedDate
(IContext context) Returns the last Date that changed in this object.List<? extends IMendixObjectMember<?>>
getChangedMembers
(IContext context) Returns a list with all members of this object that changed since creation, retrieval or commit.getCreatedDate
(IContext context) Returns the date/time at which this object was created.getId()
Returns the identifier of this object.Returns the member object with memberName.Map<String,
? extends IMendixObjectMember<?>> getMembers
(IContext context) Returns a HashMap with all members of this object.Returns the meta object for this object.Returns the IMendixIdentifier of the user that owns this object.List<? extends IMendixObjectMember<?>>
getPrimitives
(IContext context) Returns a list with all primitive (non-association) members of this object.List<? extends MendixObjectReference>
getReferences
(IContext context) Returns a list with all 'to-one' association members of this object.List<? extends MendixObjectReferenceSet>
getReferenceSets
(IContext context) Returns a list with all 'to-many' association members of this object.getState()
Returns the object state of this object.getType()
Returns the type of this object as a string.<T> T
Returns the value of the member with memberName.Map<String,
? extends IMendixObjectMember<?>> getVirtualMembers
(IContext context) Returns a HashMap with all virtual members of this object.boolean
Returns whether at least one attribute of this object has changed since creation, retrieval or commit.boolean
Returns whether at least one date attribute of this object has changed since creation, retrieval or commit.boolean
Returns whether this object has a created data attribute.boolean
hasDeleteRights
(IContext context) Returns whether this object has delete rights.boolean
Returns whether this object has a member named memberName.boolean
hasNullValues
(IContext context) Returns whether this object contains empty members.boolean
Returns whether at least one owner attribute of this object has changed since creation, retrieval or commit.boolean
Returns whether at least one member of this object has changed since creation, retrieval or commit.boolean
isNew()
Returns whether this object has not been committed yet.boolean
Returns whether a certain attribute is virtual.void
Set the value for the member with name memberName.
-
Method Details
-
getMembers
Returns a HashMap with all members of this object.- Parameters:
context
- the context for accessing the object- Returns:
- the map with all members
-
getChangedMembers
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
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
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
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
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
Returns whether a certain attribute is virtual.- Parameters:
context
- the context for accessing the objectname
- 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
Set the value for the member with name memberName.- Parameters:
context
- the context for accessing the objectmemberName
- the name of the member to setvalue
- the value to set
-
getValue
Returns the value of the member with memberName.- Parameters:
context
- the context for accessing the objectmemberName
- the name of the member to get- Returns:
- the value of the member
-
hasMember
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
Returns the member object with memberName.- Parameters:
context
- the context for accessing the objectmemberName
- the name of the member to get (should exist)- Returns:
- the MendixObjectMember for the given name
-
getId
IMendixIdentifier getId()Returns the identifier of this object.- Returns:
- the id
-
getState
IMendixObject.ObjectState 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
-
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
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
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
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
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
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
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
-