org.baraza.DB

## Class BDB

- java.lang.Object
- - org.baraza.DB.BDB

-     public class BDB
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BDB(BElement dbconfig)`
    `BDB(BElement dbconfig, String dbuser, String dbpassword)`
    `BDB(String datasource)`
    `BDB(String dbclass, String dbpath, String dbuser, String dbpassword)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `connectDB(String dbclass, String dbpath, String dbuser, String dbpassword)`
    `Clob` | `createClob()`
    `void` | `createdb(String dbName)`
    `void` | `dropdb(String dbName)`
    `String` | `executeAutoKey(String mysql)`
    `String` | `executeBatch(String mysql)`
    `String` | `executeFunction(String mysql)`
    `String` | `executeFunction(String mysql, boolean readOnly)`
    `String` | `executeQuery(String mysql)`
    `String` | `executeUpdate(String updsql)`
    `BElement` | `getAppConfig(BElement root)`
    `Connection` | `getDB()`
    `DatabaseMetaData` | `getDBMetaData()`
    `String` | `getDBSchema()`
    `int` | `getDBType()`
    `Map<String,String>` | `getFieldsData(String[] fields, String mysql)`
    `List<BTableLinks>` | `getForeignLinks(String tablename)`
    `List<String>` | `getGroupRoles()`
    `String` | `getLastErrorMsg()`
    `BLogHandle` | `getLogHandle()`
    `String` | `getOrgAnd(String orgTable)`
    `String` | `getOrgID()`
    `String` | `getOrgWhere(String orgTable)`
    `boolean` | `getReadOnly()`
    `String` | `getStartView()`
    `boolean` | `getSuperUser()`
    `List<String>` | `getTables()`
    `BUser` | `getUser()`
    `String` | `getUserID()`
    `String` | `getUserIP()`
    `String` | `getUserName()`
    `String` | `getUserOrg()`
    `List<String>` | `getUserRoles()`
    `List<String>` | `getViews()`
    `String` | `getViewSQL()`
    `String` | `getViewSQL(String tablename)`
    `String` | `initCap(String mystr)`
    `String` | `insAudit(String tableName, String recordID, String functionType)`
    `boolean` | `isValid()`
    `void` | `logConfig(BLogHandle logHandle)`
    `void` | `newUser(String userIP, String userName)`
    `Map<String,String>` | `readFields(String myFields, String mysource)`
    `ResultSet` | `readQuery(String mysql)`
    `ResultSet` | `readQuery(String mysql, int limit)`
    `void` | `reconnect()`
    `void` | `setOrgID(String orgID)`
    `void` | `setReadOnly(boolean readOnly)`
    `void` | `setSchema(String dbSchema)`
    `void` | `setUser(String userIP, String userName)`
    `void` | `setUser(String userIP, String userName, String narrative)`
    `void` | `setUser(String tableName, String idCol, String nameCol, String userName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BDB

          public BDB(BElement dbconfig)

    - #### BDB

          public BDB(BElement dbconfig,
             String dbuser,
             String dbpassword)

    - #### BDB

          public BDB(String dbclass,
             String dbpath,
             String dbuser,
             String dbpassword)

    - #### BDB

          public BDB(String datasource)

  - ### Method Detail

    - #### connectDB

          public void connectDB(String dbclass,
                       String dbpath,
                       String dbuser,
                       String dbpassword)

    - #### setSchema

          public void setSchema(String dbSchema)

    - #### reconnect

          public void reconnect()

    - #### newUser

          public void newUser(String userIP,
                     String userName)

    - #### setUser

          public void setUser(String userIP,
                     String userName)

    - #### setUser

          public void setUser(String userIP,
                     String userName,
                     String narrative)

    - #### setUser

          public void setUser(String tableName,
                     String idCol,
                     String nameCol,
                     String userName)

    - #### logConfig

          public void logConfig(BLogHandle logHandle)

    - #### getLogHandle

          public BLogHandle getLogHandle()

    - #### readQuery

          public ResultSet readQuery(String mysql)

    - #### readQuery

          public ResultSet readQuery(String mysql,
                            int limit)

    - #### executeFunction

          public String executeFunction(String mysql)

    - #### executeFunction

          public String executeFunction(String mysql,
                               boolean readOnly)

    - #### executeQuery

          public String executeQuery(String mysql)

    - #### executeAutoKey

          public String executeAutoKey(String mysql)

    - #### executeUpdate

          public String executeUpdate(String updsql)

    - #### executeBatch

          public String executeBatch(String mysql)

    - #### createClob

          public Clob createClob()

    - #### getFieldsData

          public Map<String,String> getFieldsData(String[] fields,
                                         String mysql)

    - #### readFields

          public Map<String,String> readFields(String myFields,
                                      String mysource)

    - #### getTables

          public List<String> getTables()

    - #### getViews

          public List<String> getViews()

    - #### getForeignLinks

          public List<BTableLinks> getForeignLinks(String tablename)

    - #### getAppConfig

          public BElement getAppConfig(BElement root)

    - #### createdb

          public void createdb(String dbName)

    - #### dropdb

          public void dropdb(String dbName)

    - #### getViewSQL

          public String getViewSQL()

    - #### getViewSQL

          public String getViewSQL(String tablename)

    - #### initCap

          public String initCap(String mystr)

    - #### isValid

          public boolean isValid()

    - #### insAudit

          public String insAudit(String tableName,
                        String recordID,
                        String functionType)

    - #### getDB

          public Connection getDB()

    - #### getDBMetaData

          public DatabaseMetaData getDBMetaData()

    - #### getDBType

          public int getDBType()

    - #### getUser

          public BUser getUser()

    - #### getUserID

          public String getUserID()

    - #### getUserIP

          public String getUserIP()

    - #### getUserOrg

          public String getUserOrg()

    - #### getUserName

          public String getUserName()

    - #### getSuperUser

          public boolean getSuperUser()

    - #### getUserRoles

          public List<String> getUserRoles()

    - #### getGroupRoles

          public List<String> getGroupRoles()

    - #### getOrgID

          public String getOrgID()

    - #### setOrgID

          public void setOrgID(String orgID)

    - #### getOrgWhere

          public String getOrgWhere(String orgTable)

    - #### getOrgAnd

          public String getOrgAnd(String orgTable)

    - #### getDBSchema

          public String getDBSchema()

    - #### getStartView

          public String getStartView()

    - #### getLastErrorMsg

          public String getLastErrorMsg()

    - #### setReadOnly

          public void setReadOnly(boolean readOnly)

    - #### getReadOnly

          public boolean getReadOnly()

    - #### close

          public void close()

Copyright © 2016 openBaraza. All Rights Reserved.