com.stimulsoft.report.dictionary
Class StiVariable

java.lang.Object
  extended by com.stimulsoft.report.expressions.StiExpression
      extended by com.stimulsoft.report.dictionary.StiVariable
All Implemented Interfaces:
IStiDefault, IStiJsonReportObject, IStiSerializable, IStiSerializableToString, IStiName, IStiInherited, java.lang.Cloneable, java.lang.Comparable<StiVariable>

public class StiVariable
extends StiExpression
implements IStiName, IStiInherited, java.lang.Comparable<StiVariable>

Class describes variable.


Field Summary
 java.lang.String name
           
 
Fields inherited from class com.stimulsoft.report.expressions.StiExpression
ParentComponent
 
Constructor Summary
StiVariable()
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String name, java.lang.Object value)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String name, StiSystemType type)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.Object value)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, StiSystemType type)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, StiSystemType type, java.lang.String value, boolean readOnly)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, java.lang.Object value)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, java.lang.Object value, boolean readOnly)
           
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, StiSystemType type, java.lang.String value, boolean readOnly)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, StiSystemType type, java.lang.String value, boolean readOnly, StiVariableInitBy initBy)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, java.lang.String description, StiSystemType type, java.lang.String value, boolean readOnly)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, java.lang.String description, StiSystemType type, java.lang.String value, boolean readOnly, StiVariableInitBy initBy)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, java.lang.String description, StiSystemType type, java.lang.String value, boolean readOnly, StiVariableInitBy initBy, boolean requestFromUser)
          Creates an object of the type StiVariable.
StiVariable(java.lang.String category, java.lang.String name, java.lang.String alias, java.lang.String description, StiSystemType type, java.lang.String value, boolean readOnly, StiVariableInitBy initBy, boolean requestFromUser, StiDialogInfo dialogInfo)
          Creates an object of the type StiVariable.
 
Method Summary
 StiVariable clone()
          Creates a new object that is a copy of the current instance.
 int compareTo(StiVariable var2)
           
 void deserialize(java.lang.String strObject)
          Десериализация объекта из строки.
 java.lang.Object eval(StiReport report)
           
 java.lang.String getAlias()
          Gets or sets alias of variable.
 boolean getApplyFormat()
           
 java.lang.String getCategory()
          Gets or sets category of the variable.
static java.util.Date GetDateTimeFromValue(java.lang.String value)
          Internal use only.
 java.lang.String getDescription()
          Gets or sets description of function.
 StiDialogInfo getDialogInfo()
          Gets or sets alias of variable.
 java.util.ArrayList<StiVariableItem> getDialogInfoItems()
           
static java.lang.String GetExpressionString(StiVariable variable)
          Returns variable in the form of the expression.
 boolean getInherited()
           
 StiVariableInitBy getInitBy()
          Gets or sets value which indicates that this variable will be have defalt value based on calculation of expression which specified in Value property or based on default value.
 java.lang.String getInitByExpressionFrom()
          Gets or sets init by expression for range values.
 java.lang.String getInitByExpressionTo()
          Gets or sets init by expression for range values.
 java.lang.Object getInitInstance(StiText tempText)
           
 java.lang.Object getInstance()
           
 boolean getIsCategory()
           
 java.lang.Object getItemObject(java.lang.String text)
           
 java.lang.String getKey()
           
 java.lang.String getName()
          Gets or sets name of variable.
 java.lang.String GetNativeValue()
          Internal use only.
 boolean getReadOnly()
          Gets or sets value indicates which variable instanceof read only.
 boolean getRequestFromUser()
          Gets or sets value.
 StiSelectionMode getSelection()
           
 StiSystemType getSystemType()
           
 StiSystemTypeEnum getType()
          Gets or sets type of variable.
 java.lang.Object getValueObject()
           
 boolean isAllowUseAsSqlParameter()
           
 boolean isDecimal()
           
 boolean isDefault()
           
 boolean isInteger()
           
 boolean isList()
           
 boolean isNullable()
           
 boolean isRange()
           
 boolean isTime()
           
 boolean isValueType()
           
 void LoadFromJsonObjectEx(JSONObject jObject, StiReport report)
           
 JSONObject SaveToJsonObjectEx()
           
 java.lang.String serialize()
          Сериализация объекта в строку.
 void setAlias(java.lang.String value)
           
 void setAllowUseAsSqlParameter(boolean allowUseAsSqlParameter)
           
 void setCategory(java.lang.String value)
           
 void setDescription(java.lang.String value)
           
 void setDialogInfo(StiDialogInfo value)
           
 void setDialogInfoItems(java.util.ArrayList<StiVariableItem> items)
           
 void setInherited(boolean value)
           
 void setInitBy(StiVariableInitBy value)
           
 void setInitByExpressionFrom(java.lang.String value)
           
 void setInitByExpressionTo(java.lang.String value)
           
 void setKey(java.lang.String key)
           
 void setName(java.lang.String value)
           
 void setReadOnly(boolean value)
           
 void setRequestFromUser(boolean value)
           
 void setSelection(StiSelectionMode selection)
           
 void setSystemType(StiSystemType systemType)
           
 void setTypeOrUserType(java.lang.String systemTypeName)
           
 void setValue(java.lang.Object value)
           
 void setValueObject(java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class com.stimulsoft.report.expressions.StiExpression
deserializeStr, getDefaultEvent, getFullConvert, getGenAddEvent, getValue, LoadFromJsonObject, SaveToJsonObject, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Constructor Detail

StiVariable

public StiVariable()
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category)
Creates an object of the type StiVariable. In this case creates the category.


