Class RuntimeElement

java.lang.Object
org.pentaho.platform.engine.core.system.PentahoBase
org.pentaho.platform.repository.runtime.RuntimeElement
All Implemented Interfaces:
Serializable, org.pentaho.platform.api.engine.ILogger, org.pentaho.platform.api.repository.IRuntimeElement

public class RuntimeElement extends org.pentaho.platform.engine.core.system.PentahoBase implements org.pentaho.platform.api.repository.IRuntimeElement
See Also:
  • Constructor Details

    • RuntimeElement

      protected RuntimeElement()
      Constructor for Hibernate
    • RuntimeElement

      public RuntimeElement(String instId)
      Constructor
      Parameters:
      instId - The Instance Id
    • RuntimeElement

      public RuntimeElement(String instId, String parId, String parType)
      Constructor
      Parameters:
      instId - The Instance Id
      parId - The Parent Id
      parType - The Parent Type
    • RuntimeElement

      public RuntimeElement(String instId, String parId, String parType, String solnId)
      Constructor
      Parameters:
      instId - The Instance Id
      parId - The Parent Id
      parType - The Parent Type
      solnId - The Solution Id
  • Method Details

    • getMessages

      public List getMessages()
    • setPentahoSession

      protected void setPentahoSession(org.pentaho.platform.api.engine.IPentahoSession sess)
    • getParentId

      public String getParentId()
      Specified by:
      getParentId in interface org.pentaho.platform.api.repository.IRuntimeElement
      Returns:
      Returns the parentId.
    • setParentId

      public void setParentId(String parentId)
      Specified by:
      setParentId in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      parentId - The parentId to set.
    • getParentType

      public String getParentType()
      Specified by:
      getParentType in interface org.pentaho.platform.api.repository.IRuntimeElement
      Returns:
      Returns the parentType.
    • setParentType

      public void setParentType(String parentType)
      Specified by:
      setParentType in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      parentType - The parentType to set.
    • getInstanceId

      public String getInstanceId()
      Specified by:
      getInstanceId in interface org.pentaho.platform.api.repository.IRuntimeElement
      Returns:
      Returns the instanceId.
    • setInstanceId

      public void setInstanceId(String instId)
      Specified by:
      setInstanceId in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      instId - The instanceId to set.
    • getSolutionId

      public String getSolutionId()
      Specified by:
      getSolutionId in interface org.pentaho.platform.api.repository.IRuntimeElement
      Returns:
      Returns the solutionId.
    • setSolutionId

      public void setSolutionId(String solutionId)
      Specified by:
      setSolutionId in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      solutionId - The solutionId to set.
    • getRevision

      public int getRevision()
      Auto-handled revision mechanism.
      Specified by:
      getRevision in interface org.pentaho.platform.api.repository.IRuntimeElement
      Returns:
      The current revision
    • setRevision

      protected void setRevision(int rev)
      Sets the revision of the class
      Parameters:
      rev - New revision to set.
    • equals

      public boolean equals(Object other)
      Uses the instanceId to distinguish equality. The instanceId will never be null, won't change, and is the primary key. Therefore, it's the perfect candidate for equals() and hashcode.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getParamMapSS

      protected Map getParamMapSS()
    • getParamMapLS

      protected Map getParamMapLS()
    • getParamMapDT

      protected Map getParamMapDT()
    • getParamMapBD

      protected Map getParamMapBD()
    • getParamMapLong

      protected Map getParamMapLong()
    • getParamMapCPLX

      protected Map getParamMapCPLX()
    • setParamMapSS

      protected void setParamMapSS(Map ss)
    • setParamMapLS

      protected void setParamMapLS(Map ls)
    • setParamMapDT

      protected void setParamMapDT(Map dt)
    • setParamMapBD

      protected void setParamMapBD(Map bd)
    • setParamMapLong

      protected void setParamMapLong(Map lng)
    • setParamMapCPLX

      protected void setParamMapCPLX(Map cplx)
    • getCreateDate

      public Date getCreateDate()
    • setCreateDate

      public void setCreateDate(Date value)
    • getStringProperty

      public String getStringProperty(String key)
      Gets a property from the paramMap as a string with no default value.
      Specified by:
      getStringProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - The key into the map.
      Returns:
      The property.
    • getStringProperty

      public String getStringProperty(String key, String defaultValue)
      Gets a property from the paramMap as a string, using a default value if it doesn't exist in the map.
      Specified by:
      getStringProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - The key into the map.
      defaultValue - Default value returned if the key isn't already in the map.
      Returns:
      The property.
    • checkType

      protected void checkType(String key, String type, boolean setIt)
    • setStringProperty

      public void setStringProperty(String key, String value)
      Sets a property into the paramMap. Special implementation note - Null values aren't supported in the Map. So, if a null value is passed in, this implementation will remove the entry from the map.
      Specified by:
      setStringProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - The key into the map.
      value - The value to set.
    • getBigDecimalProperty

      public BigDecimal getBigDecimalProperty(String key)
      Gets a BigDecimal property from the paramMap.
      Specified by:
      getBigDecimalProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap.
      Returns:
      BigDecimal property
    • getBigDecimalProperty

      public BigDecimal getBigDecimalProperty(String key, BigDecimal defaultValue)
      Gets a property from the paramMap as a BigDecimal, using a default value if it doesn't exist in the map.
      Specified by:
      getBigDecimalProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap.
      defaultValue - Detault value if the property doesn't exist in the paramMap.
      Returns:
      Returns the property from the paramMap.
    • setBigDecimalProperty

      public void setBigDecimalProperty(String key, BigDecimal value)
      Sets the BigDecimal property in the paramMap. Special implementation note - Null values aren't supported in the Map. So, if a null value is passed in, this implementation will remove the entry from the map.
      Specified by:
      setBigDecimalProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap.
      value - The property value to set.
    • getDateProperty

      public Date getDateProperty(String key)
      Gets a property from the paramMap as a Date, with no default value.
      Specified by:
      getDateProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap
      Returns:
      The property in the map.
    • getDateProperty

      public Date getDateProperty(String key, Date defaultValue)
      Gets a property from the paramMap as a Date using a default value if it doesn't exist in the map
      Specified by:
      getDateProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap
      defaultValue - The default value if the property doesn't exist in the paramMap.
      Returns:
      The property in the map.
    • setDateProperty

      public void setDateProperty(String key, Date value)
      Sets a date property in the paramMap. If null comes in, it removes the value from the map. Special implementation note - Null values aren't supported in the Map. So, if a null value is passed in, this implementation will remove the entry from the map.
      Specified by:
      setDateProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap
      value - The property value to set.
    • getLongProperty

      public Long getLongProperty(String key, Long defaultValue)
      Gets a property from the paramMap as a Long using a default value if it doesn't exist in the map
      Specified by:
      getLongProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap
      defaultValue - The default value if the property doesn't exist in the paramMap.
      Returns:
      The property in the map.
    • getLongProperty

      public long getLongProperty(String key, long defaultValue)
      Gets a property from the paramMap as a long using a default value if it doesn't exist in the map
      Specified by:
      getLongProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap
      defaultValue - The default value if the property doesn't exist in the paramMap.
      Returns:
      The property in the map.
    • setLongProperty

      public void setLongProperty(String key, Long value)
      Sets a long property in the paramMap. If null comes in, it removes the value from the map. Special implementation note - Null values aren't supported in the Map. So, if a null value is passed in, this implementation will remove the entry from the map.
      Specified by:
      setLongProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap
      value - The property value to set.
    • setLongProperty

      public void setLongProperty(String key, long value)
      Sets a long property in the paramMap.
      Specified by:
      setLongProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the paramMap
      value - The property value to set.
    • getListProperty

      public List getListProperty(String key)
      Gets a list property from the paramMap.
      Specified by:
      getListProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - Key in the map
      Returns:
      The list property in the paramMap.
    • getMapProperty

      public Map getMapProperty(String key)
      Gets a map property from the paramMap.
      Specified by:
      getMapProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - The key in the map
      Returns:
      The map value in the paramMap.
    • setListProperty

      public void setListProperty(String key, List value)
      Sets a list property in the paramMap. Special implementation note - Null values aren't supported in the Map. So, if a null value is passed in, this implementation will remove the entry from the map.
      Specified by:
      setListProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - The key in the map.
      value - The list property to set.
    • setMapProperty

      public void setMapProperty(String key, Map value)
      Sets a map property in the paramMap. Special implementation note - Null values aren't supported in the Map. So, if a null value is passed in, this implementation will remove the entry from the map.
      Specified by:
      setMapProperty in interface org.pentaho.platform.api.repository.IRuntimeElement
      Parameters:
      key - The key in the map.
      value - The map property to set.
    • toXML

      public String toXML()
      Returns an XML representation of the RuntimeElement. Mainly for Debug/Test Cases to make sure that what goes in is what comes out during tests.
      Specified by:
      toXML in interface org.pentaho.platform.api.repository.IRuntimeElement
      Returns:
      Returns an XML representation of the RuntimeElement
    • getLogger

      public org.apache.commons.logging.Log getLogger()
      Specified by:
      getLogger in class org.pentaho.platform.engine.core.system.PentahoBase
    • setAllowableAttributeNames

      public void setAllowableAttributeNames(Collection allowedReadNames)
      Specified by:
      setAllowableAttributeNames in interface org.pentaho.platform.api.repository.IRuntimeElement
    • getTypesMap

      protected Map getTypesMap()
      Returns:
      Returns the typesMap.
    • setTypesMap

      protected void setTypesMap(Map typesMap)
      Parameters:
      typesMap - The typesMap to set.
    • getParameterNames

      public Set getParameterNames()
      Specified by:
      getParameterNames in interface org.pentaho.platform.api.repository.IRuntimeElement
    • getParameterType

      public String getParameterType(String parameterName)
      Specified by:
      getParameterType in interface org.pentaho.platform.api.repository.IRuntimeElement
    • setLoaded

      public void setLoaded(boolean value)
      Specified by:
      setLoaded in interface org.pentaho.platform.api.repository.IRuntimeElement
    • getLoaded

      public boolean getLoaded()
      Specified by:
      getLoaded in interface org.pentaho.platform.api.repository.IRuntimeElement
    • getReadOnly

      public boolean getReadOnly()
    • setReadOnly

      public void setReadOnly(boolean value)
    • forceSave

      public void forceSave()
      Specified by:
      forceSave in interface org.pentaho.platform.api.repository.IRuntimeElement