Package de.uplanet.lucy.server.ixvalue
Schnittstelle IIxValue
- Alle bekannten Implementierungsklassen:
de.uplanet.lucy.server.ixvalue.AbstractIxStringValue,de.uplanet.lucy.server.ixvalue.AbstractIxValue,IxBigDecimalValue,IxBooleanValue,IxDateTimeValue,IxDoubleValue,IxIntValue,IxLongValue,IxObjectValue,IxStringValue
public interface IIxValue
-
Feldübersicht
Felder -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns a big decimal value.asBigDecimal(BigDecimal p_fallbackValue) Returns a big decimal value or the fallback value on an empty value.booleanReturns the a boolean value.booleanasBoolean(boolean p_bFallbackValue) Returns the boolean value or the fallback value on an empty value.asDate()Returns the date value.Returns the date value or the fallback date for an empty value.doubleasDouble()Returns a double value.doubleasDouble(double p_dFallbackValue) Returns the value as an double or the fallback value on an empty value.intasInt()Returns a integer value.intasInt(int p_iFallbackValue) Returns a integer value or the fallback value on an empty value.longasLong()Returns a long value.longasLong(long p_lFallbackValue) Returns a long value or the fallback value on an empty value.asString()Returns the value as an stringReturns the value as an stringasTime()Returns the time value.Returns the time value or the fallback value on an empty value.Returns a timestamp value.asTimestamp(Timestamp p_fallbackValue) Returns the timestamp value or the given fallback value for an empty value.IValueHolder<?> Returns the value as an value holder.de.uplanet.lucy.types.UP_TYPEgetType()Returns the type.getValue()Returns the physical value.booleanhasValue()Returnstrueif the value is not empty or exits.booleanReturnstrueon a primitive value type like integer or boolean.
-
Felddetails
-
EMPTY
-
-
Methodendetails
-
getType
de.uplanet.lucy.types.UP_TYPE getType()Returns the type. For internal use only.- Gibt zurück:
- Returns the value type (not
null).
-
getValue
Object getValue()Returns the physical value. Mostly an string value. For normal use cases, please use the methods, to get value.- Gibt zurück:
- Returns the value (could be
null).
-
asValueHolder
IValueHolder<?> asValueHolder()Returns the value as an value holder.- Gibt zurück:
- Converts a IIxValue to an value holder.
-
asBoolean
boolean asBoolean()Returns the a boolean value.Cast Rules: String "0" = false "1" = true "true" = true "false" = false Numeric (int, long, double): 0 = false 1 = true- Gibt zurück:
- Returns the value as an boolean.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==falseor the value type cannot be cast to an boolean.
-
asBoolean
boolean asBoolean(boolean p_bFallbackValue) Returns the boolean value or the fallback value on an empty value.Cast Rules: String "0" = false "1" = true "true" = true "false" = false Numeric (int, long, double): 0 = false 1 = true- Parameter:
p_bFallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an boolean or the given fallback value if
hasValue()==false. - Löst aus:
IllegalArgumentException- Throws a runtime exception if the value cannot be cast to a boolean.
-
asDouble
double asDouble()Returns a double value.Cast Rules: String Double.parseDouble(value) Numeric Types (double)value- Gibt zurück:
- Returns the value as an double.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==falseor the value type cannot be cast to an double.
-
asDouble
double asDouble(double p_dFallbackValue) Returns the value as an double or the fallback value on an empty value.Cast Rules: String Double.parseDouble(value) Numeric: (double)value- Parameter:
p_dFallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an double or the fallback value if
hasValue()==false. - Löst aus:
IllegalArgumentException- Throws a runtime exception if the value cannot be cast to a double.
-
asInt
int asInt()Returns a integer value.Cast Rules: String Integer.parseInteger(value) Numeric Types (int)value- Gibt zurück:
- Returns the value as an integer.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==falseor the value type cannot be cast to an integer.
-
asInt
int asInt(int p_iFallbackValue) Returns a integer value or the fallback value on an empty value.Cast Rules: String Integer.parseInteger(value) Numeric Types (int)value Other types: String.valueOf(type) will check.- Parameter:
p_iFallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an integer or p_iFallbackValue if
hasValue()==false - Löst aus:
IllegalArgumentException- Throws a runtime exception if the value cannot be cast to a integer.
-
asLong
long asLong()Returns a long value.Cast Rules: String Long.parseLong(value) Numeric Types (long)value- Gibt zurück:
- Returns the value as an long.
Throws an exception if
hasValue()==falseor the value type cannot be cast to an long.
-
asLong
long asLong(long p_lFallbackValue) Returns a long value or the fallback value on an empty value.Cast Rules: String Long.parseLong(value) Numeric Types (long)value Other types: String.valueOf(type) will check.- Parameter:
p_lFallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an long or p_lFallbackValue if
hasValue()==false. - Löst aus:
IllegalArgumentException- Throws a runtime exception if the value cannot be cast to a long.
-
asTimestamp
Timestamp asTimestamp()Returns a timestamp value.Value must be a date / timestamp type. No cast will be done.- Gibt zurück:
- Returns the value as an timestamp.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==falseor the value type cannot be cast to an timestamp.
-
asTimestamp
Returns the timestamp value or the given fallback value for an empty value.Value must be a date / timestamp type. No cast will be done.- Parameter:
p_fallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an timestamp.
- Löst aus:
IllegalArgumentException- Throws a runtime exception if the value is not a date or timestamp value.
-
asDate
Date asDate()Returns the date value.Value must be a date / time stamp / string type.- Gibt zurück:
- Returns the value as an date.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==falseor the value type cannot be cast to an date.
-
asDate
Returns the date value or the fallback date for an empty value.Value must be a date / time stamp / string type.- Parameter:
p_fallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an date.
- Löst aus:
IllegalArgumentException- Throws a runtime exception if the value is not a date or timestamp value.
-
asTime
Date asTime()Returns the time value.Value must be a time / time stamp / string type.- Gibt zurück:
- Returns the value as an time.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==falseor the value type cannot be cast to an time.
-
asTime
Returns the time value or the fallback value on an empty value.Value must be a time / time stamp / string type.- Gibt zurück:
- Returns the value as an time or the fallback value on an empty value.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()!=falseand the value type cannot be cast to an time.
-
asBigDecimal
BigDecimal asBigDecimal()Returns a big decimal value.Cast Rules: String new BigDecimal(value) Numeric Types new BigDecimalvalue)- Gibt zurück:
- Returns the value as an big decimal or null if
hasValue()==false. - Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==falseor the value type cannot be cast to an big decimal.
-
asBigDecimal
Returns a big decimal value or the fallback value on an empty value.Cast Rules: String new BigDecimal(value) Numeric Types new BigDecimalvalue)- Parameter:
p_fallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an string or p_fallbackValue if
hasValue()==false. - Löst aus:
IllegalArgumentException- Throws a runtime exception if the value cannot be cast to a big decimal.
-
asString
String asString()Returns the value as an stringCast Rules: Date values: A string representation of the date in theyyyy-MM-dd HH:mm:ssformat, calculated for the TimeZone UTC. Other Types: String.valueOf(type) will returned.- Gibt zurück:
- Returns the value as an string.
- Löst aus:
IllegalArgumentException- Throws an exception ifhasValue()==false, and it is not an string value. On string values only onnullvalues an exception will thrown,
-
asString
Returns the value as an stringCast Rules: Date values: A string representation of the date in theyyyy-MM-dd HH:mm:ssformat, calculated for the TimeZone UTC. Other Types: String.valueOf(type) will returned.- Parameter:
p_strFallbackValue- The fallback value used ifhasValue()==false.- Gibt zurück:
- Returns the value as an string or p_strFallbackValue if
hasValue()==false.
-
hasValue
boolean hasValue()Returnstrueif the value is not empty or exits.- Gibt zurück:
- Returns
trueifgetValue()!= null otherwisefalsewill returned.
-
isPrimitive
boolean isPrimitive()Returnstrueon a primitive value type like integer or boolean.- Gibt zurück:
- Returns
trueif the value represent an primitive type like a boolean, integer...
-