com.irisel.oms.olapi.beans
Class DataInstance
java.lang.Object
com.irisel.util.BaseBean
com.irisel.oms.olapi.beans.XMLBean
com.irisel.oms.olapi.beans.DataInstance
- All Implemented Interfaces:
- Instance, XMLBean, java.io.Serializable
- Direct Known Subclasses:
- DataExchangeInstance
public class DataInstance
- extends XMLBean
- implements Instance
- Author:
- jgomalve
- See Also:
- Serialized Form
Fields inherited from interface com.irisel.util.XMLBean |
CSV |
Constructor Summary |
DataInstance()
Creates a new instance of DataInstance |
DataInstance(ClassVO c)
|
DataInstance(long classid,
java.lang.String classname,
java.lang.String[] classnames,
java.lang.String[] names,
java.lang.String[] originalNames,
java.lang.Object[] values,
java.lang.String[] javaClassNames,
java.lang.String type)
|
Methods inherited from class com.irisel.oms.olapi.beans.XMLBean |
copyToInstance, export2csv, getDescId, getGeneratedAt, getGenericAttr, getIcon, getIconName, getId, getLabel, getName, getO, getOrd, getVisibility, isDirty, isEnabled, isErased, isMandatory, isReadOnly, readFromFile, readFromStream, setDescId, setDirty, setEnabled, setErased, setGeneratedAt, setGenericAttr, setIcon, setIconName, setLabel, setName, setO, setOrd, setVisibility, updateFromInstance, writeToFile, writeToStream, xmlSerialize |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DataInstance
public DataInstance()
- Creates a new instance of DataInstance
DataInstance
public DataInstance(ClassVO c)
DataInstance
public DataInstance(long classid,
java.lang.String classname,
java.lang.String[] classnames,
java.lang.String[] names,
java.lang.String[] originalNames,
java.lang.Object[] values,
java.lang.String[] javaClassNames,
java.lang.String type)
name2index
public int name2index(java.lang.String name)
- Returns the index in the values vector
corresponding to a column given by name
getInstanceType
public java.lang.String getInstanceType()
getValue
public java.lang.Object getValue(int index)
- Specified by:
getValue
in interface Instance
- Returns:
- the value at index.
getValue
public java.lang.Object getValue(java.lang.String name)
- Specified by:
getValue
in interface Instance
- Returns:
- the value of the property given by name.
getValues
public java.lang.Object[] getValues()
- Specified by:
getValues
in interface Instance
- Returns:
- the array of values
setInstanceType
public void setInstanceType(java.lang.String type)
setValue
public void setValue(java.lang.String name,
java.lang.Object value)
- Specified by:
setValue
in interface Instance
setValue
public void setValue(int index,
java.lang.Object value)
- Specified by:
setValue
in interface Instance
setValues
public void setValues(java.lang.Object[] values)
- Specified by:
setValues
in interface Instance
getPropertyCount
public int getPropertyCount()
- Specified by:
getPropertyCount
in interface Instance
getName
public java.lang.String getName(int index)
- Specified by:
getName
in interface Instance
getPropertyNames
public java.lang.String[] getPropertyNames()
- Specified by:
getPropertyNames
in interface Instance
setPropertyNames
public void setPropertyNames(java.lang.String[] names)
- Specified by:
setPropertyNames
in interface Instance
getIndex
public int getIndex(java.lang.String name)
- Specified by:
getIndex
in interface Instance
getValuesClassNames
public java.lang.String[] getValuesClassNames()
- Getter for property valuesClassNames.
Refers to the Java class name associated to each value
- Returns:
- Value of property valuesClassNames.
setValuesClassNames
public void setValuesClassNames(java.lang.String[] valuesClassNames)
- Setter for property valuesClassNames.
Refers to the Java class name associated to each value
- Specified by:
setValuesClassNames
in interface Instance
- Parameters:
valuesClassNames
- New value of property valuesClassNames.
getValueClassName
public java.lang.String getValueClassName(int i)
- Getter for property valuesClassNames.
- Specified by:
getValueClassName
in interface Instance
- Returns:
- Value of property valuesClassNames.
close
public void close()
getClassname
public java.lang.String getClassname()
- Specified by:
getClassname
in interface Instance
- Returns:
- the oms class name
setType
public void setType(java.lang.String type)
- Specified by:
setType
in interface Instance
getType
public java.lang.String getType()
- Specified by:
getType
in interface Instance
getClassnames
public java.lang.String[] getClassnames()
- Specified by:
getClassnames
in interface Instance
- Returns:
- the oms class name array (for view records it may differ for each field)
toString
public java.lang.String toString()
- Overrides:
toString
in class XMLBean
setId
public void setId(long id)
- Specified by:
setId
in interface Instance
- Overrides:
setId
in class XMLBean
setClassname
public void setClassname(java.lang.String classname)
- Specified by:
setClassname
in interface Instance
getGlobalId
public GlobalID getGlobalId()
clone
public void clone(Instance bean)
- Specified by:
clone
in interface Instance
getGlid
public GlobalID getGlid()
setGlid
public void setGlid(GlobalID glid)
setClassnames
public void setClassnames(java.lang.String[] classnames)
- Specified by:
setClassnames
in interface Instance
getOriginalNames
public java.lang.String[] getOriginalNames()
- Specified by:
getOriginalNames
in interface Instance
setOriginalNames
public void setOriginalNames(java.lang.String[] originalNames)
- Specified by:
setOriginalNames
in interface Instance
hasProperty
public boolean hasProperty(java.lang.String field_name)
- Specified by:
hasProperty
in interface Instance
getClassId
public long getClassId()
- Specified by:
getClassId
in interface Instance
setClassId
public void setClassId(long classId)
toJSONObject
public JSONObject toJSONObject()
- Overrides:
toJSONObject
in class BaseBean
toMap
public java.util.Map toMap()
- Specified by:
toMap
in interface Instance
setAutomaticFields
public void setAutomaticFields()
- Description copied from interface:
Instance
- Sets special fields with default or calculated values.
- Specified by:
setAutomaticFields
in interface Instance