Class VCValueHolderHelper
java.lang.Object
de.uplanet.lucy.server.auxiliaries.VCValueHolderHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final booleangetBooleanFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the boolean value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long or an String that cannot parsed to an int!static final booleangetBooleanFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, boolean p_dNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int or an String cannot parsed to an Int!static final BooleangetBooleanFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Boolean p_dNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int or an String cannot parsed to an Int!static final DategetDateFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) static final CalendargetDateFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, TimeZone p_tz) returns an UPCalendar from a ValueHolder throws an Exception when the getValue() is not an Date type!static final doublegetDoubleFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the double value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long, float, double or an String that cannot parsed to an double!static final doublegetDoubleFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, double p_dNullValue) returns the double value of the ValueHolder throws an RuntimeException when p_vh.getValue() is not an int, long, double, float or an String that cannot parsed to an double!static final DoublegetDoubleFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Double p_dNullValue) returns the double value of the ValueHolder throws an RuntimeException when p_vh.getValue() is not an int, long, double, float or an String that cannot parsed to an double!static final floatgetFloatFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the float value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long, float, double or an String that cannot parsed to an float!static final floatgetFloatFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, float p_fNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an float, double, long, int or an String that cannot parsed to an float!static final FloatgetFloatFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Float p_fNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an float, double, long, int or an String that cannot parsed to an float!static final intgetIntFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the int value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long or an String that cannot parsed to an int!static final intgetIntFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, int p_iNullValue) returns the int value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an Int!static final IntegergetIntFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Integer p_iNullValue) returns the int value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an Int!static final longgetLongFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the long value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long or an String that cannot parsed to an int!static final longgetLongFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, long p_iNullValue) returns the long value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an long!static final LonggetLongFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Long p_iNullValue) returns the long value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an long!static final shortgetShortFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the short value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an short or an String that cannot parsed to an int!static final shortgetShortFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, short p_sNullValue) returns the short value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an short or an String that cannot parsed to an short!static final ShortgetShortFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Short p_sNullValue) returns the short value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an short or an String that cannot parsed to an short!static StringgetStringFromVH(de.uplanet.lucy.server.dataobjects.IDateTimeValueHolder p_vh) Converts the contents of a value holder to string.static StringgetStringFromVH(de.uplanet.lucy.server.dataobjects.IDateTimeValueHolder p_vh, String p_strNullValue) static StringgetStringFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) Converts the contents of a value holder to string.static StringgetStringFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, String p_strNullValue) static final longgetTimeInMillisFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) static final longgetTimeInMillisFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, long p_lNullValue) static final LonggetTimeInMillisFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Long p_lNullValue) static final CalendargetUTCDateFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns an UPCalendar from a ValueHolder throws an Exception when the getValue() is not an Date type!static final booleanisNull(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) static final booleanisNullOrEmpty(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) static final booleanisRawNull(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh)
-
Constructor Details
-
VCValueHolderHelper
public VCValueHolderHelper()
-
-
Method Details
-
getStringFromVH
Converts the contents of a value holder to string.- Parameters:
p_vh- The value holder- Returns:
- The converted string or null
-
getStringFromVH
-
getStringFromVH
Converts the contents of a value holder to string.- Parameters:
p_vh- The value holder- Returns:
- The converted string or null
-
getStringFromVH
-
isNull
public static final boolean isNull(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) - Parameters:
p_vh-- Returns:
- true when p_vh == null or p_vh.getValue() == null
-
isNullOrEmpty
public static final boolean isNullOrEmpty(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) - Parameters:
p_vh-- Returns:
truewhenp_vh == null || p_vh.getValue() == null || p_vh.getValue().toString().length() == 0
-
isRawNull
public static final boolean isRawNull(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) - Parameters:
p_vh-- Returns:
- true when p_vh == null or p_vh.getRawValue() == null
-
getDateFromVH
public static final Calendar getDateFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, TimeZone p_tz) returns an UPCalendar from a ValueHolder throws an Exception when the getValue() is not an Date type!- Parameters:
p_vh-p_tz-- Returns:
- UPCalendar or null
-
getDateFromVH
-
getUTCDateFromVH
public static final Calendar getUTCDateFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns an UPCalendar from a ValueHolder throws an Exception when the getValue() is not an Date type!- Parameters:
p_vh-- Returns:
- Calendar in utc or null when isNull(p_vh)
-
getTimeInMillisFromVH
public static final long getTimeInMillisFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) - Parameters:
p_vh-- Returns:
- Time in Milliseconds (UTC) from the DateTime ValueHolder
-
getTimeInMillisFromVH
public static final long getTimeInMillisFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, long p_lNullValue) - Parameters:
p_vh-- Returns:
- Time in Milliseconds from the DateTime ValueHolder, or p_lNullValue when isNull(p_vh) == true
-
getTimeInMillisFromVH
public static final Long getTimeInMillisFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Long p_lNullValue) - Parameters:
p_vh-- Returns:
- Time in Milliseconds from the DateTime ValueHolder, or p_lNullValue when isNull(p_vh) == true
-
getIntFromVH
public static final int getIntFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the int value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long or an String that cannot parsed to an int! (whennullis allowed usegetIntFromVH(IValueHolder, int)).- Parameters:
p_vh-- Returns:
- int value of the ValueHolder
-
getIntFromVH
public static final int getIntFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, int p_iNullValue) returns the int value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an Int!- Parameters:
p_vh-- Returns:
- int value of the ValueHolder
-
getIntFromVH
public static final Integer getIntFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Integer p_iNullValue) returns the int value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an Int!- Parameters:
p_vh-- Returns:
- int value of the ValueHolder
-
getLongFromVH
public static final long getLongFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the long value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long or an String that cannot parsed to an int! (whennullis allowed usegetLongFromVH(IValueHolder, long)).- Parameters:
p_vh-- Returns:
- long value of the ValueHolder
-
getLongFromVH
public static final long getLongFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, long p_iNullValue) returns the long value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an long!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getLongFromVH
public static final Long getLongFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Long p_iNullValue) returns the long value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int, long or an String that cannot parsed to an long!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getShortFromVH
public static final short getShortFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the short value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an short or an String that cannot parsed to an int! (whennullis allowed usegetShortFromVH(IValueHolder, short)).- Parameters:
p_vh-- Returns:
- short value of the ValueHolder
-
getShortFromVH
public static final short getShortFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, short p_sNullValue) returns the short value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an short or an String that cannot parsed to an short!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getShortFromVH
public static final Short getShortFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Short p_sNullValue) returns the short value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an short or an String that cannot parsed to an short!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getFloatFromVH
public static final float getFloatFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the float value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long, float, double or an String that cannot parsed to an float! (whennullis allowed usegetFloatFromVH(IValueHolder, float)).- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getFloatFromVH
public static final float getFloatFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, float p_fNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an float, double, long, int or an String that cannot parsed to an float!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getFloatFromVH
public static final Float getFloatFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Float p_fNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an float, double, long, int or an String that cannot parsed to an float!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getDoubleFromVH
public static final double getDoubleFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the double value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long, float, double or an String that cannot parsed to an double! (whennullis allowed usegetDoubleFromVH(IValueHolder, double)).- Parameters:
p_vh-- Returns:
- double value of the ValueHolder
-
getDoubleFromVH
public static final double getDoubleFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, double p_dNullValue) returns the double value of the ValueHolder throws an RuntimeException when p_vh.getValue() is not an int, long, double, float or an String that cannot parsed to an double!- Parameters:
p_vh-- Returns:
- double value of the ValueHolder
-
getDoubleFromVH
public static final Double getDoubleFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Double p_dNullValue) returns the double value of the ValueHolder throws an RuntimeException when p_vh.getValue() is not an int, long, double, float or an String that cannot parsed to an double!- Parameters:
p_vh-- Returns:
- double value of the ValueHolder
-
getBooleanFromVH
public static final boolean getBooleanFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) returns the boolean value of the ValueHolder throws Nullpointer Exception when isNull(p_vh) is true or an RuntimeException if p_vh.getValue() is not an int, long or an String that cannot parsed to an int! (whennullis allowed usegetBooleanFromVH(IValueHolder, boolean)).- Parameters:
p_vh-- Returns:
- double value of the ValueHolder
-
getBooleanFromVH
public static final boolean getBooleanFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, boolean p_dNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int or an String cannot parsed to an Int!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-
getBooleanFromVH
public static final Boolean getBooleanFromVH(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh, Boolean p_dNullValue) returns the float value of the ValueHolder throws an RuntimeException when p_vh.getValue is not an int or an String cannot parsed to an Int!- Parameters:
p_vh-- Returns:
- float value of the ValueHolder
-