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:
-
Field Summary
Fields inherited from class org.pentaho.platform.engine.core.system.PentahoBase
EMPTYLOGID, loggingLevel, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR
Fields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor for HibernateRuntimeElement
(String instId) ConstructorRuntimeElement
(String instId, String parId, String parType) ConstructorRuntimeElement
(String instId, String parId, String parType, String solnId) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
boolean
Uses the instanceId to distinguish equality.void
Gets a BigDecimal property from the paramMap.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.getDateProperty
(String key) Gets a property from the paramMap as a Date, with no default value.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 mapgetListProperty
(String key) Gets a list property from the paramMap.boolean
org.apache.commons.logging.Log
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 mapgetLongProperty
(String key, Long defaultValue) Gets a property from the paramMap as a Long using a default value if it doesn't exist in the mapgetMapProperty
(String key) Gets a map property from the paramMap.getParameterType
(String parameterName) protected Map
protected Map
protected Map
protected Map
protected Map
protected Map
boolean
int
Auto-handled revision mechanism.getStringProperty
(String key) Gets a property from the paramMap as a string with no default value.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.protected Map
int
hashCode()
void
setAllowableAttributeNames
(Collection allowedReadNames) void
setBigDecimalProperty
(String key, BigDecimal value) Sets the BigDecimal property in the paramMap.void
setCreateDate
(Date value) void
setDateProperty
(String key, Date value) Sets a date property in the paramMap.void
setInstanceId
(String instId) void
setListProperty
(String key, List value) Sets a list property in the paramMap.void
setLoaded
(boolean value) void
setLongProperty
(String key, long value) Sets a long property in the paramMap.void
setLongProperty
(String key, Long value) Sets a long property in the paramMap.void
setMapProperty
(String key, Map value) Sets a map property in the paramMap.protected void
setParamMapBD
(Map bd) protected void
setParamMapCPLX
(Map cplx) protected void
setParamMapDT
(Map dt) protected void
setParamMapLong
(Map lng) protected void
setParamMapLS
(Map ls) protected void
setParamMapSS
(Map ss) void
setParentId
(String parentId) void
setParentType
(String parentType) protected void
setPentahoSession
(org.pentaho.platform.api.engine.IPentahoSession sess) void
setReadOnly
(boolean value) protected void
setRevision
(int rev) Sets the revision of the classvoid
setSolutionId
(String solutionId) void
setStringProperty
(String key, String value) Sets a property into the paramMap.protected void
setTypesMap
(Map typesMap) toXML()
Returns an XML representation of the RuntimeElement.Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase
debug, debug, error, error, fatal, fatal, genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getLogId, getObjectName, info, info, setLoggingLevel, setLogId, trace, trace, warn, warn
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pentaho.platform.api.repository.IRuntimeElement
getLoggingLevel
-
Constructor Details
-
RuntimeElement
protected RuntimeElement()Constructor for Hibernate -
RuntimeElement
Constructor- Parameters:
instId
- The Instance Id
-
RuntimeElement
Constructor- Parameters:
instId
- The Instance IdparId
- The Parent IdparType
- The Parent Type
-
RuntimeElement
Constructor- Parameters:
instId
- The Instance IdparId
- The Parent IdparType
- The Parent TypesolnId
- The Solution Id
-
-
Method Details
-
getMessages
-
setPentahoSession
protected void setPentahoSession(org.pentaho.platform.api.engine.IPentahoSession sess) -
getParentId
- Specified by:
getParentId
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Returns:
- Returns the parentId.
-
setParentId
- Specified by:
setParentId
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
parentId
- The parentId to set.
-
getParentType
- Specified by:
getParentType
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Returns:
- Returns the parentType.
-
setParentType
- Specified by:
setParentType
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
parentType
- The parentType to set.
-
getInstanceId
- Specified by:
getInstanceId
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Returns:
- Returns the instanceId.
-
setInstanceId
- Specified by:
setInstanceId
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
instId
- The instanceId to set.
-
getSolutionId
- Specified by:
getSolutionId
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Returns:
- Returns the solutionId.
-
setSolutionId
- Specified by:
setSolutionId
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
solutionId
- The solutionId to set.
-
getRevision
public int getRevision()Auto-handled revision mechanism.- Specified by:
getRevision
in interfaceorg.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
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. -
hashCode
public int hashCode() -
getParamMapSS
-
getParamMapLS
-
getParamMapDT
-
getParamMapBD
-
getParamMapLong
-
getParamMapCPLX
-
setParamMapSS
-
setParamMapLS
-
setParamMapDT
-
setParamMapBD
-
setParamMapLong
-
setParamMapCPLX
-
getCreateDate
-
setCreateDate
-
getStringProperty
Gets a property from the paramMap as a string with no default value.- Specified by:
getStringProperty
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- The key into the map.- Returns:
- The property.
-
getStringProperty
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 interfaceorg.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
-
setStringProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- The key into the map.value
- The value to set.
-
getBigDecimalProperty
Gets a BigDecimal property from the paramMap.- Specified by:
getBigDecimalProperty
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMap.- Returns:
- BigDecimal property
-
getBigDecimalProperty
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 interfaceorg.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
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMap.value
- The property value to set.
-
getDateProperty
Gets a property from the paramMap as a Date, with no default value.- Specified by:
getDateProperty
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMap- Returns:
- The property in the map.
-
getDateProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMapdefaultValue
- The default value if the property doesn't exist in the paramMap.- Returns:
- The property in the map.
-
setDateProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMapvalue
- The property value to set.
-
getLongProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMapdefaultValue
- The default value if the property doesn't exist in the paramMap.- Returns:
- The property in the map.
-
getLongProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMapdefaultValue
- The default value if the property doesn't exist in the paramMap.- Returns:
- The property in the map.
-
setLongProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMapvalue
- The property value to set.
-
setLongProperty
Sets a long property in the paramMap.- Specified by:
setLongProperty
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the paramMapvalue
- The property value to set.
-
getListProperty
Gets a list property from the paramMap.- Specified by:
getListProperty
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- Key in the map- Returns:
- The list property in the paramMap.
-
getMapProperty
Gets a map property from the paramMap.- Specified by:
getMapProperty
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- The key in the map- Returns:
- The map value in the paramMap.
-
setListProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- The key in the map.value
- The list property to set.
-
setMapProperty
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 interfaceorg.pentaho.platform.api.repository.IRuntimeElement
- Parameters:
key
- The key in the map.value
- The map property to set.
-
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 interfaceorg.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 classorg.pentaho.platform.engine.core.system.PentahoBase
-
setAllowableAttributeNames
- Specified by:
setAllowableAttributeNames
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
-
getTypesMap
- Returns:
- Returns the typesMap.
-
setTypesMap
- Parameters:
typesMap
- The typesMap to set.
-
getParameterNames
- Specified by:
getParameterNames
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
-
getParameterType
- Specified by:
getParameterType
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
-
setLoaded
public void setLoaded(boolean value) - Specified by:
setLoaded
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
-
getLoaded
public boolean getLoaded()- Specified by:
getLoaded
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
-
getReadOnly
public boolean getReadOnly() -
setReadOnly
public void setReadOnly(boolean value) -
forceSave
public void forceSave()- Specified by:
forceSave
in interfaceorg.pentaho.platform.api.repository.IRuntimeElement
-