StiVariable

public StiVariable(java.lang.String name,
                   StiSystemType type)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   StiSystemType type)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String name,
                   java.lang.Object value)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.Object value)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   java.lang.Object value)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   java.lang.Object value,
                   boolean readOnly)

StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   StiSystemType type,
                   java.lang.String value,
                   boolean readOnly)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   StiSystemType type,
                   java.lang.String value,
                   boolean readOnly)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   java.lang.String description,
                   StiSystemType type,
                   java.lang.String value,
                   boolean readOnly)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   StiSystemType type,
                   java.lang.String value,
                   boolean readOnly,
                   StiVariableInitBy initBy)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   java.lang.String description,
                   StiSystemType type,
                   java.lang.String value,
                   boolean readOnly,
                   StiVariableInitBy initBy)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   java.lang.String description,
                   StiSystemType type,
                   java.lang.String value,
                   boolean readOnly,
                   StiVariableInitBy initBy,
                   boolean requestFromUser)
Creates an object of the type StiVariable.


StiVariable

public StiVariable(java.lang.String category,
                   java.lang.String name,
                   java.lang.String alias,
                   java.lang.String description,
                   StiSystemType type,
                   java.lang.String value,
                   boolean readOnly,
                   StiVariableInitBy initBy,
                   boolean requestFromUser,
                   StiDialogInfo dialogInfo)
Creates an object of the type StiVariable.

Parameters:
category - Category of the variable.
name - Name of variable.
alias - Alias of variable.
description - Description of variable.
type - Type of variable.
value - Value of variable.
readOnly - Value indicates which varibale instanceof read only.
initBy - Value which indicates that this variable will be have defalt value based on calculation of expression which specified in Value property or based on default value.
requestFromUser - RequestFromUser of variable.
dialogInfo - StiDialogInfo contain dialog information for using RequestFromUser property of variable.
Method Detail

getInherited

public final boolean getInherited()
Specified by:
getInherited in interface IStiInherited

setInherited

public final void setInherited(boolean value)
Specified by:
setInherited in interface IStiInherited

getName

public final java.lang.String getName()
Gets or sets name of variable.

Specified by:
getName in interface IStiName

setName

public final void setName(java.lang.String value)
Specified by:
setName in interface IStiName

getApplyFormat

public boolean getApplyFormat()
Overrides:
getApplyFormat in class StiExpression

getDialogInfo

public final StiDialogInfo getDialogInfo()
Gets or sets alias of variable.


setDialogInfo

public final void setDialogInfo(StiDialogInfo value)

getAlias

public final java.lang.String getAlias()
Gets or sets alias of variable.


setAlias

public final void setAlias(java.lang.String value)

getType

public final StiSystemTypeEnum getType()
Gets or sets type of variable.


getSystemType

public final StiSystemType getSystemType()

getReadOnly

public final boolean getReadOnly()
Gets or sets value indicates which variable instanceof read only.


setReadOnly

public final void setReadOnly(boolean value)

getRequestFromUser

public final boolean getRequestFromUser()
Gets or sets value.


setRequestFromUser

public final void setRequestFromUser(boolean value)

getCategory

public final java.lang.String getCategory()
Gets or sets category of the variable.


setCategory

public final void setCategory(java.lang.String value)

getDescription

public final java.lang.String getDescription()
Gets or sets description of function.


