Class DBHelper

java.lang.Object
com.ads.mm.db.util.DBHelper

public class DBHelper extends Object
This class consists of methods relating to dbDriver, dbSchema, maximumConnectionsPerPartition, minimumConnectionsPerPartition
partitions, rowSeparator,dbUrl, ipAddress etc...
Author:
AnalytiX DS
  • Constructor Details

    • DBHelper

      public DBHelper()
    • DBHelper

      public DBHelper(DBProperties dbProperties)
      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

      public String getScanOptions()
      Sets the scanOptions as specified.
      Returns:
      String scanOptions
    • setScanOptions

      public void setScanOptions(String scanOptions)
      Sets the scanOptions as specified.
      Parameters:
      scanOptions - String
    • getDatabaseUrl

      public String getDatabaseUrl()
      Returns the DBUrl.
      Returns:
      String dbUrl
    • setDatabaseUrl

      public void setDatabaseUrl(String dbUrl)
      Sets the DBUrl as specified.
      Parameters:
      dbUrl - String
    • getDatabaseDriver

      public String getDatabaseDriver()
      Returns the DBDriver.
      Returns:
      String dbDriver
    • setDatabaseDriver

      public void setDatabaseDriver(String dbDriver)
      Sets the DBDriver value as specified.
      Parameters:
      dbDriver - String
    • getDatabaseUserName

      public String getDatabaseUserName()
      Returns the DbUserName.
      Returns:
      String dbUserName
    • setDatabaseUserName

      public void setDatabaseUserName(String dbUserName)
      Sets the DbUserName as specified.
      Parameters:
      dbUserName - String
    • getDatabasePassword

      public String getDatabasePassword()
      Returns the DbPassword.
      Returns:
      String dbPassword
    • setDatabasePassword

      public void setDatabasePassword(String dbPassword)
      Sets the DbPassword as specified.
      Parameters:
      dbPassword - String
    • getDatabaseName

      public String getDatabaseName()
      Returns the dataBaseName.
      Returns:
      String dbName
    • setDatabaseName

      public void setDatabaseName(String dbName)
      Sets the dataBaseName as specified.
      Parameters:
      dbName - String
    • getDatabaseSchema

      public String getDatabaseSchema()
      Returns the dataBaseSchema.
      Returns:
      dbSchema String
    • setDatabaseSchema

      public void setDatabaseSchema(String dbSchema)
      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

      public void setSelectedViewsString(StringBuilder selectedViewsString)
      Sets the selectedViewsString as specified.
      Parameters:
      selectedViewsString - StringBuilder
    • getSelectedViewsString

      public StringBuilder getSelectedViewsString()
      Returns the selectedViewsString.
      Returns:
      StringBuilder selectedViewsString
    • getSelectedTablesString

      public StringBuilder getSelectedTablesString()
      Returns the selectedTablesString.
      Returns:
      StringBuilder selectedTablesString
    • setSelectedTablesString

      public void setSelectedTablesString(StringBuilder selectedTablesString)
      Sets the selectedTablesString as specified.
      Parameters:
      selectedTablesString - StringBuilder
    • getIpAddress

      public String getIpAddress()
      Returns the ipAddress.
      Returns:
      String ipAddress
    • setIpAddress

      public void setIpAddress(String ipAddress)
      Sets the ipAddress as specified.
      Parameters:
      ipAddress - String
    • getSystemNumber

      public String getSystemNumber()
      Returns the systemNumber.
      Returns:
      String systemNumber
    • setSystemNumber

      public void setSystemNumber(String systemNumber)
      Sets the systemNumber as specified.
      Parameters:
      systemNumber - String
    • getClient

      public String getClient()
      Returns the client.
      Returns:
      String client
    • setClient

      public void setClient(String client)
      Sets the client as specified.
      Parameters:
      client - String
    • getDbPassword

      public String getDbPassword()
      Returns the dbPassword.
      Returns:
      dbPassword String
    • setDbPassword

      public void setDbPassword(String dbPassword)
      Sets the dbPassword as specified.
      Parameters:
      dbPassword - String
    • getDestinationName

      public String getDestinationName()
      Returns the destinationName.
      Returns:
      destinationName String
    • setDestinationName

      public void setDestinationName(String destinationName)
      Sets the destinationName as specified.
      Parameters:
      destinationName - String
    • getFilePath

      public String getFilePath()
      Returns the filePath.
      Returns:
      filePath String
    • setFilePath

      public void setFilePath(String filePath)
      Sets the filePath as specified.
      Parameters:
      filePath - String
    • getFilePathType

      public APIConstants.FilePathType getFilePathType()
      Returns the path type of the given file.i.e ABSOLUTE OR RELATIVE
      Returns:
      Enum - FilePathType
    • setFilePathType

      public void setFilePathType(APIConstants.FilePathType filePathType)
      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

      public List getSelectedEntities()
      Returns the selectedEntities.
      Returns:
      List selectedEntities
    • setSelectedEntities

      public void setSelectedEntities(List selectedEntities)
      Sets the selectedEntities as specified.
      Parameters:
      selectedEntities - List
    • getDatabaseType

      public DBProperties.DatabaseType getDatabaseType()
      Returns the databaseType.
      Returns:
      DBProperties databaseType
    • setDatabaseType

      public void setDatabaseType(DBProperties.DatabaseType databaseType)
      Sets the databaseType as specified.
      Parameters:
      databaseType - databaseType
    • getSelectedTablesList

      public List<String> getSelectedTablesList()
      Returns the selectedTablesList.
      Returns:
      List selectedTablesList
    • setSelectedTablesList

      public void setSelectedTablesList(List<String> selectedTablesList)
      Sets the selectedTablesList as specified.
      Parameters:
      selectedTablesList - List selectedTablesList
    • getSelectedViewsList

      public List<String> getSelectedViewsList()
      Returns the selectedViewsList.
      Returns:
      List selectedViewsList
    • setSelectedViewsList

      public void setSelectedViewsList(List<String> selectedViewsList)
      Sets the selectedViewsList as specified.
      Parameters:
      selectedViewsList - List selectedViewsList
    • getSelectedSynonymsList

      public List<String> getSelectedSynonymsList()
      Returns the selectedSynonymsList.
      Returns:
      List selectedSynonymsList
    • setSelectedSynonymsList

      public void setSelectedSynonymsList(List<String> selectedSynonymsList)
      Sets the selectedSynonymsList as specified.
      Parameters:
      selectedSynonymsList - List
    • getSelectedObjectsList

      public List<String> getSelectedObjectsList()
      Returns the selectedObjectsList.
      Returns:
      List selectedObjectsList
    • setSelectedObjectsList

      public void setSelectedObjectsList(List<String> selectedObjectsList)
      Sets the selectedObjectsList as specified.
      Parameters:
      selectedObjectsList - List
    • getDBProperties

      public DBProperties getDBProperties()
      Returns the DBProperties Object.
      Returns:
      DBProperties Object
    • getDbUrl

      public String getDbUrl()
      Returns the dbUrl.
      Returns:
      dbUrl String
    • setDbUrl

      public void setDbUrl(String dbUrl)
      Sets the dbUrl as specified.
      Parameters:
      dbUrl - String
    • getDbDriver

      public String getDbDriver()
      Returns the dbDriver.
      Returns:
      String dbDriver
    • setDbDriver

      public void setDbDriver(String dbDriver)
      Sets the dbDriver as specified.
      Parameters:
      dbDriver - String
    • getDbUserName

      public String getDbUserName()
      Returns the dbUserName.
      Returns:
      String dbUserName
    • setDbUserName

      public void setDbUserName(String dbUserName)
      Sets the dbUserName as specified.
      Parameters:
      dbUserName - String
    • getDbName

      public String getDbName()
      Returns the dbName.
      Returns:
      String dbName
    • setDbName

      public void setDbName(String dbName)
      Sets the dbName as specified.
      Parameters:
      dbName - String
    • getDbSchema

      public String getDbSchema()
      Returns the dbSchema.
      Returns:
      String dbSchema
    • setDbSchema

      public void setDbSchema(String dbSchema)
      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

      public String getTestConnectionQuery()
      Returns the testConnectionQuery.
      Returns:
      String testConnectionQuery
    • setTestConnectionQuery

      public void setTestConnectionQuery(String _testConnectionQuery)
      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

      public String getFieldSeparator()
      Returns the fieldSeparator.
      Returns:
      String fieldSeparator
    • setFieldSeparator

      public void setFieldSeparator(String fieldSeparator)
      sets the fieldSeparator as specified.
      Parameters:
      fieldSeparator - String
    • getRowSeparator

      public String getRowSeparator()
      Returns the rowSeparator.
      Returns:
      String rowSeparator
    • setRowSeparator

      public void setRowSeparator(String rowSeparator)
      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

      public DBHelper.ScanCriteria getScanCriteria()
      Returns:
    • setScanCriteria

      public void setScanCriteria(DBHelper.ScanCriteria scanCriteria)
      Parameters:
      scanCriteria -
    • getSelectedTables

      public Map<String,List<String>> getSelectedTables()
      This method returns map object in which key is schema name and value is list of selected tables.
      Returns:
      selectedTables
    • setSelectedTables

      public void setSelectedTables(Map<String,List<String>> selectedTables)
      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

      public Map<String,List<String>> getSelectedViews()
      This method returns map object in which key is schema name and value is list of selected views.
      Returns:
      selectedViews
    • setSelectedViews

      public void setSelectedViews(Map<String,List<String>> selectedViews)
      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

      public Map<String,List<String>> getSelectedSynonyms()
      This method returns map object in which key is schema name and value is list of selected synonyms.
      Returns:
      selectedSynonyms
    • setSelectedSynonyms

      public void setSelectedSynonyms(Map<String,List<String>> selectedSynonyms)
      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

      public DBProperties.ConnectionPoolType getConnectionPoolType()
      Returns:
    • setConnectionPoolType

      public void setConnectionPoolType(DBProperties.ConnectionPoolType connectionPoolType)
      Parameters:
      connectionPoolType -
    • getTransactionIsolation

      public String getTransactionIsolation()
      Returns:
    • setTransactionIsolation

      public void setTransactionIsolation(String transactionIsolation)
      Parameters:
      transactionIsolation -
    • getReadOnly

      public String getReadOnly()
      Returns:
    • setReadOnly

      public void setReadOnly(String readOnly)
      Parameters:
      readOnly -
    • getKerberosPrincipal

      public String getKerberosPrincipal()
      Returns:
    • setKerberosPrincipal

      public void setKerberosPrincipal(String kerberosPrincipal)
      Parameters:
      kerberosPrincipal -
    • getSshPort

      public int getSshPort()
      Returns:
    • setSshPort

      public void setSshPort(int sshPort)
      Parameters:
      sshPort -
    • getModelType

      public DBHelper.ModelType getModelType()
      Returns:
      the modelType
    • setModelType

      public void setModelType(DBHelper.ModelType modelType)
      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

      public String getImportViewType()
    • setImportViewType

      public void setImportViewType(String importViewType)
    • 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)