Package com.jedox.palojlib.interfaces
Interface IDatabase
- All Known Implementing Classes:
Database
public interface IDatabase
represent a database in olap server
- Author:
- khaddadin
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
database types in olap server -
Method Summary
Modifier and TypeMethodDescriptionaddCube
(String name, IDimension[] dimensions) Create a new cube with type normaladdCube
(String name, IDimension[] dimensions, ICube.CubeType type) Create a new cube with type normaldefault ICube
addCube
(String name, IDimension[] dimensions, ICube.CubeType type, ICube basesCube) Create a new cube with type normaladdDimension
(String name) Create a new dimension with type normaladdDimension
(String name, IDimension.DimensionType type) Create a new dimensiondefault IDimension
addDimension
(String name, IDimension.DimensionType type, boolean generateDefaultSubsets) Create a new dimensiondefault void
Deprecated.void
backup
(String backupPath, boolean show_system, boolean include_archive, boolean show_audit, boolean include_csv, String password) backup the database to disk.default String
generateScript
(IDatabaseScriptContext databaseScriptContext) getCubeByName
(String name) Get a certain cube by it is name, return null if does not exist.ICube[]
getCubes()
Get the list of the cubes in the database including all types of cubes: normal,attribute,system, userinfo and gpu.ICube[]
getCubes
(IDimension dim) Get the list of the cubes which include the given dimension.database infoIDatabaseInfo
long
size of the Olap databasegetDimensionByName
(String name) Get a certain dimension by it is name, return null if does not exist.Get the list of the dimensions in the database including all types of dimensionsint
getId()
Get the id of the databasegetLanguageByName
(String language) Element[]
getName()
Get the name of the databasedefault IDatabaseScriptContext
getType()
Get the type of the databaseIDatabase.DatabaseType
void
removeCube
(ICube cube) remove a certain cube, the cube will be moved depending on its id.void
removeDimension
(IDimension dimension) remove a certain dimension, the dimension will be moved depending on its id.void
rename a database.void
clear any cached information if exists, the expiry trust time will not be affected.void
save()
save the database to diskdefault void
save
(boolean complete) Deprecated.This method is deprecated, usesave()
instead.void
setCacheTrustExpiries
(int databaseExpiry, int cubeExpiry, int dimensionExpiry) set the default cache trust time for the components
-
Method Details
-
getId
int getId()Get the id of the database- Returns:
- the id
-
getName
String getName()Get the name of the database- Returns:
- the name of the database
-
getDatabaseInfo
IDatabaseInfo getDatabaseInfo()database infoIDatabaseInfo
- Returns:
- database info
-
getDatabaseMemorySize
long getDatabaseMemorySize()size of the Olap database- Returns:
- number of Bytes
-
getType
IDatabase.DatabaseType getType()Get the type of the databaseIDatabase.DatabaseType
- Returns:
- type of the database
-
getDimensions
Get the list of the dimensions in the database including all types of dimensions- Returns:
- list of the dimensions
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getCubes
Get the list of the cubes in the database including all types of cubes: normal,attribute,system, userinfo and gpu.- Returns:
- list of the cubes
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getCubes
Get the list of the cubes which include the given dimension.- Parameters:
dim
- dimension- Returns:
- list of the cubes
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDimension
Create a new dimension with type normal- Parameters:
name
- name of the new dimension- Returns:
- the newly created dimension
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDimension
IDimension addDimension(String name, IDimension.DimensionType type) throws PaloException, PaloJException Create a new dimension- Parameters:
name
- name of the new dimensiontype
- type of the dimension (normal, user info)- Returns:
- the newly created dimension
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addDimension
default IDimension addDimension(String name, IDimension.DimensionType type, boolean generateDefaultSubsets) throws PaloException, PaloJException Create a new dimension- Parameters:
name
- name of the new dimensiontype
- type of the dimension (normal, user info)generateDefaultSubsets
- If true the default subsets are generated for the dimension- Returns:
- the newly created dimension
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addCube
Create a new cube with type normal- Parameters:
name
- name of the new cubedimensions
- list of dimensions- Returns:
- the newly created cube
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addCube
ICube addCube(String name, IDimension[] dimensions, ICube.CubeType type) throws PaloException, PaloJException Create a new cube with type normal- Parameters:
name
- name of the new cubedimensions
- list of dimensionstype
- type of the cube (normal, user info)- Returns:
- the newly created cube
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
addCube
default ICube addCube(String name, IDimension[] dimensions, ICube.CubeType type, ICube basesCube) throws PaloException, PaloJException Create a new cube with type normal- Parameters:
name
- name of the new cube,dimensions
- list of dimensionstype
- type of the cube (normal, user info)basesCube
- the cube will be used as a base cube for the newly created cube.- Returns:
- the newly created cube
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getDimensionByName
Get a certain dimension by it is name, return null if does not exist.- Parameters:
name
- name of the needed dimension- Returns:
- dimension
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
getCubeByName
Get a certain cube by it is name, return null if does not exist.- Parameters:
name
- name of the needed cube- Returns:
- cube
- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
removeCube
remove a certain cube, the cube will be moved depending on its id.- Parameters:
cube
- cube to be removed- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
removeDimension
remove a certain dimension, the dimension will be moved depending on its id.- Parameters:
dimension
- dimension to be removed- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
save
save the database to disk- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
save
Deprecated.This method is deprecated, usesave()
instead.save the database to disk.- Parameters:
complete
- when true also all cubes data will be saved, otherwise false.- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
backup
Deprecated.This method is deprecated, usebackup(String, boolean, boolean, boolean, boolean, String)
instead. Setshow_system
,include_archive
andshow_audit
tofalse
, setinclude_csv
totrue
and passnull
aspassword
.backup the database to disk.- Parameters:
backupPath
- Path to file with Zip extension where the backup of the database will be saved.- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
backup
void backup(String backupPath, boolean show_system, boolean include_archive, boolean show_audit, boolean include_csv, String password) throws PaloException, PaloJException backup the database to disk.- Parameters:
backupPath
- Path to file with Zip extension where the backup of the database will be saved.show_system
- include also System DB to the archiveinclude_archive
- nclude also archive filesshow_audit
- include also audit file to the archiveinclude_csv
- include also csv filespassword
- encrypt archive with password if set. (null if no encryption should be done)- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
rename
rename a database.- Parameters:
newname
- new database name- Throws:
PaloException
- exception from OLAP serverPaloJException
- exception from the library itself
-
setCacheTrustExpiries
void setCacheTrustExpiries(int databaseExpiry, int cubeExpiry, int dimensionExpiry) set the default cache trust time for the components- Parameters:
databaseExpiry
- time in ms in which database cache will be trustedcubeExpiry
- time in ms in which cube cache will be trusteddimensionExpiry
- time in ms in which dimension cache will be trusted
-
resetCaches
void resetCaches()clear any cached information if exists, the expiry trust time will not be affected. -
getLanguages
- Throws:
PaloException
PaloJException
-
getLanguageByName
- Throws:
PaloException
PaloJException
-
generateScript
-
getScriptContext
-
backup(String, boolean, boolean, boolean, boolean, String)
instead.