Package com.ads.mm.db.util
Class DBHelper
java.lang.Object
com.ads.mm.db.util.DBHelper
This class consists of methods relating to dbDriver, dbSchema, maximumConnectionsPerPartition, minimumConnectionsPerPartition
partitions, rowSeparator,dbUrl, ipAddress etc...
partitions, rowSeparator,dbUrl, ipAddress etc...
- Author:
- AnalytiX DS
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThese ENUM constants are used to specify whether the ModelType can be PHYSICAL and LOGICAL.static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the client.com.quest.xml.cwm.CWMUtil.VersionReturns the cwmVersion.Returns the DBDriver.Returns the dataBaseName.Returns the DbPassword.Returns the dataBaseSchema.Returns the databaseType.Returns the DBUrl.Returns the DbUserName.Returns the dbDriver.Returns the dbName.Returns the dbPassword.Returns the DBProperties Object.Returns the dbSchema.getDbUrl()Returns the dbUrl.Returns the dbUserName.Returns the destinationName.Returns the fieldSeparator.Returns the filePath.Returns the path type of the given file.i.e ABSOLUTE OR RELATIVEReturns the ipAddress.intReturns the maximumConnectionsPerPartition.intReturns the minimumConnectionsPerPartition.intReturns the partitions.intReturns the rowSeparator.Sets the scanOptions as specified.Returns the selectedEntities.Returns the selectedObjectsList.This method returns map object in which key is schema name and value is list of selected synonyms.Returns the selectedSynonymsList.This method returns map object in which key is schema name and value is list of selected tables.Returns the selectedTablesList.Returns the selectedTablesString.This method returns map object in which key is schema name and value is list of selected views.Returns the selectedViewsList.Returns the selectedViewsString.intReturns the systemNumber.Returns the testConnectionQuery.booleanReturns the autoCommit value.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanReturns the readColumns value as True or False.booleanReturns the readComments value as True or False.booleanReturns the readHeader value.booleanReturns the readLogicalColumns value as True or False.booleanReturns the readSynonyms value as True or False.booleanReturns the readTables value as True or False.booleanReturns the readViews value as True or False.booleanbooleanbooleanReturns the autoCommit value.booleanReturns the testConnectionPeriodically value as true or false.booleanbooleanbooleanbooleanvoidsetAutoCommit(boolean autoCommit) Sets the autoCommit value.voidSets the client as specified.voidsetConnectionPoolType(DBProperties.ConnectionPoolType connectionPoolType) voidsetCWMVersion(com.quest.xml.cwm.CWMUtil.Version cwmVersion) Sets the cwmVersion as specified.voidsetDatabaseDriver(String dbDriver) Sets the DBDriver value as specified.voidsetDatabaseName(String dbName) Sets the dataBaseName as specified.voidsetDatabasePassword(String dbPassword) Sets the DbPassword as specified.voidsetDatabaseSchema(String dbSchema) Sets the dataBaseSchema as specified.voidsetDatabaseType(DBProperties.DatabaseType databaseType) Sets the databaseType as specified.voidsetDatabaseUrl(String dbUrl) Sets the DBUrl as specified.voidsetDatabaseUserName(String dbUserName) Sets the DbUserName as specified.voidsetDbDriver(String dbDriver) Sets the dbDriver as specified.voidSets the dbName as specified.voidsetDbPassword(String dbPassword) Sets the dbPassword as specified.voidsetDbSchema(String dbSchema) Sets the dbSchema as specified.voidSets the dbUrl as specified.voidsetDbUserName(String dbUserName) Sets the dbUserName as specified.voidsetDestinationName(String destinationName) Sets the destinationName as specified.voidsetDumpFiles(boolean dumpFiles) voidsetFieldSeparator(String fieldSeparator) sets the fieldSeparator as specified.voidsetFilePath(String filePath) Sets the filePath as specified.voidsetFilePathType(APIConstants.FilePathType filePathType) Method sets the path type for the specified file.voidsetGenerateSummary(boolean generateSummary) voidsetHasAccessToDba(boolean hasAccessToDba) voidsetImportAssociations(boolean importAssociations) voidsetImportExtendedProperties(boolean importExtendedProperties) voidsetImportSdi(boolean importSdi) voidsetImportTags(boolean importTags) voidsetImportViewType(String importViewType) voidsetIpAddress(String ipAddress) Sets the ipAddress as specified.voidsetKerberosPrincipal(String kerberosPrincipal) voidsetMaximumConnectionsPerPartition(int maximumConnectionsPerPartition) Sets the maximumConnectionsPerPartition as specified.voidsetMinimumConnectionsPerPartition(int minimumConnectionsPerPartition) Sets the minimumConnectionsPerPartition as specified.voidsetModelType(DBHelper.ModelType modelType) voidsetParseHiveComplexDataType(boolean parseHiveComplexDataType) voidsetPartitions(int partitions) Sets the partitions as specified.voidsetQueryBatchLimit(int queryBatchLimit) voidsetReadColumns(boolean readColumns) Sets the readColumns value as specified.voidsetReadComments(boolean readComments) Sets the readComments as specified.voidsetReadHeader(boolean readHeader) Sets the readHeader as specified.voidsetReadLogicalColumns(boolean readLogicalColumns) Sets the readLogicalColumns as specified.voidsetReadOnly(String readOnly) voidsetReadSynonyms(boolean readSynonyms) Sets the readSynonyms as specified.voidsetReadTables(boolean readTables) Sets the readTables value as specified.voidsetReadViews(boolean readViews) Sets the readViews as specified.voidsetRowSeparator(String rowSeparator) Sets the rowSeparator as specified.voidsetScanCriteria(DBHelper.ScanCriteria scanCriteria) voidsetScanNestedRefSynonyms(boolean scanNestedRefSynonyms) voidsetScanOptions(String scanOptions) Sets the scanOptions as specified.voidsetSelectedEntities(List selectedEntities) Sets the selectedEntities as specified.voidsetSelectedObjectsList(List<String> selectedObjectsList) Sets the selectedObjectsList as specified.voidsetSelectedSynonyms(Map<String, List<String>> selectedSynonyms) This method is defined to set the selected synonyms to DBHelper Object.voidsetSelectedSynonymsList(List<String> selectedSynonymsList) Sets the selectedSynonymsList as specified.voidsetSelectedTables(Map<String, List<String>> selectedTables) This method is defined to set the selected tables to DBHelper Object.voidsetSelectedTablesList(List<String> selectedTablesList) Sets the selectedTablesList as specified.voidsetSelectedTablesString(StringBuilder selectedTablesString) Sets the selectedTablesString as specified.voidsetSelectedViews(Map<String, List<String>> selectedViews) This method is defined to set the selected views to DBHelper Object.voidsetSelectedViewsList(List<String> selectedViewsList) Sets the selectedViewsList as specified.voidsetSelectedViewsString(StringBuilder selectedViewsString) Sets the selectedViewsString as specified.voidsetSkipEmptyCells(boolean skipEmptyCells) voidsetSshPort(int sshPort) voidsetSupportAutoCommit(boolean supportAutoCommit) Sets the supportAutoCommit value.voidsetSystemNumber(String systemNumber) Sets the systemNumber as specified.voidsetTestConnectionPeriodically(boolean _testConnectionPeriodically) Sets the testConnectionPeriodically value as specified.voidsetTestConnectionQuery(String _testConnectionQuery) Sets the testConnectionQuery as specified.voidsetTransactionIsolation(String transactionIsolation) voidsetUpdateColumnELNFlag(boolean updateColumnELNFlag) voidsetUpdateTableELNFlag(boolean updateTableELNFlag) voidsetUseReferenceId(boolean useReferenceId) voidsetValidateData(boolean validateData)
-
Constructor Details
-
DBHelper
public DBHelper() -
DBHelper
- Parameters:
dbProperties- - DBProperties
-
-
Method Details
-
isSupportAutoCommit
public boolean isSupportAutoCommit()Returns the autoCommit value.- Returns:
- supportAutoCommit boolean
-
setSupportAutoCommit
public void setSupportAutoCommit(boolean supportAutoCommit) Sets the supportAutoCommit value.- Parameters:
supportAutoCommit- boolean
-
isDumpFiles
public boolean isDumpFiles() -
setDumpFiles
public void setDumpFiles(boolean dumpFiles) -
isImportSdi
public boolean isImportSdi() -
setImportSdi
public void setImportSdi(boolean importSdi) -
isReadTables
public boolean isReadTables()Returns the readTables value as True or False.- Returns:
- boolean readTables
-
setReadTables
public void setReadTables(boolean readTables) Sets the readTables value as specified.- Parameters:
readTables- boolean
-
isReadViews
public boolean isReadViews()Returns the readViews value as True or False.- Returns:
- boolean readViews
-
setReadViews
public void setReadViews(boolean readViews) Sets the readViews as specified.- Parameters:
readViews- boolean
-
isReadSynonyms
public boolean isReadSynonyms()Returns the readSynonyms value as True or False.- Returns:
- boolean readSynonyms
-
setReadSynonyms
public void setReadSynonyms(boolean readSynonyms) Sets the readSynonyms as specified.- Parameters:
readSynonyms- boolean
-
getScanOptions
Sets the scanOptions as specified.- Returns:
- String scanOptions
-
setScanOptions
Sets the scanOptions as specified.- Parameters:
scanOptions- String
-
getDatabaseUrl
Returns the DBUrl.- Returns:
- String dbUrl
-
setDatabaseUrl
Sets the DBUrl as specified.- Parameters:
dbUrl- String
-
getDatabaseDriver
Returns the DBDriver.- Returns:
- String dbDriver
-
setDatabaseDriver
Sets the DBDriver value as specified.- Parameters:
dbDriver- String
-
getDatabaseUserName
Returns the DbUserName.- Returns:
- String dbUserName
-
setDatabaseUserName
Sets the DbUserName as specified.- Parameters:
dbUserName- String
-
getDatabasePassword
Returns the DbPassword.- Returns:
- String dbPassword
-
setDatabasePassword
Sets the DbPassword as specified.- Parameters:
dbPassword- String
-
getDatabaseName
Returns the dataBaseName.- Returns:
- String dbName
-
setDatabaseName
Sets the dataBaseName as specified.- Parameters:
dbName- String
-
getDatabaseSchema
Returns the dataBaseSchema.- Returns:
- dbSchema String
-
setDatabaseSchema
Sets the dataBaseSchema as specified.- Parameters:
dbSchema- String
-
isReadColumns
public boolean isReadColumns()Returns the readColumns value as True or False.- Returns:
- boolean readColumns
-
setReadColumns
public void setReadColumns(boolean readColumns) Sets the readColumns value as specified.- Parameters:
readColumns- boolean
-
isReadComments
public boolean isReadComments()Returns the readComments value as True or False.- Returns:
- boolean readComments
-
setReadComments
public void setReadComments(boolean readComments) Sets the readComments as specified.- Parameters:
readComments- boolean
-
setSelectedViewsString
Sets the selectedViewsString as specified.- Parameters:
selectedViewsString- StringBuilder
-
getSelectedViewsString
Returns the selectedViewsString.- Returns:
- StringBuilder selectedViewsString
-
getSelectedTablesString
Returns the selectedTablesString.- Returns:
- StringBuilder selectedTablesString
-
setSelectedTablesString
Sets the selectedTablesString as specified.- Parameters:
selectedTablesString- StringBuilder
-
getIpAddress
Returns the ipAddress.- Returns:
- String ipAddress
-
setIpAddress
Sets the ipAddress as specified.- Parameters:
ipAddress- String
-
getSystemNumber
Returns the systemNumber.- Returns:
- String systemNumber
-
setSystemNumber
Sets the systemNumber as specified.- Parameters:
systemNumber- String
-
getClient
Returns the client.- Returns:
- String client
-
setClient
Sets the client as specified.- Parameters:
client- String
-
getDbPassword
Returns the dbPassword.- Returns:
- dbPassword String
-
setDbPassword
Sets the dbPassword as specified.- Parameters:
dbPassword- String
-
getDestinationName
Returns the destinationName.- Returns:
- destinationName String
-
setDestinationName
Sets the destinationName as specified.- Parameters:
destinationName- String
-
getFilePath
Returns the filePath.- Returns:
- filePath String
-
setFilePath
Sets the filePath as specified.- Parameters:
filePath- String
-
getFilePathType
Returns the path type of the given file.i.e ABSOLUTE OR RELATIVE- Returns:
- Enum - FilePathType
-
setFilePathType
Method sets the path type for the specified file.- Parameters:
filePathType- - Enum : Valid values are ABSOLUTE/RELATIVE
-
isReadLogicalColumns
public boolean isReadLogicalColumns()Returns the readLogicalColumns value as True or False.- Returns:
- boolean readLogicalColumns
-
setReadLogicalColumns
public void setReadLogicalColumns(boolean readLogicalColumns) Sets the readLogicalColumns as specified.- Parameters:
readLogicalColumns- boolean
-
getSelectedEntities
Returns the selectedEntities.- Returns:
- List selectedEntities
-
setSelectedEntities
Sets the selectedEntities as specified.- Parameters:
selectedEntities- List
-
getDatabaseType
Returns the databaseType.- Returns:
- DBProperties databaseType
-
setDatabaseType
Sets the databaseType as specified.- Parameters:
databaseType- databaseType
-
getSelectedTablesList
Returns the selectedTablesList.- Returns:
- List selectedTablesList
-
setSelectedTablesList
Sets the selectedTablesList as specified.- Parameters:
selectedTablesList- List selectedTablesList
-
getSelectedViewsList
Returns the selectedViewsList.- Returns:
- List selectedViewsList
-
setSelectedViewsList
Sets the selectedViewsList as specified.- Parameters:
selectedViewsList- List selectedViewsList
-
getSelectedSynonymsList
Returns the selectedSynonymsList.- Returns:
- List selectedSynonymsList
-
setSelectedSynonymsList
Sets the selectedSynonymsList as specified.- Parameters:
selectedSynonymsList- List
-
getSelectedObjectsList
Returns the selectedObjectsList.- Returns:
- List selectedObjectsList
-
setSelectedObjectsList
Sets the selectedObjectsList as specified.- Parameters:
selectedObjectsList- List
-
getDBProperties
Returns the DBProperties Object.- Returns:
- DBProperties Object
-
getDbUrl
Returns the dbUrl.- Returns:
- dbUrl String
-
setDbUrl
Sets the dbUrl as specified.- Parameters:
dbUrl- String
-
getDbDriver
Returns the dbDriver.- Returns:
- String dbDriver
-
setDbDriver
Sets the dbDriver as specified.- Parameters:
dbDriver- String
-
getDbUserName
Returns the dbUserName.- Returns:
- String dbUserName
-
setDbUserName
Sets the dbUserName as specified.- Parameters:
dbUserName- String
-
getDbName
Returns the dbName.- Returns:
- String dbName
-
setDbName
Sets the dbName as specified.- Parameters:
dbName- String
-
getDbSchema
Returns the dbSchema.- Returns:
- String dbSchema
-
setDbSchema
Sets the dbSchema as specified.- Parameters:
dbSchema- String
-
getPartitions
public int getPartitions()Returns the partitions.- Returns:
- int partitions
-
setPartitions
public void setPartitions(int partitions) Sets the partitions as specified.- Parameters:
partitions- int
-
getMinimumConnectionsPerPartition
public int getMinimumConnectionsPerPartition()Returns the minimumConnectionsPerPartition.- Returns:
- int minimumConnectionsPerPartition
-
setMinimumConnectionsPerPartition
public void setMinimumConnectionsPerPartition(int minimumConnectionsPerPartition) Sets the minimumConnectionsPerPartition as specified.- Parameters:
minimumConnectionsPerPartition- int
-
getMaximumConnectionsPerPartition
public int getMaximumConnectionsPerPartition()Returns the maximumConnectionsPerPartition.- Returns:
- int maximumConnectionsPerPartition
-
setMaximumConnectionsPerPartition
public void setMaximumConnectionsPerPartition(int maximumConnectionsPerPartition) Sets the maximumConnectionsPerPartition as specified.- Parameters:
maximumConnectionsPerPartition- int
-
isTestConnectionPeriodically
public boolean isTestConnectionPeriodically()Returns the testConnectionPeriodically value as true or false.- Returns:
- boolean testConnectionPeriodically
-
setTestConnectionPeriodically
public void setTestConnectionPeriodically(boolean _testConnectionPeriodically) Sets the testConnectionPeriodically value as specified.- Parameters:
_testConnectionPeriodically- boolean
-
getTestConnectionQuery
Returns the testConnectionQuery.- Returns:
- String testConnectionQuery
-
setTestConnectionQuery
Sets the testConnectionQuery as specified.- Parameters:
_testConnectionQuery- String
-
isScanNestedRefSynonyms
public boolean isScanNestedRefSynonyms() -
setScanNestedRefSynonyms
public void setScanNestedRefSynonyms(boolean scanNestedRefSynonyms) -
getQueryBatchLimit
public int getQueryBatchLimit() -
setQueryBatchLimit
public void setQueryBatchLimit(int queryBatchLimit) -
isAutoCommit
public boolean isAutoCommit()Returns the autoCommit value.- Returns:
- boolean autoCommit
-
setAutoCommit
public void setAutoCommit(boolean autoCommit) Sets the autoCommit value.- Parameters:
autoCommit- boolean
-
getCWMVersion
public com.quest.xml.cwm.CWMUtil.Version getCWMVersion()Returns the cwmVersion. cwmVersion can be v1_0, v1_1.- Returns:
- cwmVersion
-
setCWMVersion
public void setCWMVersion(com.quest.xml.cwm.CWMUtil.Version cwmVersion) Sets the cwmVersion as specified.- Parameters:
cwmVersion- CWMUtil
-
isReadHeader
public boolean isReadHeader()Returns the readHeader value.- Returns:
- boolean readHeader
-
setReadHeader
public void setReadHeader(boolean readHeader) Sets the readHeader as specified.- Parameters:
readHeader- boolean
-
getFieldSeparator
Returns the fieldSeparator.- Returns:
- String fieldSeparator
-
setFieldSeparator
sets the fieldSeparator as specified.- Parameters:
fieldSeparator- String
-
getRowSeparator
Returns the rowSeparator.- Returns:
- String rowSeparator
-
setRowSeparator
Sets the rowSeparator as specified.- Parameters:
rowSeparator- String
-
isUseReferenceId
public boolean isUseReferenceId()- Returns:
- the useReferenceId
-
setUseReferenceId
public void setUseReferenceId(boolean useReferenceId) - Parameters:
useReferenceId- the useReferenceId to set
-
getScanCriteria
- Returns:
-
setScanCriteria
- Parameters:
scanCriteria-
-
getSelectedTables
This method returns map object in which key is schema name and value is list of selected tables.- Returns:
- selectedTables
-
setSelectedTables
This method is defined to set the selected tables to DBHelper Object. This method takes map object as parameter where key is schema name and value is list of selected tables.- Parameters:
selectedTables-
-
getSelectedViews
This method returns map object in which key is schema name and value is list of selected views.- Returns:
- selectedViews
-
setSelectedViews
This method is defined to set the selected views to DBHelper Object. This method takes map object as parameter where key is schema name and value is list of selected views.- Parameters:
selectedViews-
-
getSelectedSynonyms
This method returns map object in which key is schema name and value is list of selected synonyms.- Returns:
- selectedSynonyms
-
setSelectedSynonyms
This method is defined to set the selected synonyms to DBHelper Object. This method takes map object as parameter where key is schema name and value is list of selected synonyms.- Parameters:
selectedSynonyms-
-
getConnectionPoolType
- Returns:
-
setConnectionPoolType
- Parameters:
connectionPoolType-
-
getTransactionIsolation
- Returns:
-
setTransactionIsolation
- Parameters:
transactionIsolation-
-
getReadOnly
- Returns:
-
setReadOnly
- Parameters:
readOnly-
-
getKerberosPrincipal
- Returns:
-
setKerberosPrincipal
- Parameters:
kerberosPrincipal-
-
getSshPort
public int getSshPort()- Returns:
-
setSshPort
public void setSshPort(int sshPort) - Parameters:
sshPort-
-
getModelType
- Returns:
- the modelType
-
setModelType
- Parameters:
modelType- the modelType to set
-
isUpdateTableELNFlag
public boolean isUpdateTableELNFlag()- Returns:
- the updateTableELNFlag
-
setUpdateTableELNFlag
public void setUpdateTableELNFlag(boolean updateTableELNFlag) - Parameters:
updateTableELNFlag- the updateTableELNFlag to set
-
isUpdateColumnELNFlag
public boolean isUpdateColumnELNFlag()- Returns:
- the updateColumnELNFlag
-
setUpdateColumnELNFlag
public void setUpdateColumnELNFlag(boolean updateColumnELNFlag) - Parameters:
updateColumnELNFlag- the updateColumnELNFlag to set
-
isHasAccessToDba
public boolean isHasAccessToDba() -
setHasAccessToDba
public void setHasAccessToDba(boolean hasAccessToDba) -
isGenerateSummary
public boolean isGenerateSummary() -
setGenerateSummary
public void setGenerateSummary(boolean generateSummary) -
isValidateData
public boolean isValidateData() -
setValidateData
public void setValidateData(boolean validateData) -
isParseHiveComplexDataType
public boolean isParseHiveComplexDataType() -
setParseHiveComplexDataType
public void setParseHiveComplexDataType(boolean parseHiveComplexDataType) -
isSkipEmptyCells
public boolean isSkipEmptyCells() -
setSkipEmptyCells
public void setSkipEmptyCells(boolean skipEmptyCells) -
getImportViewType
-
setImportViewType
-
isImportTags
public boolean isImportTags() -
setImportTags
public void setImportTags(boolean importTags) -
isImportAssociations
public boolean isImportAssociations() -
setImportAssociations
public void setImportAssociations(boolean importAssociations) -
isImportExtendedProperties
public boolean isImportExtendedProperties() -
setImportExtendedProperties
public void setImportExtendedProperties(boolean importExtendedProperties)
-