Class StiVariable

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

public class StiVariable extends StiExpression implements IStiName, IStiInherited, Comparable<StiVariable>, IStiAlias, ICloneable
Class describes variable.
  • Field Details

  • Constructor Details

    • StiVariable

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

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

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

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

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

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

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

      public StiVariable(String category, String name, String alias, Object value, boolean readOnly)
    • StiVariable

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

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

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

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

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

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

      public StiVariable(String category, String name, String alias, String description, StiSystemType type, 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 Details

    • 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 String getName()
      Gets or sets name of variable.
      Specified by:
      getName in interface IStiName
    • setName

      public final void setName(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 String getAlias()
      Gets or sets alias of variable.
      Specified by:
      getAlias in interface IStiAlias
    • setAlias

      public final void setAlias(String value)
      Specified by:
      setAlias in interface IStiAlias
    • isAllowNullableString

      public boolean isAllowNullableString()
    • setAllowNullableString

      public void setAllowNullableString(boolean allowNullableString)
    • 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)
    • isShowOnParametersPanel

      public boolean isShowOnParametersPanel()
    • setShowOnParametersPanel

      public final void setShowOnParametersPanel(boolean value)
    • getCategory

      public final String getCategory()
      Gets or sets category of the variable.
    • setCategory

      public final void setCategory(String value)
    • getDescription

      public final String getDescription()
      Gets or sets description of function.
    • setDescription

      public final void setDescription(String value)
    • getIsCategory

      public final boolean getIsCategory()
    • getValueObject

      public final Object getValueObject()
    • getItemObject

      public Object getItemObject(String text)
    • setValueObject

      public final void setValueObject(Object value)
    • getValue

      public String getValue()
      Description copied from class: StiExpression
      Gets or sets value of the expression.
      Overrides:
      getValue in class StiExpression
    • getInitByExpressionFrom

      public final 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(String value)
    • getInitByExpressionTo

      public final 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(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)
    • GetDateTimeFromValue

      public static Date GetDateTimeFromValue(String value)
      Internal use only.
    • GetExpressionString

      public static String GetExpressionString(StiVariable variable)
      Returns variable in the form of the expression.
      Parameters:
      variable - Variable for convertation.
      Returns:
      Converted expression.
    • serialize

      public String serialize()
      Specified by:
      serialize in interface IStiSerializableToString
      Overrides:
      serialize in class StiExpression
    • deserialize

      public void deserialize(String strObject)
      Specified by:
      deserialize in interface IStiSerializableToString
      Overrides:
      deserialize in class StiExpression
    • setTypeOrUserType

      public void setTypeOrUserType(String systemTypeName)
    • isValueType

      public boolean isValueType()
    • getInstance

      public 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 Object getInitInstance(StiText tempText)
    • setDialogInfoItems

      public final void setDialogInfoItems(ArrayList<StiVariableItem> items)
    • getDialogInfoItems

      public List<StiVariableItem> getDialogInfoItems()
    • compareTo

      public int compareTo(StiVariable var2)
      Specified by:
      compareTo in interface Comparable<StiVariable>
    • clone

      public Object clone()
      Description copied from class: StiExpression
      Creates a new object that is a copy of the current instance.
      Specified by:
      clone in interface ICloneable
      Overrides:
      clone in class StiExpression
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Overrides:
      toString in class StiExpression
    • setSystemType

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

      public void setValue(Object value)
    • getKey

      public String getKey()
      Returns:
      the key
    • setKey

      public void setKey(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 Object eval(StiReport report) throws StiException
      Throws:
      StiException
    • isDefault

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

      public String getNativeValue()
      Internal use only.
      Returns: