Class Entity


  • public class Entity
    extends java.lang.Object
    This class represents the entities for the persistency data-model.
    Since:
    25.08.2011
    Author:
    Kapeluch
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.LinkedHashMap<java.lang.String,​java.lang.String> attributes  
    • Constructor Summary

      Constructors 
      Constructor Description
      Entity()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createAttribute​(java.lang.String name, java.lang.String parameter)
      Creates a new attribute for this entity.
      void createAttributeFileString​(java.lang.String name, java.lang.String parameter)
      Creates a new attribute for this file entity (considering internal conversion conventions).
      java.lang.String getAttributeFileString​(java.lang.String attribute)
      Returns the value of a given attribute as file string (considering internal conversion conventions).
      java.util.LinkedHashMap<java.lang.String,​java.lang.String> getAttributes()
      Returns the attribute-map.
      java.lang.String getAttributeValue​(java.lang.String attribute)
      Returns value of given attribute.
      void setAttributes​(java.util.LinkedHashMap<java.lang.String,​java.lang.String> attributes)
      Sets the attribute-map.
      • Methods inherited from class java.lang.Object

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

      • attributes

        private java.util.LinkedHashMap<java.lang.String,​java.lang.String> attributes
    • Constructor Detail

      • Entity

        public Entity()
        Default constructor.
    • Method Detail

      • createAttribute

        public void createAttribute​(java.lang.String name,
                                    java.lang.String parameter)
        Creates a new attribute for this entity.
        Parameters:
        name - The name of the attribute
        parameter - The value of the attribute
      • getAttributes

        public java.util.LinkedHashMap<java.lang.String,​java.lang.String> getAttributes()
        Returns the attribute-map.
        Returns:
        The LinkedHashMap containing all attributes
      • setAttributes

        public void setAttributes​(java.util.LinkedHashMap<java.lang.String,​java.lang.String> attributes)
        Sets the attribute-map.
        Parameters:
        attributes - The attribute-map as LinkedHashMap
      • getAttributeValue

        public java.lang.String getAttributeValue​(java.lang.String attribute)
        Returns value of given attribute.
        Parameters:
        attribute - The name of the attribute which value should be returned
        Returns:
        The value of the attribute or null if the specified attribute does not exist.
      • getAttributeFileString

        public java.lang.String getAttributeFileString​(java.lang.String attribute)
        Returns the value of a given attribute as file string (considering internal conversion conventions).
        Parameters:
        attribute - the attribute to return
        Returns:
        The value of the attribute or null if the specified attribute does not exist.
      • createAttributeFileString

        public void createAttributeFileString​(java.lang.String name,
                                              java.lang.String parameter)
        Creates a new attribute for this file entity (considering internal conversion conventions).
        Parameters:
        name - The name of the attribute
        parameter - The value of the attribute