Package com.stimulsoft.report.dictionary
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 Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new object of the type StiDictionary.StiDictionary(StiReport report) Creates a new object of the type StiDictionary. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclear()Clears data dictionary.voidClear all states.voidClears all earlier saved object states.final voidconnect()Connects all Data Sources to data.final voidconnect(boolean loadData) Connects all Data Sources to data.final voidconnect(boolean loadData, List<StiDataSource> dataSources) Connects all Data Sources to data.final voidfinal voidIntenal use only.voidstatic voidDoAutoSynchronize(StiReport report) Synchronizes DataStore and Dictionary.booleanexistRelation(String dataRelationName) static StiAutoSynchronizeModeGets or sets Synchronization mode of the Dictionary.Gets or sets collection of the business objects.final DataSetstatic Hashtablefinal StiDatabaseCollectionGets or sets collection of the databases.final StiDataSourcesCollectionGets or sets collection of the data sources.final StiDataCollectionGets or sets DataStore.final booleanString[]getRelation(String dataRelationName) Gets or sets collection of relations.final StiReportGets or sets report in which given dictionary is placed.final StiRestrictionsGets or sets collections of dictionary restrictions.booleanReturns Collection of unused relations.final booleanIf the property is true then all data sources (including SQL sources) connect only with DataSet data, which were passed using RegData method.final StiVariablesCollectionGets or sets collection of variables.voidload(StiDictionarySLService service, InputStream stream) voidload(InputStream stream) voidLoadFromJsonObject(JSONObject jObject) voidmerge(StiDictionary dictionary) voidmerge(StiDictionarySLService service, InputStream stream) voidmerge(InputStream stream) voidRegRelations(boolean b) voidremoveDatabase(StiDatabase database) Removes a database (connection) together with their data sources.voidremoveDatabase(String name) Removes a database (connection) together with their data sources.voidvoidrestoreState(String stateName) Restores the earlier saved object state.voidRestoreState(String stateName) Restores the earlier saved object state.final voidRetrievalData(Hashtable usedRelations, Hashtable usedDataSources, Hashtable usedColumns) Returns Hashtables with the used relations, data sources and columns.voidsave(StiDictionarySLService service, OutputStream stream) Saves dictionary to the stream through provider.voidSaves the current state of an object.static voidfinal voidfinal voidsetCacheDataSet(DataSet value) static voidfinal voidfinal voidfinal voidsetDataStore(StiDataCollection value) voidsetReconnectListForRequestFromUserVariables(String[] reconnectListForRequestFromUserVariables) voidfinal voidvoidsetResources(StiResourcesCollection resources) final voidsetRestrictions(StiRestrictions value) final voidsetUseInternalData(boolean value) voidsetUserFunctions(StiUserFunctionsCollection userFunctions) final voidbooleanbooleanbooleanbooleanfinal voidSorts the DataSources collection and columns in each DataSource.final voidSortItems(StiSortOrder order) Sorts the DataSources collection and columns in each DataSource.voidfinal voidSynchronizeBusinessObjects(int maxLevel) Synchronizes the business objects with report dictionary.Methods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
-
Field Details
-
variables
-
dataSources
-
-
Constructor Details
-
StiDictionary
public StiDictionary()Creates a new object of the type StiDictionary. -
StiDictionary
Creates a new object of the type StiDictionary.- Parameters:
report- Specifies Report contaning dictionary.
-
-
Method Details
-
saveState
Saves the current state of an object.- Specified by:
saveStatein interfaceIStiStateSaveRestore- Parameters:
stateName- A name of the state being saved.
-
save
Saves dictionary to the stream through provider.- Parameters:
service-stream-
-
RestoreState
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
- Throws:
IOException
-
merge
-
merge
-
load
- Throws:
IOException
-
load
-
getCacheUserNamesAndPasswords
-
setCacheUserNamesAndPasswords
-
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
Gets or sets collections of dictionary restrictions. -
setRestrictions
-
getAutoSynchronize
Gets or sets Synchronization mode of the Dictionary. -
setAutoSynchronize
-
DoAutoSynchronize
Synchronizes DataStore and Dictionary.- Parameters:
report- Report for Synchronization of the data.
-
synchronize
public void synchronize() -
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
Gets or sets report in which given dictionary is placed. -
setReport
-
getDataStore
Gets or sets DataStore. -
setDataStore
-
removeDatabase
Removes a database (connection) together with their data sources.- Parameters:
name-
-
removeDatabase
Removes a database (connection) together with their data sources.- Parameters:
database-
-
getVariables
Gets or sets collection of variables. -
setVariables
-
getResources
- Returns:
- the resources
-
setResources
- Parameters:
resources- the resources to set
-
getDataSources
Gets or sets collection of the data sources. -
setDataSources
-
getDatabases
Gets or sets collection of the databases. -
setDatabases
-
getBusinessObjects
Gets or sets collection of the business objects. -
setBusinessObjects
-
getRelations
Gets or sets collection of relations. -
setRelations
-
getisRequestFromUserVariablesPresent
public final boolean getisRequestFromUserVariablesPresent() -
SortItems
public final void SortItems()Sorts the DataSources collection and columns in each DataSource. -
SortItems
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
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
Description copied from interface:IStiStateSaveRestoreRestores the earlier saved object state.- Specified by:
restoreStatein interfaceIStiStateSaveRestore- Parameters:
stateName- A name of the state being restored.
-
clearAllStates
public void clearAllStates()Description copied from interface:IStiStateSaveRestoreClear all states.- Specified by:
clearAllStatesin interfaceIStiStateSaveRestore
-
getRelation
-
existRelation
-
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
-
setCacheDataSet
-
SaveToJsonObject
- Specified by:
SaveToJsonObjectin interfaceIStiJsonReportObject- Throws:
JSONException
-
LoadFromJsonObject
- Specified by:
LoadFromJsonObjectin interfaceIStiJsonReportObject- Throws:
JSONException
-
removeUnusedRelations
public void removeUnusedRelations() -
getUserFunctions
-
setUserFunctions
-
getReconnectListForRequestFromUserVariables
-
setReconnectListForRequestFromUserVariables
public void setReconnectListForRequestFromUserVariables(String[] reconnectListForRequestFromUserVariables)
-