public class DBEnvironment extends DBComponent
Modifier and Type | Class and Description |
---|---|
static class |
DBEnvironment.DatabaseType
These constants are used to specify whether the DatabaseType is of any of the listed Types : Excel, CWM, ERWin, Access,DSV,JSON, XSD,
SqlServer, Oracle, SqlServerWindows, GreenPlum, TeraData, VERTICA, Pervasive, DB2, MySQL, SYBASE, SAP, BigDataCloudera,
BigDataHortonWorks, BigDataMapR, NETEZZA, AmazonRedshift, Salesforce, Snowflake, None.
|
static class |
DBEnvironment.DBOperation
These constants are used to specify whether the DBOperation can be an UPDATE, INSERT, VALIDATE, INVALIDATE OR SKIP.
|
Constructor and Description |
---|
DBEnvironment() |
DBEnvironment(java.lang.String envName) |
Modifier and Type | Method and Description |
---|---|
void |
addSchema(DBSchema schema)
Adds the schema as specified.
|
void |
addSchema(java.lang.String schemaName,
DBTable table)
Adds the specified schemaName to schemas.
|
void |
addTable(DBTable table)
Adds the table to the DBTable Object.
|
void |
addTable(java.lang.String name,
DBTable table)
Adds the table to DBTable Object as specified in name.
|
void |
addTableByReferenceId(DBTable table) |
void |
addTables(java.util.Map<java.lang.String,DBTable> tables)
Adds the List of tables to DBTable.
|
java.lang.String |
getChangeDescription() |
java.lang.String |
getDatabseType() |
int |
getEnvironmentId() |
java.lang.String |
getEnvironmentName()
Returns the environmentName.
|
DBEnvironment.DatabaseType |
getEnvironmentType()
Returns the environmentType.
|
java.lang.String |
getRefreshedBy()
Returns the refreshedBy value.
|
DBSchema |
getSchema(java.lang.String schemaName)
Returns the DBSchema Object as specified.
|
java.util.HashMap<java.lang.String,DBSchema> |
getSchemas()
Returns the HashMap of DBSchema Object.
|
int |
getSynonymsCount()
Returns the synonymsCount.
|
DBSystem |
getSystem()
Returns DBSystem consisting of system details like systemId, SystemName, Tables, Views, Synonyms,
Tables count, Views count, Synonyms count , Schemas etc.. |
DBTable |
getTable(java.lang.String name)
Returns DBTable consisting of TableType, EntityBaseType, TableName, TableDefinition,TableComments, Audit Details, UserDefined Fields etc...
|
int |
getTableCount()
Returns the tableCount.
|
java.util.Map<java.lang.String,DBTable> |
getTableMap()
Returns the tableMapi.e parentTable, schemaName, tableDefinitionComments, tableDefinition,
tableComments, logicalTableName, actualTableName, auditHistory Details etc... |
java.lang.Object |
getUserData()
Returns the userData.
|
java.lang.String |
getVersion() |
java.lang.String |
getVersionLabel() |
int |
getViewCount()
Returns the viewCount.
|
int |
getVisibility() |
void |
incrementTableCount(DBTable table) |
boolean |
isDataStewardChecked() |
boolean |
isValidateData() |
DBEnvironment |
markDBOperations(DBEnvironment targetEnvironment,
boolean freshUploadMode,
boolean updateAppendMode,
boolean insertMode,
boolean updateExistingMode)
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.
|
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.
|
void |
markDBOpertionForAll(DBEnvironment.DBOperation operation)
Marks the operation.
|
void |
setChangeDescription(java.lang.String changeDescription) |
void |
setDatabseType(java.lang.String databseType) |
void |
setDataStewardChecked(boolean dataStewardChecked) |
void |
setEnvironmentId(int environmentId) |
void |
setEnvironmentName(java.lang.String environmentName)
Sets the environmentName as specified.
|
void |
setEnvironmentType(DBEnvironment.DatabaseType environmentType)
Sets the environmentType as specified.
|
void |
setRefreshedBy(java.lang.String refreshedBy)
Sets the refreshedBy value as specified.
|
void |
setSchemas(java.util.HashMap<java.lang.String,DBSchema> schemas)
Sets the schemas as specified.
|
void |
setSynonymsCount(int _synonymsCount) |
void |
setSystem(DBSystem system)
Sets the System value as specified.
|
void |
setTableCount(int _tableCount) |
void |
setTableMap(java.util.Map<java.lang.String,DBTable> tableMap)
Sets the tableMap as specified.
|
void |
setUserData(java.lang.Object userData)
Sets the userData as specified.
|
void |
setValidateData(boolean validateData) |
void |
setVersion(java.lang.String version) |
void |
setVersionLabel(java.lang.String versionLabel) |
void |
setViewCount(int _viewCount) |
void |
setVisibility(int visibility) |
java.lang.String |
toString()
toString() method returns the string representation of the schemas.
|
void |
validate(boolean valid)
validates the tableType as true or false for TABLE, VIEW, SYNONYM.
|
getDataStewardName, isMarked, setDataStewardName, setMarked
public DBEnvironment()
public DBEnvironment(java.lang.String envName)
envName
- Stringpublic int getEnvironmentId()
public void setEnvironmentId(int environmentId)
environmentId
- public DBSystem getSystem()
public void setSystem(DBSystem system)
system
- DBSystem Objectpublic java.lang.String getEnvironmentName()
public void setEnvironmentName(java.lang.String environmentName)
environmentName
- Stringpublic java.lang.String getRefreshedBy()
public void setRefreshedBy(java.lang.String refreshedBy)
refreshedBy
- Stringpublic java.util.Map<java.lang.String,DBTable> getTableMap()
public void setTableMap(java.util.Map<java.lang.String,DBTable> tableMap)
tableMap
- Mappublic DBTable getTable(java.lang.String name)
name
- Stringpublic void addTable(java.lang.String name, DBTable table)
name
- Stringtable
- DBTable Objectpublic void addTable(DBTable table)
table
- DBTablepublic void addTableByReferenceId(DBTable table)
public void addTables(java.util.Map<java.lang.String,DBTable> tables)
tables
- Mappublic void setTableCount(int _tableCount)
public int getTableCount()
public void setViewCount(int _viewCount)
public int getViewCount()
public void setSynonymsCount(int _synonymsCount)
public int getSynonymsCount()
public void incrementTableCount(DBTable table)
public java.util.HashMap<java.lang.String,DBSchema> getSchemas()
public void setSchemas(java.util.HashMap<java.lang.String,DBSchema> schemas)
schemas
- HashMappublic void addSchema(java.lang.String schemaName, DBTable table)
schemaName
- Stringtable
- DBTable Objectpublic DBEnvironment markDBOperationsByReferenceId(DBEnvironment targetEnvironment, boolean freshUploadMode, boolean updateAppendMode, boolean insertMode, boolean updateExistingMode)
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.
targetEnvironment
- DBEnvironment ObjectfreshUploadMode
- booleanupdateAppendMode
- booleaninsertMode
- booleanpublic DBEnvironment markDBOperations(DBEnvironment targetEnvironment, boolean freshUploadMode, boolean updateAppendMode, boolean insertMode, boolean updateExistingMode)
targetEnvironment
- DBEnvironmentfreshUploadMode
- booleanupdateAppendMode
- booleaninsertMode
- booleanpublic void markDBOpertionForAll(DBEnvironment.DBOperation operation)
operation
- DBEnvironment Objectpublic void validate(boolean valid)
valid
- booleanpublic DBSchema getSchema(java.lang.String schemaName)
schemaName
- Stringpublic void addSchema(DBSchema schema)
schema
- DBSchema Objectpublic java.lang.String toString()
toString
in class java.lang.Object
public DBEnvironment.DatabaseType getEnvironmentType()
public void setEnvironmentType(DBEnvironment.DatabaseType environmentType)
environmentType
- DatabaseTypepublic java.lang.Object getUserData()
public void setUserData(java.lang.Object userData)
userData
- Objectpublic boolean isDataStewardChecked()
public void setDataStewardChecked(boolean dataStewardChecked)
dataStewardChecked
- public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- public java.lang.String getVersionLabel()
public void setVersionLabel(java.lang.String versionLabel)
versionLabel
- public java.lang.String getChangeDescription()
public void setChangeDescription(java.lang.String changeDescription)
changeDescription
- public int getVisibility()
public void setVisibility(int visibility)
visibility
- public java.lang.String getDatabseType()
public void setDatabseType(java.lang.String databseType)
public boolean isValidateData()
public void setValidateData(boolean validateData)