com.stimulsoft.report.dictionary.dataSources
Class StiSqlSource

java.lang.Object
  extended by com.stimulsoft.base.serializing.StiSerializedObject
      extended by com.stimulsoft.report.dictionary.dataSources.StiDataSource
          extended by com.stimulsoft.report.dictionary.dataSources.StiDataStoreSource
              extended by com.stimulsoft.report.dictionary.dataSources.StiDataTableSource
                  extended by com.stimulsoft.report.dictionary.dataSources.StiSqlSource
All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableRef, IStiName, IStiEnumerator, IStiInherited, IStiStateSaveRestore, java.lang.Cloneable
Direct Known Subclasses:
StiJDBCSource, StiMsSqlSource, StiMySqlSource, StiOdbcSource, StiOleDbSource, StiOracleSource, StiPostgreSQLSource

public class StiSqlSource
extends StiDataTableSource

Describes the Data Source realizing access to Sql.


Field Summary
 
Fields inherited from class com.stimulsoft.report.dictionary.dataSources.StiDataSource
columns, connectOnStart, detailRows, initForSubreport, RowToLevel
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiSqlSource()
          Creates a new object of the type StiSqlSource.
StiSqlSource(java.lang.String nameInSource, java.lang.String name)
          Creates a new object of the type StiSqlSource.
StiSqlSource(java.lang.String nameInSource, java.lang.String name, java.lang.String alias)
          Creates a new object of the type StiSqlSource.
StiSqlSource(java.lang.String nameInSource, java.lang.String name, java.lang.String alias, java.lang.String sqlCommand)
          Creates a new object of the type StiSqlSource.
StiSqlSource(java.lang.String nameInSource, java.lang.String name, java.lang.String alias, java.lang.String sqlCommand, boolean connectOnStart)
           
StiSqlSource(java.lang.String nameInSource, java.lang.String name, java.lang.String alias, java.lang.String sqlCommand, boolean connectOnStart, boolean reconnectOnEachRow)
           
StiSqlSource(java.lang.String nameInSource, java.lang.String name, java.lang.String alias, java.lang.String sqlCommand, boolean connectOnStart, boolean reconnectOnEachRow, int commandTimeout)
           
 
Method Summary
 boolean getAllowExpressions()
          Gets or sets value which indicates that datasource can contain script expressions or no.
 int getCommandTimeout()
           
 boolean getConnectOnStart()
          Gets or sets value which indicates that datasource not connect to the data automatically.
 java.lang.String getFinalSqlCommand()
           
 StiSystemType getNetType(int dbType)
           
 StiDataParametersCollection getParameters()
          Gets or sets the parameter collection.
 java.lang.String getQuery()
           
 boolean getReconnectOnEachRow()
          Gets or sets value which indicates that datasource reconnect on each master row in master-detail reports.
 java.lang.String getSqlCommand()
          Gets or sets Transact-SQL statement to execute at the Data Source.
 StiSqlSourceType getType()
          Gets or sets value which indicates type of sql datasource.
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setAllowExpressions(boolean value)
           
 void setCommandTimeout(int value)
           
 void setConnectOnStart(boolean value)
           
 void setParameters(StiDataParametersCollection value)
           
 void setReconnectOnEachRow(boolean value)
           
 void setSqlCommand(java.lang.String value)
           
 void setType(StiSqlSourceType value)
           
 void UpdateParameters()
           
 
Methods inherited from class com.stimulsoft.report.dictionary.dataSources.StiDataTableSource
GetCategoryName, getDatabaseClass
 
Methods inherited from class com.stimulsoft.report.dictionary.dataSources.StiDataStoreSource
connect, connect, createNewTable, disconnect, getDataName, getNameInSource, setDataName, setNameInSource
 
