dea.albums
Class DB

java.lang.Object
  extended bydea.albums.DB
All Implemented Interfaces:
IDebugLevels, java.io.Serializable

public class DB
extends java.lang.Object
implements IDebugLevels, java.io.Serializable

This class is the database interface class for all the programs

See Also:
Serialized Form

Field Summary
static int TOCD
          publish the CD
static java.lang.String topStr
          from DB top of the input tree
static int TOWEB
          publish the web
 
Fields inherited from interface dea.common.IDebugLevels
BASIC, DEBUG_ALL, ERROR, METH_DETAIL, METH_ENTER, METH_EXIT, METH_EXT, METH_GET, METH_SET, METH_VARS, SHOW_PASS
 
Constructor Summary
DB()
           
 
Method Summary
 void closeCon()
          close DB connections and logs.
 java.sql.Connection connect()
          connect to the DB.
 boolean getBLocal()
          Return the value of bLocal
 java.lang.String getFtpPasswd()
           
 java.lang.String getFtpUser()
           
 java.lang.String getHostAddr()
           
 java.lang.String getHostDir()
          Return the value of hostDir
 java.lang.String getHostTop()
           
 int getIconWidth()
          Return the value of iconWidth
 int getKey(java.lang.String tabNam)
          get next key for table name
 java.util.Hashtable getKeys()
           
 java.lang.String getMenuStr()
          Return the value of menuStr
 java.lang.String getOutStr()
          Return the value of outStr
 void getPARMS()
          read parms from PARMS table into local vars.
 java.sql.ResultSet getPicData(long pnum)
           
 java.lang.String getRawStr()
          Return the value of rawStr
 java.lang.String getRelStr()
          Return the value of relStr
 java.lang.String getTopStr()
          Return the value of topStr
 java.lang.String getWebStr()
          Return the value of webStr
 int getWebWidth()
          Return the value of webWidth
 void init()
          Used to create tables if needed now basicly just calls getPARMS.
static void loadKeys()
          get next key for table name
 boolean mkdirs(java.lang.String s)
          Creates subdirectories as needed to complete path.
 long nextKey(java.lang.String tabNam)
           
 void parse(java.lang.String[] args)
          parses the command line arguments.
 void rmTree(java.io.File dir)
          delete a file tree
 void setFtpPasswd(java.lang.String newFtpPasswd)
           
 void setFtpUser(java.lang.String newFtpUser)
           
 void setHostAddr(java.lang.String newHostAddr)
           
 void setHostTop(java.lang.String newHostTop)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOWEB

public static final int TOWEB
publish the web

See Also:
Constant Field Values

TOCD

public static final int TOCD
publish the CD

See Also:
Constant Field Values

topStr

public static java.lang.String topStr
from DB top of the input tree

Constructor Detail

DB

public DB()
Method Detail

getBLocal

public boolean getBLocal()
                  throws java.sql.SQLException
Return the value of bLocal

Throws:
java.sql.SQLException

getIconWidth

public int getIconWidth()
                 throws java.sql.SQLException
Return the value of iconWidth

Throws:
java.sql.SQLException

getWebWidth

public int getWebWidth()
                throws java.sql.SQLException
Return the value of webWidth

Throws:
java.sql.SQLException

getTopStr

public java.lang.String getTopStr()
                           throws java.sql.SQLException
Return the value of topStr

Throws:
java.sql.SQLException

getOutStr

public java.lang.String getOutStr()
                           throws java.sql.SQLException
Return the value of outStr

Throws:
java.sql.SQLException

getMenuStr

public java.lang.String getMenuStr()
                            throws java.sql.SQLException
Return the value of menuStr

Throws:
java.sql.SQLException

getRawStr

public java.lang.String getRawStr()
                           throws java.sql.SQLException
Return the value of rawStr

Throws:
java.sql.SQLException

getWebStr

public java.lang.String getWebStr()
                           throws java.sql.SQLException
Return the value of webStr

Throws:
java.sql.SQLException

getRelStr

public java.lang.String getRelStr()
                           throws java.sql.SQLException
Return the value of relStr

Throws:
java.sql.SQLException

getHostDir

public java.lang.String getHostDir()
                            throws java.sql.SQLException
Return the value of hostDir

Throws:
java.sql.SQLException

parse

public void parse(java.lang.String[] args)
           throws java.lang.Exception
parses the command line arguments.

Parameters:
args - A string array of the command line arguments.
Throws:
java.lang.Exception

connect

public java.sql.Connection connect()
                            throws java.sql.SQLException,
                                   java.lang.ClassNotFoundException
connect to the DB.

Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

init

public void init()
          throws java.sql.SQLException,
                 java.lang.ClassNotFoundException
Used to create tables if needed now basicly just calls getPARMS.

Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

getPARMS

public void getPARMS()
              throws java.sql.SQLException
read parms from PARMS table into local vars.

Throws:
java.sql.SQLException

closeCon

public void closeCon()
              throws java.sql.SQLException
close DB connections and logs.

Throws:
java.sql.SQLException

rmTree

public void rmTree(java.io.File dir)
            throws java.io.FileNotFoundException,
                   java.io.IOException
delete a file tree

Throws:
java.io.FileNotFoundException
java.io.IOException

mkdirs

public boolean mkdirs(java.lang.String s)
               throws java.io.IOException
Creates subdirectories as needed to complete path.

Parameters:
s - String representing the directory path that needs to be created.
Returns:
sucess / failure
Throws:
java.io.IOException - if unable to create directory

getKey

public int getKey(java.lang.String tabNam)
get next key for table name


getPicData

public java.sql.ResultSet getPicData(long pnum)

loadKeys

public static void loadKeys()
get next key for table name


getKeys

public java.util.Hashtable getKeys()

nextKey

public long nextKey(java.lang.String tabNam)

setHostAddr

public void setHostAddr(java.lang.String newHostAddr)

getHostAddr

public java.lang.String getHostAddr()

setHostTop

public void setHostTop(java.lang.String newHostTop)

getHostTop

public java.lang.String getHostTop()

setFtpUser

public void setFtpUser(java.lang.String newFtpUser)

getFtpUser

public java.lang.String getFtpUser()

setFtpPasswd

public void setFtpPasswd(java.lang.String newFtpPasswd)

getFtpPasswd

public java.lang.String getFtpPasswd()


Copyright © 2001-2005 Round Mountain Rescue Ranch. All Rights Reserved.