Class StiDatabase
java.lang.Object
com.stimulsoft.base.serializing.StiSerializedObject
com.stimulsoft.base.services.StiService
com.stimulsoft.report.dictionary.databases.StiDatabase
- All Implemented Interfaces:
IStiJsonReportObject,IStiSerializable,IStiSerializableRef,IStiName,ICloneable,IStiAlias,IStiInherited,Cloneable
- Direct Known Subclasses:
ChildDatabase,ParentDatabase,StiDatabaseEmpty,StiFileDatabase,StiJDBCDatabase,StiNoSqlDatabase
public abstract class StiDatabase
extends StiService
implements IStiInherited, IStiName, IStiJsonReportObject, IStiAlias, ICloneable
-
Field Summary
Fields inherited from class com.stimulsoft.base.services.StiService
propertiesFields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new object of the type StiDatabase.StiDatabase(String name) Creates a new object of the type StiDatabase.StiDatabase(String name, String alias) Creates a new object of the type StiDatabase. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDatabaseInformation(StiDatabaseInformation info, StiReport report, StiDatabaseInformation allInfo) clone()Creates a new object that is a copy of the current instance.voidconnect(StiDataStoreSource source, StiReport report) abstract voidconnect(StiDataStoreSource source, Boolean fillTable, StiReport report) voidcreateDataSources(StiDictionary dictionary) abstract voidintedit(boolean newDatabase) Calls the form for database edition.final StringgetAlias()Gets or sets alias of database.final StiConnectedEventOccurs when connection is activated.final StiConnectingEventOccurs when connection is activating.getDatabaseInformation(Connection con, StiAbstractAdapter adapter, StiReport report) final StiDisconnectedEventOccurs when connection is deactivated.final StiDisconnectingEventOccurs when connection is deactivating.final booleangetKey()final StringgetName()Gets or sets name of database.final StringGets a service category.Gets a service name.Class<?> Gets a service type.voidvoidvoidvoidvoidLoadFromJsonObject(JSONObject jObject) protected voidRaises the Connected event for this component.protected voidRaises the Disconnected event for this connection.protected voidRaises the Disconnecting event for this connection.protected StringvoidregData(StiDictionary dictionary, boolean loadData) Registers the database in dictionary.final voidfinal voidfinal voidfinal voidfinal voidfinal voidsetInherited(boolean value) voidfinal voidtoString()Methods inherited from class com.stimulsoft.base.services.StiService
getProperties, getServiceEnabled, getServiceInfo, isPropertyPresent, MemberwiseClone, packService, properties, setProperties, setServiceEnabledMethods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
-
Constructor Details
-
StiDatabase
public StiDatabase()Creates a new object of the type StiDatabase. -
StiDatabase
Creates a new object of the type StiDatabase.- Parameters:
name- Name of database.
-
StiDatabase
Creates a new object of the type StiDatabase.- Parameters:
name- Name of database.alias- Alias of database.
-
-
Method Details
-
clone
Description copied from class:StiServiceCreates a new object that is a copy of the current instance.- Specified by:
clonein interfaceICloneable- Overrides:
clonein classStiService- Returns:
- A new object that is a copy of this instance.
-
createDataSources
- Throws:
Exception
-
invokeConnecting
public void invokeConnecting() -
invokeConnected
public void invokeConnected() -
invokeDisconnecting
public void invokeDisconnecting() -
invokeDisconnected
public void invokeDisconnected() -
getInherited
public final boolean getInherited()- Specified by:
getInheritedin interfaceIStiInherited
-
setInherited
public final void setInherited(boolean value) - Specified by:
setInheritedin interfaceIStiInherited
-
getKey
- Returns:
- the key
-
setKey
- Parameters:
key- the key to set
-
getServiceCategory
Gets a service category.- Overrides:
getServiceCategoryin classStiService
-
getConnectingEvent
Occurs when connection is activating. -
setConnectingEvent
-
onConnected
Raises the Connected event for this component. -
getConnectedEvent
Occurs when connection is activated. -
setConnectedEvent
-
onDisconnecting
Raises the Disconnecting event for this connection. -
getDisconnectingEvent
Occurs when connection is deactivating. -
setDisconnectingEvent
-
onDisconnected
Raises the Disconnected event for this connection. -
getDisconnectedEvent
Occurs when connection is deactivated. -
setDisconnectedEvent
-
getName
Gets or sets name of database. -
setName
-
getAlias
Gets or sets alias of database. -
setAlias
-
getDatabaseInformation
public StiDatabaseInformation getDatabaseInformation(Connection con, StiAbstractAdapter adapter, StiReport report) throws Exception - Throws:
Exception
-
applyDatabaseInformation
public void applyDatabaseInformation(StiDatabaseInformation info, StiReport report, StiDatabaseInformation allInfo) -
edit
public int edit(boolean newDatabase) Calls the form for database edition.- Parameters:
newDatabase-- Returns:
- Result of editing.
-
regData
Registers the database in dictionary.- Parameters:
dictionary- Dictionary in which is registered database.loadData- Load the data or no.
-
getServiceType
Description copied from class:StiServiceGets a service type.- Specified by:
getServiceTypein classStiService
-
connect
- Throws:
StiException
-
connect
public abstract void connect(StiDataStoreSource source, Boolean fillTable, StiReport report) throws StiException - Throws:
StiException
-
disconnect
public abstract void disconnect() -
getServiceName
Description copied from class:StiServiceGets a service name.- Overrides:
getServiceNamein classStiService
-
toString
-
getString
-
parsePath
-
SaveToJsonObject
- Specified by:
SaveToJsonObjectin interfaceIStiJsonReportObject- Throws:
JSONException
-
LoadFromJsonObject
- Specified by:
LoadFromJsonObjectin interfaceIStiJsonReportObject- Throws:
JSONException
-