setDescription

public final void setDescription(java.lang.String value)

getIsCategory

public final boolean getIsCategory()

getValueObject

public final java.lang.Object getValueObject()

getItemObject

public java.lang.Object getItemObject(java.lang.String text)

setValueObject

public final void setValueObject(java.lang.Object value)

getInitByExpressionFrom

public final java.lang.String getInitByExpressionFrom()
Gets or sets init by expression for range values. This instanceof expression for From part of range. Property can be used only for Range types!


setInitByExpressionFrom

public final void setInitByExpressionFrom(java.lang.String value)

getInitByExpressionTo

public final java.lang.String getInitByExpressionTo()
Gets or sets init by expression for range values. This instanceof expression for To part of range. Property can be used only for Range types!


setInitByExpressionTo

public final void setInitByExpressionTo(java.lang.String value)

getInitBy

public final StiVariableInitBy getInitBy()
Gets or sets value which indicates that this variable will be have defalt value based on calculation of expression which specified in Value property or based on default value.


setInitBy

public final void setInitBy(StiVariableInitBy value)

GetNativeValue

public final java.lang.String GetNativeValue()
Internal use only.


GetDateTimeFromValue

public static java.util.Date GetDateTimeFromValue(java.lang.String value)
Internal use only.


GetExpressionString

public static java.lang.String GetExpressionString(StiVariable variable)
Returns variable in the form of the expression.

Parameters:
variable - Variable for convertation.
Returns:
Converted expression.

serialize

public java.lang.String serialize()
Description copied from interface: IStiSerializableToString
Сериализация объекта в строку.

Specified by:
serialize in interface IStiSerializableToString
Overrides:
serialize in class StiExpression
Returns:
строковое представление объекта

deserialize

public void deserialize(java.lang.String strObject)
Description copied from interface: IStiSerializableToString
Десериализация объекта из строки. Все свойства объекта устанавливаются за счет распарсивания строки.

Specified by:
deserialize in interface IStiSerializableToString
Overrides:
deserialize in class StiExpression

setTypeOrUserType

public void setTypeOrUserType(java.lang.String systemTypeName)

isValueType

public boolean isValueType()

getInstance

public java.lang.Object getInstance()

isRange

public boolean isRange()

isList

public boolean isList()

isTime

public boolean isTime()

isDecimal

public boolean isDecimal()

isInteger

public boolean isInteger()

isNullable

public boolean isNullable()

getInitInstance

public java.lang.Object getInitInstance(StiText tempText)

setDialogInfoItems

public final void setDialogInfoItems(java.util.ArrayList<StiVariableItem> items)

getDialogInfoItems

public java.util.ArrayList<StiVariableItem> getDialogInfoItems()

compareTo

public int compareTo(StiVariable var2)
Specified by:
compareTo in interface java.lang.Comparable<StiVariable>

clone

public StiVariable clone()
Description copied from class: StiExpression
Creates a new object that is a copy of the current instance.

Overrides:
clone in class StiExpression
Returns:
A new object that is a copy of this instance.

toString

public java.lang.String toString()
Overrides:
toString in class StiExpression

setSystemType

public void setSystemType(StiSystemType systemType)
Parameters:
systemType - the systemType to set

setValue

public void setValue(java.lang.Object value)

getKey

public java.lang.String getKey()
Returns:
the key

setKey

public void setKey(java.lang.String key)
Parameters:
key - the key to set

isAllowUseAsSqlParameter

public boolean isAllowUseAsSqlParameter()
Returns:
the allowUseAsSqlParameter

setAllowUseAsSqlParameter

public void setAllowUseAsSqlParameter(boolean allowUseAsSqlParameter)
Parameters:
allowUseAsSqlParameter - the allowUseAsSqlParameter to set

getSelection

public StiSelectionMode getSelection()
Returns:
the selection

setSelection

public void setSelection(StiSelectionMode selection)
Parameters:
selection - the selection to set

SaveToJsonObjectEx

public JSONObject SaveToJsonObjectEx()
                              throws JSONException
Throws:
JSONException

LoadFromJsonObjectEx

public void LoadFromJsonObjectEx(JSONObject jObject,
                                 StiReport report)
                          throws JSONException
Throws:
JSONException

eval

public java.lang.Object eval(StiReport report)
                      throws StiException
Throws:
StiException

isDefault

public boolean isDefault()
Specified by:
isDefault in interface IStiDefault
Overrides:
isDefault in class StiExpression