Class Entity
- java.lang.Object
-
- net.ssehub.easy.producer.core.persistence.datatypes.Entity
-
public class Entity extends java.lang.ObjectThis 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 voidcreateAttribute(java.lang.String name, java.lang.String parameter)Creates a new attribute for this entity.voidcreateAttributeFileString(java.lang.String name, java.lang.String parameter)Creates a new attribute for this file entity (considering internal conversion conventions).java.lang.StringgetAttributeFileString(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.StringgetAttributeValue(java.lang.String attribute)Returns value of given attribute.voidsetAttributes(java.util.LinkedHashMap<java.lang.String,java.lang.String> attributes)Sets the attribute-map.
-
-
-
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 attributeparameter- 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
nullif 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
nullif 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 attributeparameter- The value of the attribute
-
-