Class GrouperLoaderDb

java.lang.Object
edu.internet2.middleware.grouper.app.loader.db.GrouperLoaderDb

public class GrouperLoaderDb extends Object
db profile from grouper.properties (or possibly grouper.hibernate.properties)
  • Constructor Details

    • GrouperLoaderDb

      public GrouperLoaderDb()
      empty constructor
    • GrouperLoaderDb

      public GrouperLoaderDb(String connectionName1)
      construct with all fields NOTE: this constructor is used by grouperClient, if you change it here, change it there
      Parameters:
      connectionName1 - connection name in grouper loader or grouper client config
    • GrouperLoaderDb

      public GrouperLoaderDb(String user1, String pass1, String url1, String driver1)
      construct with all fields NOTE: this constructor is used by grouperClient, if you change it here, change it there
      Parameters:
      user1 -
      pass1 -
      url1 -
      driver1 -
  • Method Details

    • isUseQuotedColumnsInSql

      public boolean isUseQuotedColumnsInSql()
    • getQuoteForColumnsInSql

      public String getQuoteForColumnsInSql()
      the quote to use or blank if not using quotes
      Returns:
    • closeAllDataSources

      public static void closeAllDataSources()
    • connection

      public Connection connection()
      get a connection from the db NOTE: this method is used by grouperClient, if you change it here, change it there
      Returns:
      the connection
    • initProperties

      public void initProperties()
      TODO should this init only if not initted?
    • setPoolProperties

      public void setPoolProperties()
    • refreshConnectionsIfNeeded

      public void refreshConnectionsIfNeeded()
    • coreConfigOption

      public static boolean coreConfigOption(String configItemName)
      Parameters:
      configItemName -
      Returns:
      true if something that shouldnt inherit from hibernate properties
    • configTypeWithDatabaseConnection

      public static GrouperLoaderDb.DatabaseConfigType configTypeWithDatabaseConnection(String connectionName)
      see which config file we are dealing with (as a base)
      Parameters:
      connectionName -
      configItemName -
      Returns:
      grouper, client, or loader
    • retrievePoolConfigOrDefaultString

      public String retrievePoolConfigOrDefaultString(String configItemName)
      look in config file for config entry if exists, if not then get the default
      Parameters:
      isClient -
      configName -
      configItemName -
      useGrouperHibernateAsDefault -
      Returns:
      the config value
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • getUser

      public String getUser()
      user to login to db
      Returns:
      the user
    • setUser

      public void setUser(String user1)
      user to login to db
      Parameters:
      user1 - the user to set
    • getPass

      public String getPass()
      pass to login to db
      Returns:
      the pass
    • setPass

      public void setPass(String pass1)
      pass to login to db
      Parameters:
      pass1 - the pass to set
    • getUrl

      public String getUrl()
      url of the db to login to
      Returns:
      the url
    • setUrl

      public void setUrl(String url1)
      url of the db to login to
      Parameters:
      url1 - the url to set
    • getDriver

      public String getDriver()
      db driver to use to login
      Returns:
      the driver
    • setDriver

      public void setDriver(String driver1)
      db driver to use to login
      Parameters:
      driver1 - the driver to set