Package helma.scripting.rhino.extensions
Class DatabaseObject
java.lang.Object
helma.scripting.rhino.extensions.DatabaseObject
A Database object, representing a connection to a JDBC Driver
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseObject
(DbSource dbsource) Create a new database object based on a hop data source. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Connect to the database, using the specific url, optional user name and passwordboolean
Disconnect from the database, nop if not conectedint
executeCommand
(String sql) executePreparedRetrieval
(PreparedStatement statement) executeRetrieval
(String sql) void
release()
toString()
-
Constructor Details
-
DatabaseObject
Create a new database object based on a hop data source.- Parameters:
dbsource
- The name of the DB source
-
-
Method Details
-
getClassName
-
toString
-
toDetailString
-
getLastError
-
connect
Connect to the database, using the specific url, optional user name and password- Parameters:
url
- the database URLuserName
- the database user namepassword
- the database password- Returns:
- true if successful, false otherwise
-
disconnect
public boolean disconnect()Disconnect from the database, nop if not conected- Returns:
- true if successful, false if error during idsconnect
-
release
public void release() -
executeRetrieval
-
executePreparedRetrieval
-
executeCommand
-
getMetaData
-