Class StiDictionary

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

public class StiDictionary extends StiSerializedObject implements Cloneable, IStiStateSaveRestore, IStiJsonReportObject
Class describes the dictionary data.
  • Field Details

  • Constructor Details

    • 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 Details

    • saveState

      public void saveState(String stateName)
      Saves the current state of an object.
      Specified by:
      saveState in interface IStiStateSaveRestore
      Parameters:
      stateName - A name of the state being saved.
    • save

      public void save(StiDictionarySLService service, OutputStream stream)
      Saves dictionary to the stream through provider.
      Parameters:
      service -
      stream -
    • RestoreState

      public void RestoreState(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.
    • merge

      public void merge(InputStream stream) throws IOException
      Throws:
      IOException
    • merge

      public void merge(StiDictionarySLService service, InputStream stream)
    • merge

      public void merge(StiDictionary dictionary)
    • load

      public void load(InputStream stream) throws IOException
      Throws:
      IOException
    • load

      public void load(StiDictionarySLService service, InputStream stream)
    • getCacheUserNamesAndPasswords

      public static Hashtable getCacheUserNamesAndPasswords()
    • setCacheUserNamesAndPasswords

      public static void setCacheUserNamesAndPasswords(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.
    • synchronize

      public void synchronize()
    • getUnusedRelationsFromDataStore

      public StiDataRelationsCollection getUnusedRelationsFromDataStore()
      Returns Collection of unused relations.
      Parameters:
      categories - Collection of unused relations will be added to this Hashtable.
      Returns:
      Returns Collection of unused relations.
    • 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)
    • removeDatabase

      public void removeDatabase(String name)
      Removes a database (connection) together with their data sources.
      Parameters:
      name -
    • removeDatabase

      public void removeDatabase(StiDatabase database)
      Removes a database (connection) together with their data sources.
      Parameters:
      database -
    • 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(Hashtable usedRelations, Hashtable usedDataSources, 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)
      Connects all Data Sources to data.
      Throws:
      StiException
    • connect

      public final void connect(boolean loadData, 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(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(String dataRelationName)
    • existRelation

      public boolean existRelation(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
    • removeUnusedRelations

      public void removeUnusedRelations()
    • getUserFunctions

      public StiUserFunctionsCollection getUserFunctions()
    • setUserFunctions

      public void setUserFunctions(StiUserFunctionsCollection userFunctions)
    • getReconnectListForRequestFromUserVariables

      public String[] getReconnectListForRequestFromUserVariables()
    • setReconnectListForRequestFromUserVariables

      public void setReconnectListForRequestFromUserVariables(String[] reconnectListForRequestFromUserVariables)