com.sapportals.portal.pcd.gl

Class PcdAttributeValueUtil

java.lang.Object
  extended by com.sapportals.portal.pcd.gl.PcdAttributeValueUtil

public final class PcdAttributeValueUtil
extends Object

Utility class for attribute values.

Contains constants that describe value restrictions for attributes in the PCD as well as helper methods.

Due to database compatibility there are restrictions in Double values that can be stored in the Pcd GL.

This class exposes the maximum value MAX_DOUBLE_ATTRIBUTE_VALUE and the minimum value MIN_DOUBLE_ATTRIBUTE_VALUE, which describe the value range that is supported by the Pcd GL. Due to rounding, it�s possible that the Pcd GL returns values that are greater than MAX_DOUBLE_ATTRIBUTE_VALUE or less then MIN_DOUBLE_ATTRIBUTE_VALUE. In future releases these constants may change! However, this will only happen in a way that the range of supported values is increased.

The Pcd GL does not check incoming values against this safe range. Depending on the database being used, values outside this range might be persisted or cause a PcdRuntimeException. Applications that want to be perfectly database vendor independent should check explicitely that their double values fit into the supported interval.

The Pcd GL does not support the values Double.MAX_VALUE, Double.MIN_VALUE, Double.NaN, Double.POSITIVE_INFINITY and Double.NEGATIVE_INFINITY.


Field Summary
static double MAX_DOUBLE_ATTRIBUTE_VALUE
          Maximum double value that can be stored in the database.
static double MIN_DOUBLE_ATTRIBUTE_VALUE
          Minimum double value that can be stored in the database.
 
Method Summary
static double trimDoubleValue(double doubleValue)
          Trims a double value to the supported range of double values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DOUBLE_ATTRIBUTE_VALUE

public static final double MAX_DOUBLE_ATTRIBUTE_VALUE
Maximum double value that can be stored in the database. I future releases this value might increase.

See Also:
Constant Field Values

MIN_DOUBLE_ATTRIBUTE_VALUE

public static final double MIN_DOUBLE_ATTRIBUTE_VALUE
Minimum double value that can be stored in the database. I future releases this value might decrease.

See Also:
Constant Field Values
Method Detail

trimDoubleValue

public static final double trimDoubleValue(double doubleValue)
Trims a double value to the supported range of double values.

Parameters:
doubleValue -
Returns:
double
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS [sap.com] tc/epbc/pcd/pars/srvgldeprecated api BC-PIN-PCD
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api - EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api api EP-PIN
[sap.com] EP-RUNTIME [sap.com] tc/ep/semantics/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2015 SAP AG Complete Copyright Notice