Class DBEnvironment
- Author:
- AnalytiX DS
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThese constants are used to specify whether the DatabaseType is of any of the listed Types : Excel, CWM, ETL, ERWin, Access,DSV,JSON, XSD, SqlServer, Oracle, SqlServerWindows, GreenPlum, TeraData, VERTICA, Pervasive, DB2, MySQL, SYBASE, SAP, BigDataCloudera, BigDataHortonWorks, BigDataMapR, NETEZZA, AmazonRedshift, Salesforce, Snowflake, BigQuery and None.static enumThese constants are used to specify whether the DBOperation can be an UPDATE, INSERT, VALIDATE, INVALIDATE OR SKIP. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssociationsList(com.ads.association.export.model.ExportedAssociation associationObj) It will not add association to this object as it is being used internally.addExtendedProperty(KeyValue extendedProperty) Adds the KeyValue Object for the specified table.voidAdds the schema as specified.voidAdds the specified schemaName to schemas.voidAdds the table to the DBTable Object.voidAdds the table to DBTable Object as specified in name.voidaddTableByReferenceId(DBTable table) voidAdds the List of tables to DBTable.List<com.ads.association.export.model.ExportedAssociation>It will not return any associations particular to this object as it is being used internally.Returns the businessEntityType.Returns the changeDescription.intReturns the ComponentsCount.Returns the databseType.intReturns the environmentName.Returns the environmentType.Returns the list of KeyValue objects.Returns the refreshedBy value.Returns the DBSchema Object as specified.Returns the HashMap of DBSchema Object.intReturns the synonymsCount.Returns DBSystem consisting of system details like systemId, SystemName, Tables, Views, Synonyms,components,
Tables count, Views count, Synonyms count , Components count, Schemas etc..Returns DBTable consisting of TableType, EntityBaseType, TableName, TableDefinition,TableComments, Audit Details, UserDefined Fields etc...intReturns the tableCount.Returns the tableMapi.e parentTable, schemaName, tableDefinitionComments, tableDefinition,
tableComments, logicalTableName, actualTableName, auditHistory Details etc...getTags()Returns the userData.Returns the version.Returns the versionLabel.intReturns the viewCount.intReturns the visibility.voidincrementTableCount(DBTable table) booleanDeprecated.booleanReturns the validateData as true or false.booleanReturns the versionIfChangesExists.markDBOperations(DBEnvironment targetEnvironment, boolean freshUploadMode, boolean updateAppendMode, boolean insertMode, boolean updateExistingMode, DBHelper dbHelper) Returns the DBEnvironment Object for the specified targetEnvironment, operation modes in which the environment will be saved i.e fresh upload, update append and insert modes.markDBOperationsByReferenceId(DBEnvironment targetEnvironment, boolean freshUploadMode, boolean updateAppendMode, boolean insertMode, boolean updateExistingMode) Returns the DBEnvironment Object for the specified targetEnvironment and operation modes in which the environment will be saved i.e fresh upload, update append and insert modes.voidmarkDBOpertionForAll(DBEnvironment.DBOperation operation) Marks the operation.setAssociationsList(List<com.ads.association.export.model.ExportedAssociation> associations) It will not set any associations particular to this object as it is being used internally.voidsetBusinessEntityType(String businessEntityType) Sets the businessEntityType as specified.voidsetChangeDescription(String changeDescription) Sets the changeDescription as specified.voidsetComponentsCount(int _componentsCount) Sets the componentsCount.voidsetDatabseType(String databseType) Sets the databseType as specified.voidsetDataStewardChecked(boolean dataStewardChecked) Deprecated.voidsetEnvironmentId(int environmentId) Sets the environmentId as specified.voidsetEnvironmentName(String environmentName) Sets the environmentName as specified.voidsetEnvironmentType(DBEnvironment.DatabaseType environmentType) Sets the environmentType as specified.voidsetExtendedProperties(List<KeyValue> extendedProperties) Method sets the list of KeyValue objects as specified.voidsetRefreshedBy(String refreshedBy) Sets the refreshedBy value as specified.voidsetSchemas(HashMap<String, DBSchema> schemas) Sets the schemas as specified.voidsetSdiClassifications(List<SDIClassification> sdiClassifications) voidsetSynonymsCount(int _synonymsCount) voidSets the System value as specified.voidsetTableCount(int _tableCount) voidsetTableMap(Map<String, DBTable> tableMap) Sets the tableMap as specified.voidvoidsetUserData(Object userData) Sets the userData as specified.voidsetValidateData(boolean validateData) Sets the validateData as true or false.voidsetVersion(String version) Sets the version as specified.voidsetVersionIfChangesExists(boolean versionIfChangesExists) Sets the versionIfChangesExists as specified.voidsetVersionLabel(String versionLabel) Sets the versionLabel as specified.voidsetViewCount(int _viewCount) voidsetVisibility(int visibility) Sets the visibility as specified.toString()toString() method returns the string representation of the schemas.voidvalidate(boolean valid) validates the tableType as true or false for TABLE, VIEW, SYNONYM.Methods inherited from class com.ads.mm.db.dao.DBComponent
getDataStewardName, isMarked, setDataStewardName, setMarked
-
Constructor Details
-
DBEnvironment
public DBEnvironment() -
DBEnvironment
- Parameters:
envName- String
-
-
Method Details
-
getEnvironmentId
public int getEnvironmentId()- Returns:
-
setEnvironmentId
public void setEnvironmentId(int environmentId) Sets the environmentId as specified.- Parameters:
environmentId- int
-
getSystem
Returns DBSystem consisting of system details like systemId, SystemName, Tables, Views, Synonyms,components,
Tables count, Views count, Synonyms count , Components count, Schemas etc..- Returns:
- DBSystem - object
-
setSystem
Sets the System value as specified.- Parameters:
system- DBSystem Object
-
getEnvironmentName
Returns the environmentName.- Returns:
- environmentName String
-
setEnvironmentName
Sets the environmentName as specified.- Parameters:
environmentName- String
-
getRefreshedBy
Returns the refreshedBy value.- Returns:
- refreshedBy String
-
setRefreshedBy
Sets the refreshedBy value as specified.- Parameters:
refreshedBy- String
-
getTableMap
Returns the tableMapi.e parentTable, schemaName, tableDefinitionComments, tableDefinition,
tableComments, logicalTableName, actualTableName, auditHistory Details etc...- Returns:
- tableMap Map
-
setTableMap
Sets the tableMap as specified.- Parameters:
tableMap- Map
-
getTable
Returns DBTable consisting of TableType, EntityBaseType, TableName, TableDefinition,TableComments, Audit Details, UserDefined Fields etc...- Parameters:
name- String- Returns:
- DBTable - object
-
addTable
Adds the table to DBTable Object as specified in name. Specifying the name is mandatory.- Parameters:
name- Stringtable- DBTable Object
-
getExtendedProperties
Returns the list of KeyValue objects.- Returns:
- extendedProperties List
-
setExtendedProperties
Method sets the list of KeyValue objects as specified.- Parameters:
extendedProperties- String
-
addExtendedProperty
Adds the KeyValue Object for the specified table.- Parameters:
extendedProperty- KeyValue- Returns:
- DBEnvironment object.
-
addTable
Adds the table to the DBTable Object.- Parameters:
table- DBTable
-
addTableByReferenceId
-
addTables
Adds the List of tables to DBTable.- Parameters:
tables- Map
-
setTableCount
public void setTableCount(int _tableCount) -
getTableCount
public int getTableCount()Returns the tableCount.- Returns:
- int - tableCount
-
setViewCount
public void setViewCount(int _viewCount) -
getViewCount
public int getViewCount()Returns the viewCount.- Returns:
- int - viewCount
-
setSynonymsCount
public void setSynonymsCount(int _synonymsCount) -
getSynonymsCount
public int getSynonymsCount()Returns the synonymsCount.- Returns:
- int - synonymsCount
-
setComponentsCount
public void setComponentsCount(int _componentsCount) Sets the componentsCount.- Parameters:
_componentsCount- int
-
getComponentsCount
public int getComponentsCount()Returns the ComponentsCount.- Returns:
- int - componentsCount
-
incrementTableCount
-
getSchemas
Returns the HashMap of DBSchema Object.
DBSchema consists of details related to table, tableMap, tables, view, viewMap, views, synonym, synonymMap, synonyms, component, componentMap, components.- Returns:
- hashMap - Schemas
-
setSchemas
Sets the schemas as specified.- Parameters:
schemas- HashMap
-
addSchema
Adds the specified schemaName to schemas.- Parameters:
schemaName- Stringtable- DBTable Object
-
markDBOperationsByReferenceId
public DBEnvironment markDBOperationsByReferenceId(DBEnvironment targetEnvironment, boolean freshUploadMode, boolean updateAppendMode, boolean insertMode, boolean updateExistingMode) Returns the DBEnvironment Object for the specified targetEnvironment and operation modes in which the environment will be saved i.e fresh upload, update append and insert modes.
Specification of targetEnvironment and operation are mandatory.DBProperties Object specifies the operation modes in which the environment will be saved i.e fresh upload, update append and append modes.
Simple insertMode is used when environment is save for the first time i.e add new option.
Update append mode is used when previously loaded environment is modified and few new tables are appended to the environment.
Fresh upload mode is used when the previously loaded environment tables are to be deleted and new tables will be inserted in to the environment.This method is used in the event when the useReferenceId is set, i.e useReferenceId value is set to true or false depending on the databaseType in which the environment is saved.
useReferenceId value for ERWIN and CWM is true, for other databaseTypes it is false.
If the useReferenceId is true, the environment is loaded based on checking the table reference id which is set to the tables in the specific environment. If the value is false, the environment gets loaded with out checking the table referenceId which is set to the tables.
- Parameters:
targetEnvironment- DBEnvironment ObjectfreshUploadMode- booleanupdateAppendMode- booleaninsertMode- boolean- Returns:
- DBEnvironment Object
-
markDBOperations
public DBEnvironment markDBOperations(DBEnvironment targetEnvironment, boolean freshUploadMode, boolean updateAppendMode, boolean insertMode, boolean updateExistingMode, DBHelper dbHelper) Returns the DBEnvironment Object for the specified targetEnvironment, operation modes in which the environment will be saved i.e fresh upload, update append and insert modes.
Simple insertMode is used when environment is saves for the first time i.e add new option.
Update append mode is used when previously loaded environment is modified and few new tables are appended to the environment.
Fresh upload mode is used when the previously loaded environment tables are to be deleted and new tables will be inserted in to the environment.- Parameters:
targetEnvironment- DBEnvironmentfreshUploadMode- booleanupdateAppendMode- booleaninsertMode- boolean- Returns:
- DBEnvironment Object
-
markDBOpertionForAll
Marks the operation. Operation can be UPDATE, INSERT, VALIDATE, INVALIDATE, SKIP.- Parameters:
operation- DBEnvironment Object
-
validate
public void validate(boolean valid) validates the tableType as true or false for TABLE, VIEW, SYNONYM.- Parameters:
valid- boolean
-
getSchema
Returns the DBSchema Object as specified.- Parameters:
schemaName- String- Returns:
- DBSchema - Object
-
addSchema
Adds the schema as specified.- Parameters:
schema- DBSchema Object
-
toString
toString() method returns the string representation of the schemas. -
getEnvironmentType
Returns the environmentType.- Returns:
- DatabaseType environmentType
-
setEnvironmentType
Sets the environmentType as specified.
environmentType can be Excel, CWM, ETL, ERWin, Access,DSV,JSON, XSD, SqlServer, Oracle, SqlServerWindows, GreenPlum,
Teradata, Vertica, Pervasive, DB2, MySQL, Sybase, SAP, BigDataCloudera, BigDataHortonWorks, BigDataMapR, BigQuery, Netezza, AmazonRedshift, None.- Parameters:
environmentType- DatabaseType
-
getUserData
Returns the userData.- Returns:
- Object
-
setUserData
Sets the userData as specified.- Parameters:
userData- Object
-
isDataStewardChecked
Deprecated.Returns the dataStewardChecked as true or false.- Returns:
- dataStewardChecked boolean
-
setDataStewardChecked
Deprecated.Sets the dataStewardChecked as specified as true or false.- Parameters:
dataStewardChecked- boolean
-
getVersion
Returns the version.- Returns:
- version String
-
setVersion
Sets the version as specified.- Parameters:
version- String
-
getVersionLabel
Returns the versionLabel.- Returns:
- versionLabel String
-
setVersionLabel
Sets the versionLabel as specified.- Parameters:
versionLabel- String
-
getChangeDescription
Returns the changeDescription.- Returns:
- changeDescription String
-
setChangeDescription
Sets the changeDescription as specified.- Parameters:
changeDescription- String
-
getVisibility
public int getVisibility()Returns the visibility.- Returns:
- visibility int
-
setVisibility
public void setVisibility(int visibility) Sets the visibility as specified.- Parameters:
visibility- int
-
getDatabseType
Returns the databseType.- Returns:
- databseType String
-
setDatabseType
Sets the databseType as specified.- Parameters:
databseType- String
-
isValidateData
public boolean isValidateData()Returns the validateData as true or false.- Returns:
- validateData boolean
-
setValidateData
public void setValidateData(boolean validateData) Sets the validateData as true or false.- Parameters:
validateData- boolean
-
getBusinessEntityType
Returns the businessEntityType.- Returns:
- businessEntityType String
-
setBusinessEntityType
Sets the businessEntityType as specified.- Parameters:
businessEntityType- String
-
isVersionIfChangesExists
public boolean isVersionIfChangesExists()Returns the versionIfChangesExists.- Returns:
- versionIfChangesExists boolean
-
setVersionIfChangesExists
public void setVersionIfChangesExists(boolean versionIfChangesExists) Sets the versionIfChangesExists as specified.- Parameters:
versionIfChangesExists- boolean
-
getTags
-
setTags
-
addTag
-
getAssociationsList
It will not return any associations particular to this object as it is being used internally. Please use Associations api to fetch the associations.- Returns:
- list of associations
-
setAssociationsList
public DBEnvironment setAssociationsList(List<com.ads.association.export.model.ExportedAssociation> associations) It will not set any associations particular to this object as it is being used internally.- Parameters:
associations-- Returns:
-
addAssociationsList
public DBEnvironment addAssociationsList(com.ads.association.export.model.ExportedAssociation associationObj) It will not add association to this object as it is being used internally.- Parameters:
associations-- Returns:
-
getSdiClassifications
-
setSdiClassifications
-