Relaxer Table Object (RTO) is a Data Access Object (DAO) to access RDBMS tables.
Table 14.2.1.1[Relaxer Table Object method list] is a list of constructors for RTO.
Signature | Function |
---|---|
Constructor(String uri, String tableName) | Creates an RTO from the JDBC URL and the table name. |
Constructor(String uri, String tableName, String username, String password) | Creates an RTO from the JDBC URL, the table name, the user name, and the password. |
Constructor(String uri, String tableName, java.util.Properies properties) | Creates an RTO from the JDBC URL, the table name, and properties. |
Constructor(java.sql.Connection connection, String tableName) | Creates an RTO from the JDBC connection and the table name. |
Table 14.2.1.2[Relaxer Table Object instance method list] is a list of instance methods for RTO.
Signature | Function |
---|---|
boolean getJdbc2() | Gets whether or not JDBC2 facility is available. |
void setJdbc2(boolean jdbc2) | Sets whether or not JDBC2 facility is available. |
String getQuoteId() | Gets a quote symbol to quote ids in SQL. |
void setQuoteId(String quoteId) | Sets a quote symbol to quote ids in SQL. |
String getQuoteWhere() | Gets a quote symbol to quote a where clause in SQL. |
void setQuoteWhere(String quoteWhere) | Sets a quote symbol to quote a where clause in SQL. |
String getQuoteIdInWhere() | Gets a quote symbol to quote ids in a where clause in SQL. |
void setQuoteIdInWhere(String quoteIdInWhere) | Sets a quote symbol to quote ids in a where clause in SQL. |
String getTableName() | Gets the table name. |
java.sql.Connection getConnection() | Gets the JDBC connection. |
String getSelectClause() | Gets the select clause to be used in the RTO. |
boolean getAutoCommit() | Gets whether or not auto-commit is available. |
void setAutoCommit(boolean autoCommit) | Sets whether or not auto-commit is available. |
void commit() | Commits the transaction. |
void rollback() | Aborts the transaction. |
boolean getTransactionIsolation() | Gets the transaction isolation level. |
void setTransactionIsolation(boolean transactionIsolation) | Sets the transaction isolation level. |
void dispose() | Release the resources used by the RTO. |
void close() | Closes the RTO. |
boolean isClosed() | Tests whether or not the RTO is closed. |
void createTable() | Creates the table for the RTO. |
void dropTable() | Drops the table of the RTO. |
org.w3c.dom.Document[] selectAsDocuments() | Selects all records as XML documents. |
RelaxerObject[] select() | Selects all records as ROs. |
org.w3c.dom.Element[] selectAsElements(org.w3c.dom.Document doc) | Selects all records as XML elements. |
org.w3c.dom.Document selectAsDocument() | Selects all records as an XML document. |
org.w3c.dom.Document[] selectAsDocuments(String where) | Selects all records specified by the where cluase as XML documents. |
RelaxerObject[] select(String where) | Selects all records specified by the where cluase as ROs. |
org.w3c.dom.Element[] selectAsElements(org.w3c.dom.Document doc, String where) | Selects all records specified by the where cluase as XML elements. |
org.w3c.dom.Document selectAsDocument(String where) | Selects all records specified by the where cluase as an XML element. |
org.w3c.dom.Document[] selectByExpressionAsDocuments(String expression) | Selects all records specified by the expression as XML documents. |
RelaxerObject[] selectByExpression(String expression) | Selects all records specified by the expression as ROs. |
org.w3c.dom.Element[] selectByExpressionAsElements(org.w3c.dom.Document doc, String expression) | Selects all records specified by the expression as XML elements. |
org.w3c.dom.Document selectByExpressionAsDocument(String expression) | Selects all records specified by the expression cluase as an XML element. |
RelaxerTableListObject selectAsList() | Selects all records as an RTLO. |
RelaxerTableListObject selectAsList(String where) | Selects all records specified by the where cluase as an RTLO. |
RelaxerTableListObject selectByExpressionAsList(String expression) | Selects all records specified by the expression as an RTLO. |
void insert(org.w3c.dom.Document doc) | Inserts the record by the XML document. |
void insert(org.w3c.dom.Document[] docs) | Inserts the records by the XML documents. |
void insert(org.w3c.dom.Element element) | Inserts the record by the XML element. |
void insert(org.w3c.dom.Element elements) | Inserts the records by the XML elements. |
void insert(org.w3c.dom.DocumentFragment frag) | Inserts the records by the XML fragment. |
void insert(RelaxerObject object) | Inserts the records by the RO. |
void insert(RelaxerObject[] objects) | Inserts the records by the ROs. |
void insert(java.util.Collection collection) | Inserts the records by the collection. |
void insert(String uri) | Inserts the record by the XML file specified by the URI. |
void insert(String[] uris) | Inserts the record by the XML files specified by the URIs. |
void insert(java.net.URL url) | Inserts the record by the XML file specified by URL. |
void insert(java.net.URL[] urls) | Inserts the record by the XML files specified by URLs. |
void insert(java.io.File file) | Inserts the record by the XML file specified by the file. |
void insert(java.io.File[] files) | Inserts the record by the XML files specified by the files. |
void insert(java.io.InputStream in) | Inserts the record by the XML file specified by the input stream. |
void insert(java.io.InputStream[] ins) | Inserts the record by the XML files specified by the input streams. |
void insert(org.xml.sax.InputSource in) | Inserts the record by the XML file specified by the InputSource. |
void insert(org.xml.sax.InputSource[] ins) | Inserts the record by the XML files specified by the InputSources. |
void insert(java.io.Reader in) | Inserts the record by the XML file specified by the Reader. |
void insert(java.io.Reader[] ins) | Inserts the record by the XML file specified by the Readers. |
void delete(String where) | Deletes all records specified by the where cluase. |
Table 14.2.1.3[Relaxer Table Object static method list] is a list of static methods for RTO.
Signature | Function |
---|---|
org.w3c.dom.Document[] makeDocuments(java.sql.ResultSet rs) | Creates XML documents from the ResultSet. |
org.w3c.dom.Document makeDocument(java.sql.ResultSet rs) | Creates an XML document from the ResultSet. |
org.w3c.dom.Element[] makeElements(java.sql.ResultSet rs, org.w3c.dom.Document doc) | Creates XML elements from the ResultSet. |
org.w3c.dom.Element makeElement(java.sql.ResultSet rs, org.w3c.dom.Document doc) | Creates an XML elements from the ResultSet. |
void main(String[] args) | Main method to be used as the command. |
If the jdbc.ee is set to true
, constructors
shown below accept a JNDI name in addition to a normal JDBC URL.
Constructor(String url, String tableName)
Constructor(String url, String tableName, String username, String password)
Constructor(String url, String tableName, java.util.Properties properties)
If the schema has a primary key, some methods are appended in the RTO. Table 14.2.3.1[Relaxer Table Object instance method list] is a list of instance methods with regard to the primary key.
Signature | Function |
---|---|
org.w3c.dom.Document getByPropertyAsDocument(Type key) | Gets a record specified by the key as an XML document. |
RO getByProperty(Type property) | Gets a record specified by the key as an RO. |
int update(org.w3c.dom.Document doc) | Updates the record by the XML document. |
int update(org.w3c.dom.Element element) | Updates the record by the XML element. |
int update(RO object) | Updates the record by the RO. |
int deleteByAccountNo(Type key) | Deletes the record specified by the key. |