com.stimulsoft.report.dictionary
Class StiDataColumn

java.lang.Object
  extended by com.stimulsoft.report.dictionary.StiDataColumn
All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableToString, IStiName, IStiInherited
Direct Known Subclasses:
StiCalcDataColumn

public class StiDataColumn
extends java.lang.Object
implements IStiSerializable, IStiSerializableToString, IStiName, IStiInherited, IStiJsonReportObject


Constructor Summary
StiDataColumn()
          by serializing.
StiDataColumn(java.lang.String name, java.lang.String alias, StiSystemType systemType)
          Creates a new object of the type StiDataColumn.
StiDataColumn(java.lang.String nameInSource, java.lang.String name, java.lang.String alias, StiSystemType systemType)
          Creates a new object of the type StiDataColumn.
 
Method Summary
 void deserialize(java.lang.String strObject)
          Десериализация объекта из строки.
 java.lang.String getAlias()
          Gets or sets an alias of column data.
 StiBusinessObject getBusinessObject()
          Gets or sets the Business Object in what the column is described.
static StiBusinessObject GetBusinessObjectFromDataColumn(StiDictionary dictionary, java.lang.String column)
           
 java.lang.String getCaption()
           
static java.lang.String GetColumnNameFromDataColumn(StiDictionary dictionary, java.lang.String column)
          Returns column name from the full name of column.
 java.lang.String getColumnPath()
           
static StiDataColumn getDataColumnFromColumnName(StiDictionary dictionary, java.lang.String column, boolean allowRelationName)
           
static java.lang.Object GetDataFromBusinessObject(StiDictionary dictionary, java.lang.String column)
           
static java.lang.Object GetDataFromDataColumn(StiDictionary dictionary, java.lang.String column)
           
static java.lang.Object GetDataFromDataColumn(StiDictionary dictionary, java.lang.String column, boolean useRelationName)
          Returns object from the Data Source with full name of column.
static java.lang.String getDataFromDataColumnStr(StiDictionary dictionary, java.lang.String column)
           
static java.util.List<java.lang.Object> getDataListFromDataColumn(StiDictionary dictionary, java.lang.String column, java.lang.Integer maxRows)
          Returns list of object from the Data Source with specified DataColumn.
static java.lang.Object[] GetDatasFromDataColumn(StiDictionary dictionary, java.lang.String column)
          Returns array of object from the Data Source with specified DataColumn.
static java.util.ArrayList<java.lang.Object> getDatasFromDataColumn(StiDictionary dictionary, java.lang.String column, java.lang.Integer maxRows)
          Returns array of object from the Data Source with specified DataColumn.
 StiDataSource getDataSource()
          Gets or sets the Data Source in what the column is described.
static StiDataSource GetDataSourceFromDataColumn(StiDictionary dictionary, java.lang.String column)
          Returns Data Source from the full name of column.
 int getIndex()
          Gets or sets the index of a column in the collection of columns.
 boolean getInherited()
           
 java.lang.String getKey()
           
 java.lang.String getName()
          Gets or sets a column name.
 java.lang.String getNameInSource()
          Gets or sets a original name.
