org.apache.avalon.examples.jdbcdatasource
Interface HelloDBService

All Superinterfaces:
Component
All Known Implementing Classes:
DefaultHelloDBService

public interface HelloDBService
extends Component

This example application creates a conmponent which makes use of a JdbcDataSource to connect to a Hypersonic SQL database. It then adds a row to a table that it creates displaying a list of all the rows in the table. Note, this code ignores exceptions to keep the code simple.

Since:
4.1
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:28 $
Author:
Avalon Development Team

Field Summary
static java.lang.String ROLE
          The lookup key for the HelloDBService
 
Method Summary
 void addRow(java.lang.String title)
          Adds a single row to the database.
 void deleteRows()
          Ask the component to delete all rows in the database.
 void logRows()
          Ask the component to log all of the rows in the database to the logger with the info log level.
 

Field Detail

ROLE

public static final java.lang.String ROLE
The lookup key for the HelloDBService

See Also:
Constant Field Values
Method Detail

addRow

public void addRow(java.lang.String title)
Adds a single row to the database.

Parameters:
title - The title for the row.

deleteRows

public void deleteRows()
Ask the component to delete all rows in the database.


logRows

public void logRows()
Ask the component to log all of the rows in the database to the logger with the info log level.



Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.