com.stimulsoft.report.dictionary
Class StiDictionary

java.lang.Object
  extended by com.stimulsoft.base.serializing.StiSerializedObject
      extended by com.stimulsoft.report.dictionary.StiDictionary
All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableRef, IStiStateSaveRestore, java.lang.Cloneable

public class StiDictionary
extends StiSerializedObject
implements java.lang.Cloneable, IStiStateSaveRestore, IStiJsonReportObject

Class describes the dictionary data.


Field Summary
 StiDataSourcesCollection dataSources
           
 StiVariablesCollection variables
           
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiDictionary()
          Creates a new object of the type StiDictionary.
StiDictionary(StiReport report)
          Creates a new object of the type StiDictionary.
 
Method Summary
 void clear()
          Clears data dictionary.
 void clearAllStates()
          Clear all states.
 void ClearAllStates()
          Clears all earlier saved object states.
 void connect()
          Connects all Data Sources to data.
 void connect(boolean loadData, java.util.List<StiDataSource> dataSources)
          Connects all Data Sources to data.
 void ConnectCrossTabDataSources()
           
 void ConnectVirtualDataSources()
          Intenal use only.
 void Disconnect()
           
static void DoAutoSynchronize(StiReport report)
          Synchronizes DataStore and Dictionary.
 boolean existRelation(java.lang.String dataRelationName)
           
static StiAutoSynchronizeMode getAutoSynchronize()
          Gets or sets Synchronization mode of the Dictionary.
 StiBusinessObjectsCollection getBusinessObjects()
          Gets or sets collection of the business objects.
 DataSet getCacheDataSet()
           
static java.util.Hashtable getCacheUserNamesAndPasswords()
           
 StiDatabaseCollection getDatabases()
          Gets or sets collection of the databases.
 StiDataSourcesCollection getDataSources()
          Gets or sets collection of the data sources.
 StiDataCollection getDataStore()
          Gets or sets DataStore.
 boolean getisRequestFromUserVariablesPresent()
           
 StiDataRelation getRelation(java.lang.String dataRelationName)
           
 StiDataRelationsCollection getRelations()
          Gets or sets collection of relations.
 StiReport getReport()
          Gets or sets report in which given dictionary is placed.
 StiResourcesCollection getResources()
           
 StiRestrictions getRestrictions()
          Gets or sets collections of dictionary restrictions.
 boolean getShowOnlyAliasForVariable()
           
 boolean getUseInternalData()
          If the property is true then all data sources (including SQL sources) connect only with DataSet data, which were passed using RegData method.
 StiVariablesCollection getVariables()
          Gets or sets collection of variables.
 void LoadFromJsonObject(JSONObject jObject)
           
 void RegRelations(boolean b)
           
 void restoreState(java.lang.String stateName)
          Restores the earlier saved object state.
 void RestoreState(java.lang.String stateName)
          Restores the earlier saved object state.
 void RetrievalData(java.util.Hashtable usedRelations, java.util.Hashtable usedDataSources, java.util.Hashtable usedColumns)
          Returns Hashtables with the used relations, data sources and columns.
 void saveState(java.lang.String stateName)
          Saves the current state of an object.
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
static void setAutoSynchronize(StiAutoSynchronizeMode value)
           
 void setBusinessObjects(StiBusinessObjectsCollection value)
           
 void setCacheDataSet(DataSet value)
           
static void setCacheUserNamesAndPasswords(java.util.Hashtable value)
           
 void setDatabases(StiDatabaseCollection value)
           
 void setDataSources(StiDataSourcesCollection value)
           
 void setDataStore(StiDataCollection value)
           
 void setRelations(StiDataRelationsCollection value)
           
 void setReport(StiReport value)
           
 void setResources(StiResourcesCollection resources)
           
 void setRestrictions(StiRestrictions value)
           
 void setUseInternalData(boolean value)
           
 void setVariables(StiVariablesCollection value)
           
 boolean showOnlyAliasForBusinessObject()
           
 boolean ShowOnlyAliasForDatabase()
           
 boolean ShowOnlyAliasForDataColumn()
           
 boolean ShowOnlyAliasForDataRelation()
           
 void SortItems()
          Sorts the DataSources collection and columns in each DataSource.
 void SortItems(StiSortOrder order)
          Sorts the DataSources collection and columns in each DataSource.
 void SynchronizeBusinessObjects(int maxLevel)
          Synchronizes the business objects with report dictionary.
 
Methods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

variables

public StiVariablesCollection variables

dataSources

public StiDataSourcesCollection dataSources
Constructor Detail

StiDictionary

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


StiDictionary

public StiDictionary(StiReport report)
Creates a new object of the type StiDictionary.

Parameters:
report - Specifies Report contaning dictionary.
Method Detail

saveState

public void saveState(java.lang.String stateName)
Saves the current state of an object.

Specified by:
saveState in interface IStiStateSaveRestore
Parameters:
stateName - A name of the state being saved.

RestoreState

public void RestoreState(java.lang.String stateName)
Restores the earlier saved object state.

Parameters:
stateName - A name of the state being restored.

ClearAllStates

public void ClearAllStates()
Clears all earlier saved object states.


getCacheUserNamesAndPasswords

public static java.util.Hashtable getCacheUserNamesAndPasswords()

setCacheUserNamesAndPasswords

public static void setCacheUserNamesAndPasswords(java.util.Hashtable value)

getUseInternalData

public final boolean getUseInternalData()
If the property is true then all data sources (including SQL sources) connect only with DataSet data, which were passed using RegData method. DataNames of data sources are to be the same.


setUseInternalData

public final void setUseInternalData(boolean value)

getRestrictions

public final StiRestrictions getRestrictions()
Gets or sets collections of dictionary restrictions.


setRestrictions

public final void setRestrictions(StiRestrictions value)

getAutoSynchronize

public static StiAutoSynchronizeMode getAutoSynchronize()
Gets or sets Synchronization mode of the Dictionary.


setAutoSynchronize

public static void setAutoSynchronize(StiAutoSynchronizeMode value)

DoAutoSynchronize

public static void DoAutoSynchronize(StiReport report)
Synchronizes DataStore and Dictionary.

Parameters:
report - Report for Synchronization of the data.

getReport

public final StiReport getReport()
Gets or sets report in which given dictionary is placed.


setReport

public final void setReport(StiReport value)

getDataStore

public final StiDataCollection getDataStore()
Gets or sets DataStore.


setDataStore

public final void setDataStore(StiDataCollection value)

getVariables

public final StiVariablesCollection getVariables()
Gets or sets collection of variables.


setVariables

public final void setVariables(StiVariablesCollection value)

getResources

public StiResourcesCollection getResources()
Returns:
the resources

setResources

public void setResources(StiResourcesCollection resources)
Parameters:
resources - the resources to set

getDataSources

public final StiDataSourcesCollection getDataSources()
Gets or sets collection of the data sources.


setDataSources

public final void setDataSources(StiDataSourcesCollection value)

getDatabases

public final StiDatabaseCollection getDatabases()
Gets or sets collection of the databases.


setDatabases

public final void setDatabases(StiDatabaseCollection value)

getBusinessObjects

public final StiBusinessObjectsCollection getBusinessObjects()
Gets or sets collection of the business objects.


setBusinessObjects

public final void setBusinessObjects(StiBusinessObjectsCollection value)

getRelations

public StiDataRelationsCollection getRelations()
Gets or sets collection of relations.


setRelations

public void setRelations(StiDataRelationsCollection value)

getisRequestFromUserVariablesPresent

public final boolean getisRequestFromUserVariablesPresent()

SortItems

public final void SortItems()
Sorts the DataSources collection and columns in each DataSource.


SortItems

public final void SortItems(StiSortOrder order)
Sorts the DataSources collection and columns in each DataSource.

Parameters:
order - Specifies order of sorting items.

RetrievalData

public final void RetrievalData(java.util.Hashtable usedRelations,
                                java.util.Hashtable usedDataSources,
                                java.util.Hashtable usedColumns)
Returns Hashtables with the used relations, data sources and columns.

Parameters:
usedRelations - Used relations.
usedDataSources - Used data sources.
usedColumns - Used columns.

clear

public final void clear()
Clears data dictionary.


SynchronizeBusinessObjects

public final void SynchronizeBusinessObjects(int maxLevel)
Synchronizes the business objects with report dictionary.

Parameters:
maxLevel - Maximum level of nested business objects which will be checked.

connect

public final void connect()
Connects all Data Sources to data.

Throws:
StiException

connect

public final void connect(boolean loadData,
                          java.util.List<StiDataSource> dataSources)
Connects all Data Sources to data.

Throws:
StiException

ConnectVirtualDataSources

public final void ConnectVirtualDataSources()
Intenal use only.


ConnectCrossTabDataSources

public final void ConnectCrossTabDataSources()

ShowOnlyAliasForDataRelation

public boolean ShowOnlyAliasForDataRelation()

restoreState

public void restoreState(java.lang.String stateName)
Description copied from interface: IStiStateSaveRestore
Restores the earlier saved object state.

Specified by:
restoreState in interface IStiStateSaveRestore
Parameters:
stateName - A name of the state being restored.

clearAllStates

public void clearAllStates()
Description copied from interface: IStiStateSaveRestore
Clear all states.

Specified by:
clearAllStates in interface IStiStateSaveRestore

getRelation

public StiDataRelation getRelation(java.lang.String dataRelationName)

existRelation

public boolean existRelation(java.lang.String dataRelationName)

getShowOnlyAliasForVariable

public boolean getShowOnlyAliasForVariable()

showOnlyAliasForBusinessObject

public boolean showOnlyAliasForBusinessObject()

ShowOnlyAliasForDatabase

public boolean ShowOnlyAliasForDatabase()

ShowOnlyAliasForDataColumn

public boolean ShowOnlyAliasForDataColumn()

RegRelations

public void RegRelations(boolean b)

Disconnect

public void Disconnect()

getCacheDataSet

public final DataSet getCacheDataSet()

setCacheDataSet

public final void setCacheDataSet(DataSet value)

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