Package ag.smaser.trip.cfw
Class ImportValue
java.lang.Object
ag.smaser.trip.cfw.ImportValue
Represents a value imported by an import connector.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()Returns the data value as an object, or null if no value has been assigned.getId()Returns the id or tag of the value.Get dictionary with value properties.booleanisBinary()Returns true if the data of this item is a byte array (byte[]).booleanisDate()Returns true if the data of this item is a Date objectbooleanisDouble()Returns true if the data of this item is fouble floating point value (double)booleanReturns true if the data of this item is an integer (int)booleanisNull()Returns true if this item has no data.booleanisString()Returns true if the data of this item is a String objectvoidsetData(byte[] data) Assigns a byte array as the data value for this itemvoidsetData(double data) Assigns a double as the data value for this itemvoidsetData(int data) Assigns an int as the data value for this itemvoidAssigns a string as the data value for this itemvoidAssigns a Date object as the data value for this itemvoidsetProperty(String key, String value) Set a property for this import value.
-
Constructor Details
-
ImportValue
Creates a new value object for an import item.- Parameters:
id- The id or tag of the value.
-
-
Method Details
-
getId
Returns the id or tag of the value.- Returns:
- Value id
-
getData
Returns the data value as an object, or null if no value has been assigned.- Returns:
- The value as an Object
-
setData
Assigns a string as the data value for this item- Parameters:
data- Value
-
setData
public void setData(byte[] data) Assigns a byte array as the data value for this item- Parameters:
data- Value
-
setData
public void setData(int data) Assigns an int as the data value for this item- Parameters:
data- Value
-
setData
public void setData(double data) Assigns a double as the data value for this item- Parameters:
data- Value
-
setData
Assigns a Date object as the data value for this item- Parameters:
data- Value
-
isNull
public boolean isNull()Returns true if this item has no data.- Returns:
- True if the value is null
-
isString
public boolean isString()Returns true if the data of this item is a String object- Returns:
- True if the value is a string
-
isBinary
public boolean isBinary()Returns true if the data of this item is a byte array (byte[]).- Returns:
- True if the value is a byte array
-
isInteger
public boolean isInteger()Returns true if the data of this item is an integer (int)- Returns:
- True if the value is an integers
-
isDouble
public boolean isDouble()Returns true if the data of this item is fouble floating point value (double)- Returns:
- True if the value is a double
-
isDate
public boolean isDate()Returns true if the data of this item is a Date object- Returns:
- True if the value is a date
-
getProperties
Get dictionary with value properties.- Returns:
- Property dictionary
-
setProperty
Set a property for this import value.- Parameters:
key- Property namevalue- Property valueAn import value may have properties that are distinct from the properties of its parent item. A typical example is an item that represents an email, in which case the values are the email body plus any attachments of the email. In such a scenario each value that represent an attachment may additionally specify meta data properties such as the file name and file type.
-