psdi.common.erm

Class ERMEntity

  • java.lang.Object
    • psdi.common.erm.ERMEntity
  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    UIERMEntity


    public class ERMEntity
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ERMEntity() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      ERMAttribute addAttribute(ERMAttribute attribute)
      Adds and ERMAttribute the the entity's attribute list.
      void addChildEntity(java.lang.String name, ERMEntity entity)
      This method adds a related entity (child) entity to this entity with a specified name.
      void cleanup() 
      ERMAttribute getAttribute(java.lang.String attributeName)
      Returns the ERMAttribute associated with the passed in Attribute
      java.util.Collection getAttributes()
      Returns an unmodifiable collection of ERMAttributes for this Entity.
      java.util.Collection getChildEntities()
      Returns a list of all child Entities to this entity.
      ERMEntity getChildEntity(java.lang.String name)
      Returns the child entity by name.
      java.lang.String getName()
      Returns the name of this Entity.
      ERMEntity getParentEntity()
      Returns the parent ERMEntity for this entity
      ERMEntity getRelatedEntity(java.lang.String relationship)
      Returns the child entity whose Mbo relationship is the same as the relationship passed in.
      void setName(java.lang.String name)
      Sets the name of the entity
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ERMEntity

        public ERMEntity()
    • Method Detail

      • getAttributes

        public java.util.Collection getAttributes()
        Returns an unmodifiable collection of ERMAttributes for this Entity.
        Returns:
        A collection of all the attributes for this Entity.
      • getAttribute

        public ERMAttribute getAttribute(java.lang.String attributeName)
        Returns the ERMAttribute associated with the passed in Attribute
        Parameters:
        attributeName -
        Returns:
        the ERMAttribute for the attribute
      • addAttribute

        public ERMAttribute addAttribute(ERMAttribute attribute)
        Adds and ERMAttribute the the entity's attribute list.
        Parameters:
        attribute - The ERMAttribute to add to the list
        Returns:
        returns the replaced attribute if one existed
      • getChildEntities

        public java.util.Collection getChildEntities()
        Returns a list of all child Entities to this entity.
        Returns:
        A List of all child Entities.
      • addChildEntity

        public void addChildEntity(java.lang.String name,
                                   ERMEntity entity)
        This method adds a related entity (child) entity to this entity with a specified name.
        Parameters:
        name - The name of the child entity
        entity - The child ERMEntity to add to this entity
      • getChildEntity

        public ERMEntity getChildEntity(java.lang.String name)
        Returns the child entity by name. This method does not necessarily find the entity by mbo relationship name. If you want to find the child/related entity by the relationship use the getRelatedEntity method.
        Parameters:
        name - The name of the child entity you are looking for
        Returns:
        The ERMEntity that goes by that name.
      • getRelatedEntity

        public ERMEntity getRelatedEntity(java.lang.String relationship)
        Returns the child entity whose Mbo relationship is the same as the relationship passed in. This method does not necessarily find the entity by entity name. If you want to find the child/related entity by entity name use the getChildEntity method.
        Parameters:
        relationship - The mbo relationship of the child entity you are looking for
        Returns:
        The ERMEntity that uses that mbo relationship or null if there isn't a child with using that relationship.
      • getName

        public java.lang.String getName()
        Returns the name of this Entity.
        Returns:
        The name of this Entity.
      • setName

        public void setName(java.lang.String name)
        Sets the name of the entity
        Parameters:
        name - the name of the entity
      • getParentEntity

        public ERMEntity getParentEntity()
        Returns the parent ERMEntity for this entity
      • cleanup

        public void cleanup()