Class Entity

    • Field Detail

      • concrete

        protected boolean concrete
      • instantiable

        protected boolean instantiable
      • standalone

        protected boolean standalone
      • topLevel

        protected boolean topLevel
      • role

        protected boolean role
      • user

        protected boolean user
      • mnemonicSlot

        protected String mnemonicSlot
      • disabledActions

        protected Map<String,​String> disabledActions
        A map of disabled action names -> reasons.
      • orderedDataElements

        protected List<String> orderedDataElements
    • Constructor Detail

      • Entity

        public Entity()
    • Method Detail

      • getDisabledActions

        public Map<String,​String> getDisabledActions()
        Returns the map of names of disabled actions and optionally reasons for the disablement. For instance, checkout should be disabled while the shopping cart is empty.
      • getEntityNamespace

        public String getEntityNamespace()
      • getSuperTypes

        public Collection<TypeRef> getSuperTypes()
        Entities may be derived from other entities.
      • getMnemonicSlot

        public String getMnemonicSlot()
        Returns the name of the property or relationship to be used to identify instances of this entity. For instance, for a Person, "fullName" may be a good choice.
      • isConcrete

        public boolean isConcrete()
        Only concrete entities may be instantiated.
      • isStandalone

        public boolean isStandalone()
        Returns whether this entity is standalone. An entity is standalone if it has no required container references.
      • isTopLevel

        public boolean isTopLevel()
        Returns whether this entity is top-level. An entity is top-level if:
        • it is standalone
        • or is explicitly annotated as top-level or at least one super type is a top-level class
        Returns:
        true if the given class corresponds to a top-level entity, false otherwise
      • setConcrete

        public void setConcrete​(boolean concrete)
      • setDisabledActions

        public void setDisabledActions​(Map<String,​String> disabledActions)
      • setOperations

        public void setOperations​(List<Operation> operations)
      • setProperties

        public void setProperties​(List<Property> properties)
      • setRelationships

        public void setRelationships​(List<Relationship> entityRelationships)
      • setStandalone

        public void setStandalone​(boolean standalone)
      • setTopLevel

        public void setTopLevel​(boolean topLevel)
      • isRole

        public boolean isRole()
        Does this entity represent a user role in the system?
      • setRole

        public void setRole​(boolean role)
      • isUser

        public boolean isUser()
        Does this entity repesent a user entity in the system?
      • setUser

        public void setUser​(boolean user)
      • setMnemonicSlot

        public void setMnemonicSlot​(String mnemonicSlot)
      • setInstantiable

        public void setInstantiable​(boolean instantiable)
      • isInstantiable

        public boolean isInstantiable()
        One reason entities may not be instantiatable is that they are not concrete. Another may that they can only be created via actions on other instances.
      • getOrderedDataElements

        public List<String> getOrderedDataElements()
        The lists of names of data elements, in the order they should be presented to users.
      • setOrderedDataElements

        public void setOrderedDataElements​(List<String> orderedDataElements)