Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javazoom.download.util
Class DatabaseConfig

    java.lang.Object
      javazoom.download.util.Config
          javazoom.download.util.DatabaseConfig

All Implemented Interfaces:
  java.io.Serializable

public class DatabaseConfig
extends Config

This class implements a Config for Database. In addition to the set of properties and FileInfo, it adds the database schema, driver, URL, credentials and optioanlly an implementation.

See Also:
  Serialized Form

Constructor Summary
`DatabaseConfig()`

Method Summary
`java.util.Properties` | `getCredentials()` Gets credentials to connect the database.
`java.lang.String` | `getDriver()` Returns database driver classname.
`java.lang.String` | `getImplementation()` Returns DownloadSource implementation.
`java.util.Properties` | `getSchema()` Returns database schema (table name + column name) in Properties.
`java.lang.String` | `getUrl()` Gets database URL for connection.
`java.util.Vector` | `listFiles(boolean enablesubfolders)` List files.
`void` | `setCredentials(java.util.Properties credentials)` Sets credentials to connect the database.
`void` | `setDriver(java.lang.String driver)` Sets database driver classname.
`void` | `setImplementation(java.lang.String implementation)` Sets DownloadSource implementation for database.
`void` | `setSchema(java.util.Properties schema)` Sets database schema.
`void` | `setUrl(java.lang.String url)` Sets database URL for connection.

Methods inherited from class javazoom.download.util.Config
`addListener, getDescription, getDownloadSource, getFiles, getId, getListeners, getMimes, getProperties, listFiles, notifyCounters, notifyListeners, removeListener, setDescription, setDownloadSource, setFiles, setId, setMimes, setProperties`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DatabaseConfig

    public DatabaseConfig()

Method Detail

### getDriver

    public java.lang.String getDriver()

  Returns database driver classname.

  Returns:
    driver classname.

### setDriver

    public void setDriver(java.lang.String driver)

  Sets database driver classname.

  Parameters:
    `driver` - classname.

### getImplementation

    public java.lang.String getImplementation()

  Returns DownloadSource implementation.

  Returns:
    DownloadSource implementation.

### setImplementation

    public void setImplementation(java.lang.String implementation)

  Sets DownloadSource implementation for database. This feature is useful if Download4J + Database (schema, SQL ...) doesn't suit to your needs. One could implements its own DownloadSource and replace the default one.

  Parameters:
    `implementation` - classname

### getCredentials

    public java.util.Properties getCredentials()

  Gets credentials to connect the database.

  Returns:
    Database credentials properties.

### setCredentials

    public void setCredentials(java.util.Properties credentials)

  Sets credentials to connect the database.

  Parameters:
    `credentials` - Database properties (user, password).

### getSchema

    public java.util.Properties getSchema()

  Returns database schema (table name + column name) in Properties. See XML configuration file for keys.

  Returns:
    schema

### setSchema

    public void setSchema(java.util.Properties schema)

  Sets database schema.

  Parameters:
    `schema` - input schema.

### getUrl

    public java.lang.String getUrl()

  Gets database URL for connection.

  Returns:
    JDBC URL

### setUrl

    public void setUrl(java.lang.String url)

  Sets database URL for connection.

  Parameters:
    `url` - Input URL

### listFiles

    public java.util.Vector listFiles(boolean enablesubfolders)

  List files.

  Specified by:
    `listFiles` in class `Config`
  Parameters:
    `enablesubfolders` - boolean
  Returns:
    Vector

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD