Package com.sun.ts.tests.common.ejb.dba
Class StringDBSupport
java.lang.Object
com.sun.ts.tests.common.ejb.dba.DBSupport
com.sun.ts.tests.common.ejb.dba.StringDBSupport
- All Implemented Interfaces:
Serializable
DB Support object for DB table using whose primary key is an 'int'.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected float
protected static final String
Name of the property whose value is the DB table nameFields inherited from class com.sun.ts.tests.common.ejb.dba.DBSupport
dbConnection, DBLookupName, ds, nctx, prefix, tablePrefix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
createNewRow
(String cofID, String cofName, float cofPrice) static void
initTable
(Properties props) boolean
float
void
void
storePrice
(String pkey, float cofPrice) Methods inherited from class com.sun.ts.tests.common.ejb.dba.DBSupport
closeDBConnection, closeStmt, getDBConnection, getStmt, initTable
-
Field Details
-
strTablePrefix
Name of the property whose value is the DB table name- See Also:
-
cofID
-
cofName
-
cofPrice
protected float cofPrice
-
-
Constructor Details
-
StringDBSupport
Create a new DBSupport object. If called from an EJB or a Web component, you must make sure to call TestUtil.init() before creating a new DBSupport object.- Throws:
Exception
-
-
Method Details
-
initTable
- Throws:
Exception
-
keyExists
- Throws:
SQLException
-
createNewRow
public void createNewRow(String cofID, String cofName, float cofPrice) throws jakarta.ejb.CreateException, SQLException - Throws:
jakarta.ejb.CreateException
SQLException
-
loadPrice
- Throws:
SQLException
-
storePrice
- Throws:
SQLException
-
removeRow
- Throws:
SQLException
-