|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.youyounet.db.DataBean
DataBean is the abstract class that should be subclassed to define the actual data bean classes. The actual data bean instances will then have all the database functionalities defined in this class. The definition of an actual data bean class should follow certain pattern, and is explained in the following:
It's probably easier to illustrate this fact through an example. Let's say you have
a database table called User which has the following schema
create table User( UserID bigint not null auto_increment, primary key(UserID), Username varchar(20) not null, unique index(Username), Password varchar(20) not null, LastLogin datetime, Tmstamp timestamp )The data bean class mapping to this database table will have the following code
import com.youyounet.db.*; public class User extends DataBean{ //the following few lines of code defines the mapping of the class properties to the //the table columns. public static Hashtable fieldMap = new Hashtable(); static{ fieldMap.put("userID", new ColumnAttribute("UserID", 6)); fieldMap.put("username", new ColumnAttribute("Username")); fieldMap.put("password", new ColumnAttribute("Password", 8)); fieldMap.put("lastLogin", new ColumnAttribute("LastLogin")); fieldMap.put("tmstamp", new ColumnAttribute("Tmstamp", 16)); } public static Table table = new Table("User", //table name "com.jdb.data.User", //class name fieldMap); public Table getTable(){ return table; } //after the above mapping code, the following is just the standard Java bean definition public int userID = -1; public String username = ""; public String password = ""; public Timestamp lastLogin = null; public Timestamp tmstamp = null; public int getUserID(){ return UserID; } public void setUserID(int var){ userID = var; } public String getUsername(){ return username; } public void setUsername(String var){ username = var; } public String getPassword(){ return password; } public void setPassword(String var){ password = var; } public Timestamp getLastLogin(){ return lastLogin; } public void setLastLogin(Timestamp var){ lastLogin = var; } public Timestamp getTmstamp(){ return tmstamp; } public void setTmstamp(Timestamp var){ tmstamp = var; } public int getID(){ return getUserID(); } }The first part of the class code is dedicated to the mapping of the class properties to the database table columns. No magic of this, simply put the class property names as keys and table column attributes as values in the statically declared fieldMap. All the names are case sensitive. After that, declare a class-wide table object and pass the table name, the class name, the fieldMap as the arguments. This table object is responsible for doing the database operations for the instances of the class. Finally, give a get method for the table object. This completes the mapping. The remaining code of the class is simply standard Java Bean styled code and will not be explained here. Please note, the code pattern of the data bean class could be automatically generated by a tool given the database table schema. This is in the todo list.
Once having all these defined, we can do something like this, for example:
User user = new User(); String username = request.getParameter("username"); String password = request.getParameter("password"); if(!user.load("Username='" + username + "'")) //username not in database, do something; if(!user.getPassword().equals(password)) //password not correct, do some thing; user.setLastLogin(new Timestamp()); user.store(); //the user record will be updated.The type of data bean properties that could map to a database table column is not limited to the known Java SQL types. Composite property can also map to a table column of type BLOB provided that the composite property can be serialized to a binary stream.
Field Summary | |
protected java.util.logging.Logger |
log
|
Constructor Summary | |
DataBean()
Default constructor. |
Method Summary | |
boolean |
create()
This method is the same as create(boolean ignorAutoIncrement) , with the
ignorAutoIncrement parameter set to false. |
boolean |
create(boolean ignorAutoIncrement)
Insert this calling data bean as a new row to its associated table. |
boolean |
create(java.sql.Connection con)
This method is the same as create(Connection con, boolean ignorAutoIncrement) , with the
ignorAutoIncrement parameter set to false. |
boolean |
create(java.sql.Connection con,
boolean ignorAutoIncrement)
Insert this calling data bean as a new row to its associated table. |
boolean |
create(DBContext c)
This method is the same as create(DBContext c, boolean ignorAutoIncrement) , with the
ignorAutoIncrement parameter set to false. |
boolean |
create(DBContext c,
boolean ignorAutoIncrement)
Insert this calling data bean as a new row to its associated table. |
int |
delete(java.lang.String condition)
Delete data beans from this calling bean's associated table using the condition specified. |
int |
delete(java.lang.String condition,
java.sql.Connection con)
Delete data beans from this calling bean's associated table using the condition specified. |
int |
delete(java.lang.String condition,
DBContext c)
Delete data beans from this calling bean's associated table using the condition specified. |
boolean |
exists()
check if the calling data bean exists in its associated table. |
boolean |
exists(java.lang.String condition)
check if the calling data bean exists in its associated table and is also satisfied by the SQL condition passed in. |
boolean |
exists(java.lang.String tables,
java.lang.String condition)
Check if the calling data bean exists in its associated table and is also satisfied by the SQL condition passed in. |
boolean |
find(java.lang.String condition)
Check whether the calling data bean exists in its associated table satisfied by the additional SQL condition if present. |
java.lang.String |
getColumnList(java.lang.String prefix)
Get a string of all the column names of the calling data bean's associated table. |
abstract int |
getID()
Get the id of the calling data bean. |
java.lang.String |
getKeyColumnName()
Get the primary key of the calling data bean's associated database table. |
java.lang.Object |
getMaxID(java.lang.String column,
java.sql.Connection con)
Get the max value of the specified column. |
java.lang.Object |
getMaxID(java.lang.String column,
DBContext c)
Get the max value of the specified column. |
java.lang.Object |
getMaxPrimaryKey(java.sql.Connection con)
Get the max value of the primary key column, if there is a primary key for this bean. |
java.lang.Object |
getMaxPrimaryKey(DBContext c)
Get the max value of the primary key column, if there is a primary key for this bean. |
abstract Table |
getTable()
Returns the table object associated with this data bean. |
java.lang.String |
getTableName()
Get the calling data bean's associated database table name. |
java.util.Iterator |
iterator()
returns a bean Iterator. |
java.util.Iterator |
iterator(java.lang.String condition)
returns a bean Iterator. |
java.util.Iterator |
iterator(java.lang.String tableList,
java.lang.String condition)
returns a bean Iterator. |
boolean |
load()
Load this calling bean's properties value with values from the associated table, using the SQL condition specified by getKeyCondition method . |
boolean |
load(java.sql.Connection con)
Load this calling bean's properties value with values from the associated table, using the SQL condition specified by getKeyCondition method . |
boolean |
load(DBContext c)
Load this calling bean's properties value with values from the associated table, using the SQL condition specified by getKeyCondition method . |
boolean |
load(java.lang.String condition)
Load this calling bean's properties value with values from the associated table, using the SQL condition specified. |
boolean |
load(java.lang.String condition,
java.sql.Connection con)
Load this calling bean's properties value with values from the associated table, using the SQL condition specified. |
boolean |
load(java.lang.String condition,
DBContext c)
Load this calling bean's properties value with values from the associated table, using the SQL condition specified. |
boolean |
remove()
Remove this data bean from the associated table, using the condition specified by getKeyCondition method . |
boolean |
remove(java.sql.Connection con)
Remove this data bean from the associated table, using the condition specified by getKeyCondition method . |
boolean |
remove(DBContext c)
Remove this data bean from the associated table, using the condition specified by getKeyCondition method . |
boolean |
remove(java.lang.String condition)
Remove this data bean from the associated table, using the condition specified. |
boolean |
remove(java.lang.String condition,
java.sql.Connection con)
Remove this data bean from the associated table, using the condition specified. |
boolean |
remove(java.lang.String condition,
DBContext c)
Remove this data bean from the associated table, using the condition specified. |
java.util.Vector |
select(java.lang.String condition,
java.lang.String orderBy)
Select a Vector of data beans from this calling bean's associated table and satisfied by the passed in SQL condition. |
java.util.Vector |
select(java.lang.String condition,
java.lang.String orderBy,
java.sql.Connection con)
Select a Vector of data beans from this calling bean's associated table and satisfied by the passed in SQL condition. |
java.util.Vector |
select(java.lang.String condition,
java.lang.String orderBy,
DBContext c)
Select a Vector of data beans from this calling bean's associated table and satisfied by the passed in SQL condition. |
java.util.Vector |
select(java.lang.String tableList,
java.lang.String condition,
java.lang.String orderBy)
Select a Vector of data beans from this calling bean's associated table and satisfied by the passed in SQL condition. |
java.util.Vector |
select(java.lang.String tableList,
java.lang.String condition,
java.lang.String orderBy,
java.sql.Connection con)
Select a Vector of data beans from this calling bean's associated table and satisfied by the passed in SQL condition. |
java.util.Vector |
select(java.lang.String tableList,
java.lang.String condition,
java.lang.String orderBy,
DBContext c)
Select a Vector of data beans from this calling bean's associated table and satisfied by the passed in SQL condition. |
boolean |
store()
store this calling data bean to the associated table, using the SQL condition specified by getKeyCondition method . |
boolean |
store(java.sql.Connection con)
store this calling data bean to the associated table, using the SQL condition specified by getKeyCondition method . |
boolean |
store(DBContext c)
store this calling data bean to the associated table, using the SQL condition specified by getKeyCondition method . |
boolean |
store(java.lang.String condition)
Store this calling data bean to the associated table, using the condition specified. |
boolean |
store(java.lang.String condition,
java.sql.Connection con)
Store this calling data bean to the associated table, using the condition specified. |
boolean |
store(java.lang.String condition,
DBContext c)
store this calling data bean to the associated table, using the condition specified. |
int |
update(java.util.Vector columnNames,
java.lang.String condition)
Update one or more data beans' value in the associated table with value drawn from this calling data bean. |
int |
update(java.util.Vector columnNames,
java.lang.String condition,
java.sql.Connection con)
Update one or more data beans' value in the associated table with value drawn from this calling data bean. |
int |
update(java.util.Vector columnNames,
java.lang.String condition,
DBContext c)
Update one or more data beans' value in the associated table with value drawn from this calling data bean. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.logging.Logger log
Constructor Detail |
public DataBean()
Method Detail |
public abstract Table getTable()
public int update(java.util.Vector columnNames, java.lang.String condition) throws DataTransferException, java.sql.SQLException
columnNames
- a vector representation of the columns to be updatedcondition
- the SQL condition used in the update
java.sql.SQLException
DataTransferException
- if update columns are mismatched with declared
fields in the calling bean.public int update(java.util.Vector columnNames, java.lang.String condition, DBContext c) throws DataTransferException, java.sql.SQLException
columnNames
- a vector representation of the columns to be updatedcondition
- the SQL condition used in the updatec
- this operation of update is part of the transaction associated with
with this DBContext object
java.sql.SQLException
DataTransferException
- if update columns are mismatched with declared
fields in the calling bean.public int update(java.util.Vector columnNames, java.lang.String condition, java.sql.Connection con) throws DataTransferException, java.sql.SQLException
columnNames
- a vector representation of the columns to be updatedcondition
- the SQL condition used in the updatecon
- this operation of update is part of the transaction associated with
with this Connection object
java.sql.SQLException
DataTransferException
- if update columns are mismatched with declared
fields in the calling bean.public java.util.Vector select(java.lang.String tableList, java.lang.String condition, java.lang.String orderBy) throws java.sql.SQLException, DataTransferException
tableList
- a string of table names separated by a comma. The tables
in the list will only be referenced from the SQL condition and should not
contain the calling bean's associated table. No column from tables in this
list will actually be selected.condition
- the SQL condition of the selectorderBy
- the SQL order by clause used in the selection (exclude the "order
by" key words and only include the column(s) part of the clause in this
parameter)
java.sql.SQLException
{@link
- DataTransferException}
DataTransferException
public java.util.Vector select(java.lang.String tableList, java.lang.String condition, java.lang.String orderBy, DBContext c) throws java.sql.SQLException, DataTransferException
tableList
- a string of table names separated by a comma. The tables
in the list will only be referenced from the SQL condition and should not
contain the calling bean's associated table. No column from tables in this
list will actually be selected.condition
- the SQL condition of the selectorderBy
- the SQL order by clause used in the selection (exclude the "order
by" key words and only include the column(s) part of the clause in this
parameter).c
- the operation of this select is part of the transaction associated
with this DBContext object.
java.sql.SQLException
{@link
- DataTransferException}
DataTransferException
public java.util.Vector select(java.lang.String tableList, java.lang.String condition, java.lang.String orderBy, java.sql.Connection con) throws java.sql.SQLException, DataTransferException
tableList
- a string of table names separated by a comma. The tables
in the list will only be referenced from the SQL condition and should not
contain the calling bean's associated table. No column from tables in this
list will actually be selected.condition
- the SQL condition of the selectorderBy
- the SQL order by clause used in the selection (exclude the "order
by" key words and only include the column(s) part of the clause in this
parameter).con
- the operation of this select is part of the transaction associated
with this Connection object.
java.sql.SQLException
{@link
- DataTransferException}
DataTransferException
public java.util.Vector select(java.lang.String condition, java.lang.String orderBy) throws java.sql.SQLException, DataTransferException
condition
- the SQL condition of the selectorderBy
- the SQL order by clause used in the selection (exclude the "order
by" key words and only include the column(s) part of the clause in this
parameter).
java.sql.SQLException
{@link
- DataTransferException}
DataTransferException
public java.util.Vector select(java.lang.String condition, java.lang.String orderBy, DBContext c) throws java.sql.SQLException, DataTransferException
condition
- the SQL condition of the selectorderBy
- the SQL order by clause used in the selection (exclude the "order
by" key words and only include the column(s) part of the clause in this
parameter).c
- the operation of this select is part of the transaction associated
with this DBContext object.
java.sql.SQLException
{@link
- DataTransferException}
DataTransferException
public java.util.Vector select(java.lang.String condition, java.lang.String orderBy, java.sql.Connection con) throws java.sql.SQLException, DataTransferException
condition
- the SQL condition of the selectorderBy
- the SQL order by clause used in the selection (exclude the "order
by" key words and only include the column(s) part of the clause in this
parameter).con
- the operation of this select is part of the transaction associated
with this Connection object.
java.sql.SQLException
{@link
- DataTransferException}
DataTransferException
public int delete(java.lang.String condition) throws java.sql.SQLException
condition
- the SQL condition used in the delete operation
java.sql.SQLException
public int delete(java.lang.String condition, java.sql.Connection con) throws java.sql.SQLException
con
- this delete operation is part of the transaction associated with this
Connection object.condition
- the SQL condition used in the delete operation
java.sql.SQLException
public int delete(java.lang.String condition, DBContext c) throws java.sql.SQLException
c
- this delete operation is part of the transaction associated with this
DBContext object.condition
- the SQL condition used in the delete operation
java.sql.SQLException
public boolean load(java.lang.String condition) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition to load the data from database.
java.sql.SQLException
DataTransferException
public boolean load(java.lang.String condition, java.sql.Connection con) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition to load the data from database.con
- this load operation is part of the transaction associated with
this Connection object.
java.sql.SQLException
DataTransferException
public boolean load(java.lang.String condition, DBContext c) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition to load the data from database.c
- this load operation is part of the transaction associated with
this DBContext object.
java.sql.SQLException
DataTransferException
public boolean load() throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
java.sql.SQLException
DataTransferException
public boolean load(java.sql.Connection con) throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
con
- this load operation is part of the transaction associated with
this Connection object.
java.sql.SQLException
DataTransferException
public boolean load(DBContext c) throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
java.sql.SQLException
DataTransferException
public boolean store(java.lang.String condition) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition used to store this bean to the associated table.
java.sql.SQLException
DataTransferException
public boolean store(java.lang.String condition, java.sql.Connection con) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition used to store this bean to the associated table.con
- this store operation is part of the transaction associated with
this Connection object.
java.sql.SQLException
DataTransferException
public boolean store(java.lang.String condition, DBContext c) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition used to store this bean to the associated table.c
- this store operation is part of the transaction associated with
this DBContext object.
java.sql.SQLException
DataTransferException
public boolean store() throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
java.sql.SQLException
DataTransferException
public boolean store(java.sql.Connection con) throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
con
- the store operation is part of the transaction associated with
this Connection object.
java.sql.SQLException
DataTransferException
public boolean store(DBContext c) throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
java.sql.SQLException
DataTransferException
public boolean remove(java.lang.String condition) throws DataTransferException, java.sql.SQLException
The difference of a remove method and a delete method is that a remove method can only remove the calling data bean itself from its associated table, while a delete method will not necessarily delete the calling data bean from the table and doesn't even require that the calling data bean exists in the table. The data beans that will be deleted from the call to the delete method will be determined by the SQL condition passed in.
condition
- the SQL condition used to remove the calling bean from the database
java.sql.SQLException
DataTransferException
- if more than one object would be removed based
on the specified SQL condition.public boolean remove(java.lang.String condition, DBContext c) throws DataTransferException, java.sql.SQLException
The difference of a remove method and a delete method is that a remove method can only remove the calling data bean itself from its associated table, while a delete method will not necessarily delete the calling data bean from the table and doesn't even require that the calling data bean exists in the table. The data beans that will be deleted from the call to the delete method will be determined by the SQL condition passed in.
condition
- the SQL condition used to remove the calling bean from the database.c
- the operation of remove is part of the transaction associated with
this DBContext object.
java.sql.SQLException
DataTransferException
- if more than one object would be removed based
on the specified SQL condition.public boolean remove(java.lang.String condition, java.sql.Connection con) throws DataTransferException, java.sql.SQLException
The difference of a remove method and a delete method is that a remove method can only remove the calling data bean itself from its associated table, while a delete method will not necessarily delete the calling data bean from the table and doesn't even require that the calling data bean exists in the table. The data beans that will be deleted from the call to the delete method will be determined by the SQL condition passed in.
condition
- the SQL condition used to remove the calling bean from the database.con
- the operation of remove is part of the transaction associated with
this Connection object.
java.sql.SQLException
DataTransferException
- if more than one object would be removed based
on the specified SQL condition.public boolean remove() throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
The difference of a remove method and a delete method is that a remove method can only remove the calling data bean itself from its associated table, while a delete method will not necessarily delete the calling data bean from the table and doesn't even require that the calling data bean exists in the table. The data beans that will be deleted from the call to the delete method will be determined by the SQL condition passed in.
java.sql.SQLException
DataTransferException
- if more than one object would be removed based
on the specified SQL condition.public boolean remove(java.sql.Connection con) throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
The difference of a remove method and a delete method is that a remove method can only remove the calling data bean itself from its associated table, while a delete method will not necessarily delete the calling data bean from the table and doesn't even require that the calling data bean exists in the table. The data beans that will be deleted from the call to the delete method will be determined by the SQL condition passed in.
con
- the operation of this remove is part of the transaction associated
with this Connection object.
java.sql.SQLException
DataTransferException
- if more than one object would be removed based
on the specified SQL condition.public boolean remove(DBContext c) throws DataTransferException, java.sql.SQLException
getKeyCondition method
.
The difference of a remove method and a delete method is that a remove method can only remove the calling data bean itself from its associated table, while a delete method will not necessarily delete the calling data bean from the table and doesn't even require that the calling data bean exists in the table. The data beans that will be deleted from the call to the delete method will be determined by the SQL condition passed in.
c
- the operation of this remove is part of the transaction associated
with this DBContext object.
java.sql.SQLException
DataTransferException
- if more than one object would be removed based
on the specified SQL condition.public boolean create(boolean ignorAutoIncrement) throws DataTransferException, java.sql.SQLException
ignorAutoIncrement
- if there is a auto increment column in the table then the
value inserted to that column will depend on the value of this parameter.
In this case(there is a auto_increment column), if the parameter is true, the value
inserted into the auto increment column will be drawn from the corresponding property
value of the calling data bean; If this parameter is false, then a null value will
be inserted into that column and the actual value of that column will be determined by the system.
java.sql.SQLException
DataTransferException
public boolean create() throws DataTransferException, java.sql.SQLException
create(boolean ignorAutoIncrement)
, with the
ignorAutoIncrement parameter set to false. This is the default behavior.
DataTransferException
java.sql.SQLException
public boolean create(java.sql.Connection con) throws DataTransferException, java.sql.SQLException
create(Connection con, boolean ignorAutoIncrement)
, with the
ignorAutoIncrement parameter set to false.
DataTransferException
java.sql.SQLException
public boolean create(DBContext c) throws DataTransferException, java.sql.SQLException
create(DBContext c, boolean ignorAutoIncrement)
, with the
ignorAutoIncrement parameter set to false.
DataTransferException
java.sql.SQLException
public boolean create(java.sql.Connection con, boolean ignorAutoIncrement) throws DataTransferException, java.sql.SQLException
con
- the create operation is part of the transaction associated with
this Connection object.ignorAutoIncrement
- if there is a auto increment column in the table then the
value inserted to that column will depend on the value of this parameter.
In this case(there is a auto_increment column), if the parameter is true, the value
inserted into the auto increment column will be drawn from the corresponding property
value of the calling data bean; If this parameter is false, then a null value will
be inserted into that column and the actual value of that column will be determined by the system.
java.sql.SQLException
DataTransferException
public boolean create(DBContext c, boolean ignorAutoIncrement) throws DataTransferException, java.sql.SQLException
c
- the create operation is part of the transaction associated with
this DBContext object.ignorAutoIncrement
- if there is a auto increment column in the table then the
value inserted to that column will depend on the value of this parameter.
In this case(there is a auto_increment column), if the parameter is true, the value
inserted into the auto increment column will be drawn from the corresponding property
value of the calling data bean; If this parameter is false, then a null value will
be inserted into that column and the actual value of that column will be determined by the system.
java.sql.SQLException
DataTransferException
public boolean find(java.lang.String condition) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition that must also be met if present when checking
the existence of the data bean in the table
java.sql.SQLException
{@link
- DataTransferException}
DataTransferException
public java.lang.String getColumnList(java.lang.String prefix)
prefix
- the prefix to be added to all the column names.public java.lang.Object getMaxID(java.lang.String column, java.sql.Connection con) throws java.sql.SQLException
column
- this is the column name whose max value is fetched. This column must
have a type so that the SQL operation "select max(thiscolumn) from ...." is legal.con
- The operation of this method is part of the transaction associated
with this Connection object.
java.sql.SQLException
public java.lang.Object getMaxID(java.lang.String column, DBContext c) throws java.sql.SQLException
column
- this is the column name whose max value is fetched. This column must
have a type so that the SQL operation "select max(thiscolumn) from ...." is legal.c
- The operation of this method is part of the transaction associated
with this DBContext object.
java.sql.SQLException
public java.lang.Object getMaxPrimaryKey(java.sql.Connection con) throws java.sql.SQLException
con
- The operation of this method is part of the transaction associated
with this Connection object.
java.sql.SQLException
java.lang.RuntimeException
- if the table doesn't have a primary key.public java.lang.Object getMaxPrimaryKey(DBContext c) throws java.sql.SQLException
c
- The operation of this method is part of the transaction associated
with this DBContext object.
java.sql.SQLException
java.lang.RuntimeException
- if the table doesn't have a primary key.public java.util.Iterator iterator()
public java.util.Iterator iterator(java.lang.String condition)
condition
- the SQL condition for the selectpublic java.util.Iterator iterator(java.lang.String tableList, java.lang.String condition)
tableList
- a string of table names seprated by a comma. The tables
in the list will only be referenced from the SQL condition and should not
contain the calling bean's associated table name.condition
- the SQL condition for the selectpublic abstract int getID()
public java.lang.String getTableName()
public java.lang.String getKeyColumnName()
public boolean exists() throws DataTransferException, java.sql.SQLException
java.sql.SQLException
DataTransferException
public boolean exists(java.lang.String condition) throws DataTransferException, java.sql.SQLException
condition
- the SQL condition that must be met when checking the existence
of the calling data bean in its associated database table.
java.sql.SQLException
DataTransferException
public boolean exists(java.lang.String tables, java.lang.String condition) throws DataTransferException, java.sql.SQLException
tables
- a string of table names separated by a comma. The tables
in the list will only be referenced from the SQL condition and should not
contain the calling bean's associated table name.condition
- the SQL condition that must be met when checking the existence
of the calling data bean in its associated database table.
java.sql.SQLException
DataTransferException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |