001: // JdbcBeanInterface.java
002: // $Id: JdbcBeanInterface.java,v 1.5 2000/08/16 21:37:49 ylafon Exp $
003: // (c) COPYRIGHT MIT, INRIA and Keio, 2000.
004: // Please first read the full copyright statement in file COPYRIGHT.html
005: package org.w3c.tools.jdbc;
006:
007: import java.beans.PropertyChangeSupport;
008: import java.beans.PropertyChangeListener;
009:
010: /**
011: * @version $Revision: 1.5 $
012: * @author Benoît Mahé (bmahe@w3.org)
013: */
014: public interface JdbcBeanInterface {
015:
016: /**
017: * Set the JDBC driver
018: * @param jdbcDriver the jdbc driver
019: */
020: public void setJdbcDriver(String jdbcDriver);
021:
022: /**
023: * Get the JDBC driver
024: * @return the jdbc driver
025: */
026: public String getJdbcDriver();
027:
028: /**
029: * Set the Jdbc username property
030: * @param jdbcUser the username
031: */
032: public void setJdbcUser(String JdbcUser);
033:
034: /**
035: * get the Jdbc username property
036: * @return the Jdbc username property
037: */
038: public String getJdbcUser();
039:
040: /**
041: * Set the password property
042: * @param jdbcPassword the password
043: */
044: public void setJdbcPassword(String jdbcPassword);
045:
046: /**
047: * Get the password property
048: * @return the Jdbc password
049: */
050: public String getJdbcPassword();
051:
052: /**
053: * Set the Jdbc URI
054: * @param jdbcURI the URI (ie: <b>jdbc:protocol://host/db</b>)
055: */
056: public void setJdbcURI(String jdbcURI);
057:
058: /**
059: * Get the Jdbc URI
060: * @return the URI (ie: <b>jdbc:protocol://host/db</b>)
061: */
062: public String getJdbcURI();
063:
064: /**
065: * Set the max number os simultaneous Jdbc connections
066: * @param maxConn the max number of connections
067: */
068: public void setMaxConn(int maxConn);
069:
070: /**
071: * Get the max number os simultaneous Jdbc connections
072: * @return the max number of connections
073: */
074: public int getMaxConn();
075:
076: /**
077: * Set the name of the SQL table
078: * @param jdbcTable the SQL table name
079: */
080: public void setJdbcTable(String jdbcTable);
081:
082: /**
083: * Return the name of the SQL table
084: * @return the SQL table name
085: */
086: public String getJdbcTable();
087:
088: /**
089: * Set the read-only flag
090: * @param readonly
091: */
092: public void setReadOnly(boolean readonly);
093:
094: /**
095: * Is this table read-only? (default is false)
096: * @return a boolean
097: */
098: public boolean getReadOnly();
099:
100: public JdbcBeanInterface getDefault();
101:
102: /**
103: * Get our SQL serializer
104: * @return a JdbcBeanSerializer instance
105: */
106: public JdbcBeanSerializer getSerializer();
107:
108: /**
109: * Add a PropertyChangeListener to the listener list. The listener
110: * is registered for all properties.
111: * @param listener The PropertyChangeListener to be added
112: */
113: public void addPropertyChangeListener(
114: PropertyChangeListener listener);
115:
116: /**
117: * Remove a PropertyChangeListener to the listener list.
118: * @param listener The PropertyChangeListener to be removed.
119: */
120: public void removePropertyChangeListener(
121: PropertyChangeListener listener);
122:
123: }
|