Methods inherited from class com.stimulsoft.report.dictionary.dataSources.StiDataSource
CheckColumnsIndexs, clearAllStates, ClearAllStates, First, get, getAlias, GetChildDataSource, GetChildRelations, GetColumnIndex, getColumns, GetConditions, getConnectionOrder, getCount, GetData, getData, GetData, GetDataRow, getDataTable, getDictionary, getInherited, getIsBof, getIsConnected, getIsEmpty, getIsEof, getItem, getKey, GetLevel, getName, GetParentData, GetParentDataSource, GetParentRelations, getPosition, getPositionValue, getRealCount, getRelations, getRows, getVariableParameterByName, getVariableParameters, isEmpty, Last, Next, prepareData, Prior, ResetData, ResetDetailsRows, restoreState, RestoreState, saveState, setAlias, setColumns, setConnectionOrder, setCorrectName, SetData, setDataTable, SetDetails, setDictionary, SetFilter, setInherited, setIsBof, setIsEof, setKey, setName, setPosition, setPositionValue, setRows, SetSort, setVariableParameters, size, toString
 
Methods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
getReference, setReference
 

Constructor Detail

StiSqlSource

public StiSqlSource()
Creates a new object of the type StiSqlSource.


StiSqlSource

public StiSqlSource(java.lang.String nameInSource,
                    java.lang.String name)
Creates a new object of the type StiSqlSource.

Parameters:
nameInSource - Name of Sql Connection in the DataStore.
name - Data Source name.

StiSqlSource

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

Parameters:
nameInSource - Name of Sql Connection in the DataStore.
name - Data Source name.
alias - Data Source alias.

StiSqlSource

public StiSqlSource(java.lang.String nameInSource,
                    java.lang.String name,
                    java.lang.String alias,
                    java.lang.String sqlCommand)
Creates a new object of the type StiSqlSource.

Parameters:
nameInSource - Name of SqlConnection in the DataStore.
name - Data Source name.
alias - Data Source alias.
sqlCommand - SQL statement to execute at the Data Source.

StiSqlSource

public StiSqlSource(java.lang.String nameInSource,
                    java.lang.String name,
                    java.lang.String alias,
                    java.lang.String sqlCommand,
                    boolean connectOnStart)

StiSqlSource

public StiSqlSource(java.lang.String nameInSource,
                    java.lang.String name,
                    java.lang.String alias,
                    java.lang.String sqlCommand,
                    boolean connectOnStart,
                    boolean reconnectOnEachRow)

StiSqlSource

public StiSqlSource(java.lang.String nameInSource,
                    java.lang.String name,
                    java.lang.String alias,
                    java.lang.String sqlCommand,
                    boolean connectOnStart,
                    boolean reconnectOnEachRow,
                    int commandTimeout)
Method Detail

getConnectOnStart

public boolean getConnectOnStart()
Gets or sets value which indicates that datasource not connect to the data automatically.

Overrides:
getConnectOnStart in class StiDataSource

setConnectOnStart

public void setConnectOnStart(boolean value)
Overrides:
setConnectOnStart in class StiDataSource

getAllowExpressions

public final boolean getAllowExpressions()
Gets or sets value which indicates that datasource can contain script expressions or no.


setAllowExpressions

public final void setAllowExpressions(boolean value)

getType

public final StiSqlSourceType getType()
Gets or sets value which indicates type of sql datasource.


setType

public final void setType(StiSqlSourceType value)

getCommandTimeout

public final int getCommandTimeout()

setCommandTimeout

public final void setCommandTimeout(int value)

getReconnectOnEachRow

public final boolean getReconnectOnEachRow()
Gets or sets value which indicates that datasource reconnect on each master row in master-detail reports.


setReconnectOnEachRow

public final void setReconnectOnEachRow(boolean value)

getSqlCommand

public final java.lang.String getSqlCommand()
Gets or sets Transact-SQL statement to execute at the Data Source.


setSqlCommand

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

getParameters

public StiDataParametersCollection getParameters()
Description copied from class: StiDataSource
Gets or sets the parameter collection.

Overrides:
getParameters in class StiDataSource

setParameters

public void setParameters(StiDataParametersCollection value)
Overrides:
setParameters in class StiDataSource

UpdateParameters

public void UpdateParameters()

getQuery

public java.lang.String getQuery()
Overrides:
getQuery in class StiDataStoreSource

getFinalSqlCommand

public java.lang.String getFinalSqlCommand()

getNetType

public StiSystemType getNetType(int dbType)

SaveToJsonObject

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

LoadFromJsonObject

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