static java.lang.String GetRelationName(StiDictionary dictionary, StiDataSource dataSource, java.lang.String relationName)
           
 StiSystemType getSystemType()
           
 StiSystemTypeEnum getType()
          Gets or sets the type of column data.
 boolean isArray()
           
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 java.lang.String serialize()
          Сериализация объекта в строку.
 void setAlias(java.lang.String value)
           
 void setBusinessObject(StiBusinessObject value)
           
 void setCaption(java.lang.String caption)
           
 void setCorrectName(java.lang.String value)
           
 void setDataSource(StiDataSource value)
           
 void setIndex(int value)
           
 void setInherited(boolean value)
           
 void setKey(java.lang.String key)
           
 void setName(java.lang.String value)
           
 void setNameInSource(java.lang.String value)
           
 void setSystemType(StiSystemType systemType)
           
 void setTypeOrUserType(java.lang.String systemTypeName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StiDataColumn

public StiDataColumn()
by serializing.


StiDataColumn

public StiDataColumn(java.lang.String name,
                     java.lang.String alias,
                     StiSystemType systemType)
Creates a new object of the type StiDataColumn.

Parameters:
name - Name of column.
alias - Alias of column.
type - Type of data of column.

StiDataColumn

public StiDataColumn(java.lang.String nameInSource,
                     java.lang.String name,
                     java.lang.String alias,
                     StiSystemType systemType)
Creates a new object of the type StiDataColumn.

Parameters:
name - Name of column.
alias - Alias of column.
type - Type of data of column.
Method Detail

setSystemType

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

getKey

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

setKey

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

getName

public final java.lang.String getName()
Gets or sets a column name.

Specified by:
getName in interface IStiName

setName

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

setCorrectName

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

getInherited

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

setInherited

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

getDataSource

public final StiDataSource getDataSource()
Gets or sets the Data Source in what the column is described.


setDataSource

public final void setDataSource(StiDataSource value)

getBusinessObject

public final StiBusinessObject getBusinessObject()
Gets or sets the Business Object in what the column is described.


setBusinessObject

public final void setBusinessObject(StiBusinessObject value)

getIndex

public final int getIndex()
Gets or sets the index of a column in the collection of columns.


setIndex

public final void setIndex(int value)

getNameInSource

public final java.lang.String getNameInSource()
Gets or sets a original name.


setNameInSource

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

getAlias

public final java.lang.String getAlias()
Gets or sets an alias of column data.


setAlias

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

getType

public final StiSystemTypeEnum getType()
Gets or sets the type of column data.


GetDataFromDataColumn

public static java.lang.Object GetDataFromDataColumn(StiDictionary dictionary,
                                                     java.lang.String column)

GetRelationName

public static java.lang.String GetRelationName(StiDictionary dictionary,
                                               StiDataSource dataSource,
                                               java.lang.String relationName)

GetDataFromBusinessObject

public static java.lang.Object GetDataFromBusinessObject(StiDictionary dictionary,
                                                         java.lang.String column)

GetBusinessObjectFromDataColumn

public static StiBusinessObject GetBusinessObjectFromDataColumn(StiDictionary dictionary,
                                                                java.lang.String column)

GetDataFromDataColumn

public static java.lang.Object GetDataFromDataColumn(StiDictionary dictionary,
                                                     java.lang.String column,
                                                     boolean useRelationName)
Returns object from the Data Source with full name of column.

Parameters:
dictionary - Dictionary which contain Data Source.
column - Full name of column.
Returns:
Returned object.

getColumnPath

public java.lang.String getColumnPath()

GetDataSourceFromDataColumn

public static StiDataSource GetDataSourceFromDataColumn(StiDictionary dictionary,
                                                        java.lang.String column)
Returns Data Source from the full name of column.

Parameters:
dictionary - Dictionary which contain Data Source.
column - Full name of column.
Returns:
Data Source.

getDataListFromDataColumn

public static java.util.List<java.lang.Object> getDataListFromDataColumn(StiDictionary dictionary,
                                                                         java.lang.String column,
                                                                         java.lang.Integer maxRows)
Returns list of object from the Data Source with specified DataColumn.

Parameters:
dictionary - Dictionary which contain Data Source.
column - Full name of column.
maxRows - Returned list of object.
Returns:

getDatasFromDataColumn

public static java.util.ArrayList<java.lang.Object> getDatasFromDataColumn(StiDictionary dictionary,
                                                                           java.lang.String column,
                                                                           java.lang.Integer maxRows)
Returns array of object from the Data Source with specified DataColumn.

Parameters:
dictionary - Dictionary which contain Data Source.
column - Full name of column.
maxRows -
Returns:
Returned array of object.

GetColumnNameFromDataColumn

public static java.lang.String GetColumnNameFromDataColumn(StiDictionary dictionary,
                                                           java.lang.String column)
Returns column name from the full name of column.

Parameters:
dictionary - Dictionary which contain Data Source.
column - Full name of column.
Returns:
Column name.

GetDatasFromDataColumn

public static java.lang.Object[] GetDatasFromDataColumn(StiDictionary dictionary,
                                                        java.lang.String column)
Returns array of object from the Data Source with specified DataColumn.

Parameters:
dictionary - Dictionary which contain Data Source.
column - Full name of column.
Returns:
Returned array of object.

toString

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

serialize

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

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

deserialize

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

Specified by:
deserialize in interface IStiSerializableToString

setTypeOrUserType

public void setTypeOrUserType(java.lang.String systemTypeName)

getSystemType

public StiSystemType getSystemType()
Returns:
the systemType

getDataFromDataColumnStr

public static java.lang.String getDataFromDataColumnStr(StiDictionary dictionary,
                                                        java.lang.String column)

getCaption

public java.lang.String getCaption()
Returns:
the caption

setCaption

public void setCaption(java.lang.String caption)
Parameters:
caption - the caption to set

getDataColumnFromColumnName

public static StiDataColumn getDataColumnFromColumnName(StiDictionary dictionary,
                                                        java.lang.String column,
                                                        boolean allowRelationName)

SaveToJsonObject

public JSONObject SaveToJsonObject(StiJsonSaveMode mode)
                            throws JSONException
Specified by:
SaveToJsonObject in interface IStiJsonReportObject
Throws:
JSONException

LoadFromJsonObject

public void LoadFromJsonObject(JSONObject jObject)
                        throws JSONException
Specified by:
LoadFromJsonObject in interface IStiJsonReportObject
Throws:
JSONException

isArray

public boolean isArray()