|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.syncsoft.plainsql.PlainSql
com.syncsoft.plainsql.PlainTable
public class PlainTable
This class represents a single table. Sort of a very weak ORM capability that doesn't need mapping our config (or a competent java programmer to create it :-) ) It's really a PlainSql object that represents a SELECT * FROM table. There are some methods to support DML and it holds table meta data ALL rows will be fetched into memory at some point if you try to access any of rows
| Constructor Summary | |
|---|---|
PlainTable(PSconnection conn,
java.lang.String tablename)
Create a Plain Table object |
|
PlainTable(PSconnection conn,
java.lang.String tablename,
java.lang.String additionalSQL)
Create a Plain Table object |
|
| Method Summary | |
|---|---|
int |
colcount()
Number of columns in the table |
Row |
emptyrow()
Empty row suitable for inserting. |
RowSet |
emptyRowSet()
|
RowSet |
fetchAll()
|
java.lang.String |
getColumnList()
|
java.util.ArrayList<java.lang.String> |
getColumnNames()
|
java.util.ArrayList<java.lang.String> |
getPrimaryKeys()
|
java.lang.String |
getTableCatalog()
|
java.lang.String |
getTableName()
Access the name of the table for which this object was created. |
java.lang.String |
getTablenameSupplied()
|
java.lang.String |
getTableSchema()
|
java.lang.String |
getTableType()
|
int |
insertArray(RowSet rows)
Insert a batch (array) of rows |
int |
updateRow(Row updateRow)
Apply row changes to the database. |
| Methods inherited from class com.syncsoft.plainsql.PlainSql |
|---|
bindArgs, close, execute, execute, executeBatch, executeUpdate, executeUpdate, fetchAll, fetchOne, getColNames, getFetchahead, getJdbcConnection, getJdbcStatement, getPsConnection, getResult, getRsMetaData, getSql, makeRow, nextRow, setFetchAhead |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlainTable(PSconnection conn,
java.lang.String tablename)
throws java.sql.SQLException
conn - PSconnection objecttablename - table name
java.sql.SQLException
public PlainTable(PSconnection conn,
java.lang.String tablename,
java.lang.String additionalSQL)
throws java.sql.SQLException
conn - PSconnection objecttablename - table nameadditionalSQL - any additional SQL (usually a WHERE clause)
java.sql.SQLException| Method Detail |
|---|
public int colcount()
throws java.sql.SQLException
colcount in class PlainSqljava.sql.SQLException
public Row emptyrow()
throws java.sql.SQLException
java.sql.SQLException
public RowSet emptyRowSet()
throws java.sql.SQLException
java.sql.SQLException
public RowSet fetchAll()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getColumnList()
public java.util.ArrayList<java.lang.String> getColumnNames()
public java.util.ArrayList<java.lang.String> getPrimaryKeys()
public java.lang.String getTableCatalog()
public java.lang.String getTableName()
public java.lang.String getTablenameSupplied()
public java.lang.String getTableSchema()
public java.lang.String getTableType()
public int insertArray(RowSet rows)
throws java.sql.SQLException
rows - -
Rows to be inserted in RowSet format
java.sql.SQLException
public int updateRow(Row updateRow)
throws java.sql.SQLException
Row - object containing updated values.
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||