Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api.db
Interface Table

All Superinterfaces:
  DBObject

    public interface Table

extends DBObject

A `Table` is a data table in a database.

Method Summary
`int` | `delete(java.lang.String whereClause)` Deprecated. SQL Injection Vulnerabilities. Replaced by `delete(String, ParameterMetaInfo)`
`int` | `delete(java.lang.String whereCluse, jet.server.db.core.ParameterMetaInfo paras)` Deletes records from the table.
`Fields` | `fields()` Retrieves the fields container of this table.
`Field` | `fields(int index)` Gets the `Field` specified by index.
`Field` | `fields(java.lang.String fieldName)` Gets the `Field` specified by name.
`Database` | `getDatabase()` Retrieves `Database` of this table.
`java.lang.String` | `getExternalDataPath(FieldValue[] fields)` Gets the external data path of a record.
`java.util.Set<java.lang.String>` | `getForeignTableNames()` Retrieves the foreign table names of this table referenced
`java.lang.String` | `getNameWithoutSchema()` Gets table name without schema.
`boolean` | `hasExternalData()` Returns whether the table has external data.
`int` | `insert(FieldValue[] fields)` Inserts a record to the table.
`int` | `insert(java.util.List records)` Deprecated. this method can not handle complex data type correctly (for example LOB). As of v9 replaced by `insert2(java.util.List)`
`int` | `insert2(java.util.List records)`
`Recordset` | `query(Field[] fields, java.lang.String whereClause, boolean distinct)` Deprecated. SQL Injection Vulnerabilities. Replaced by `query(Field[], String, ParameterMetaInfo, boolean)`
`Recordset` | `query(Field[] fields, java.lang.String whereClause, boolean distinct, int setType)` Deprecated. SQL Injection Vulnerabilities. Replaced by `query(Field[], String, ParameterMetaInfo, boolean, int)`
`Recordset` | `query(Field[] fields, java.lang.String whereClause, boolean distinct, int setType, int resultSetType)` Deprecated. SQL Injection Vulnerabilities. Replaced by `query(Field[], String, ParameterMetaInfo, boolean, int, int)`
`Recordset` | `query(Field[] fields, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct)` Returns a linked record set by the specified columns and conditions.
`Recordset` | `query(Field[] fields, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct, int setType)` Return a linked or a cached record set by the specified columns and conditions.
`Recordset` | `query(Field[] fields, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct, int setType, int resultSetType)` Return a linked or a cached record set by the specified columns and conditions.
`java.lang.Number` | `queryAvgValue(java.lang.String field, java.lang.String whereClause, boolean distinct)` Deprecated. SQL Injection Vulnerabilities. Replaced by `queryAvgValue(String, String, ParameterMetaInfo, boolean)`
`java.lang.Number` | `queryAvgValue(java.lang.String field, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct)` Equals to "SELECT AVG (colName) FROM table WHERE.."
`int` | `queryCountValue(java.lang.String field, java.lang.String whereClause, boolean distinct)` Deprecated. SQL Injection Vulnerabilities. Replaced by `queryCountValue(String, String, ParameterMetaInfo, boolean)`
`int` | `queryCountValue(java.lang.String field, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct)` Equals to "SELECT COUNT (colName) FROM table WHERE.."
`java.lang.Number` | `queryMaxValue(java.lang.String field, java.lang.String whereClause, boolean distinct)` Deprecated. SQL Injection Vulnerabilities. Replaced by `queryMaxValue(String, String, ParameterMetaInfo, boolean)`
`java.lang.Number` | `queryMaxValue(java.lang.String field, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct)` Equals to "SELECT MAX (colName) FROM table WHERE.."
`java.lang.Number` | `queryMinValue(java.lang.String field, java.lang.String whereClause, boolean distinct)` Deprecated. SQL Injection Vulnerabilities. Replaced by `queryMinValue(String, String, ParameterMetaInfo, boolean)`
`java.lang.Number` | `queryMinValue(java.lang.String field, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct)` Equals to "SELECT MIN (colName) FROM table WHERE.."
`java.lang.Number` | `querySumValue(java.lang.String field, java.lang.String whereClause, boolean distinct)` Deprecated. SQL Injection Vulnerabilities. Replaced by `querySumValue(String, String, ParameterMetaInfo, boolean)`
`java.lang.Number` | `querySumValue(java.lang.String field, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras, boolean distinct)` Equals to "SELECT SUM (colName) FROM table WHERE.."
`Uniques` | `uniques()` Retrieves the `Unique` container of this table.
`Unique` | `uniques(int index)` Retrieves the `Unique` specified by the index.
`Unique` | `uniques(java.lang.String unqName)` Retrieves the `Unique` specified by the name.
`int` | `update(FieldValue[] fields, java.lang.String whereClause)` Deprecated. SQL Injection Vulnerabilities. Replaced by `update(FieldValue[], String, ParameterMetaInfo)`
`int` | `update(FieldValue[] fields, java.lang.String whereClause, jet.server.db.core.ParameterMetaInfo paras)` Updates the records of the table.

Methods inherited from interface jet.server.api.db.DBObject
`getName, getProperties, getProperty, getProperty, getUCName, setProperty`

Method Detail

### getNameWithoutSchema

    java.lang.String getNameWithoutSchema()

  Gets table name without schema.

  Returns:
    table name without schema.

### getDatabase

    Database getDatabase()

  Retrieves `Database` of this table.

  Returns:
    the `Database` instance.

### fields

    Fields fields()

  Retrieves the fields container of this table.

  Returns:
    the `Fields` instance.
  See Also:
    `Fields`

### fields

    Field fields(int index)

  Gets the `Field` specified by index.

  Parameters:
    `index` - the field index.
  Returns:
    a `Field` instance.

### fields

    Field fields(java.lang.String fieldName)

  Gets the `Field` specified by name.

  Parameters:
    `fieldName` - the field name.
  Returns:
    a `Field` instance.

### query

    Recordset query(Field[] fields,
                    java.lang.String whereClause,
                    boolean distinct)
                    throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `query(Field[], String, ParameterMetaInfo, boolean)`

  Returns a linked record set by the specified columns and conditions.

  Parameters:
    `fields` - the columns to retrieve.
    `whereClause` - the sql where clause.
    `distinct` - the sql distinct.
  Returns:
    a `Recordset` instance.
  Throws:
    `java.sql.SQLException`

### query

    Recordset query(Field[] fields,
                    java.lang.String whereClause,
                    jet.server.db.core.ParameterMetaInfo paras,
                    boolean distinct)
                    throws java.sql.SQLException

  Returns a linked record set by the specified columns and conditions.

  Parameters:
    `fields` - the columns to retrieve.
    `whereClause` - the sql where clause
    `paras` - the sql parameter metadata information.
    `distinct` - the sql distinct
  Returns:
    a `Recordset` instance.
  Throws:
    `java.sql.SQLException`

### query

    Recordset query(Field[] fields,
                    java.lang.String whereClause,
                    boolean distinct,
                    int setType)
                    throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `query(Field[], String, ParameterMetaInfo, boolean, int)`

  Returns a linked or a cached record set by the specified columns and conditions.

  Parameters:
    `fields` - the columns to retrieve.
    `whereClause` - the sql where clause.
    `distinct` - the sql distinct.
    `setType` - record set type, which should be one of `jet.server.api.db.Recordset.LINKED` or `jet.server.api.db.Recordset.CACHED`
  Returns:
    a `Recordset` instance.
  Throws:
    `java.sql.SQLException`

### query

    Recordset query(Field[] fields,
                    java.lang.String whereClause,
                    boolean distinct,
                    int setType,
                    int resultSetType)
                    throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `query(Field[], String, ParameterMetaInfo, boolean, int, int)`

  Returns a linked or a cached record set by the specified columns and conditions.

  Parameters:
    `fields` - the columns to retrieve.
    `whereClause` - the sql where clause.
    `distinct` - the sql distinct.
    `setType` - record set type, which should be one of `jet.server.api.db.Recordset.LINKED` or `jet.server.api.db.Recordset.CACHED`
    `resultSetType` - result set type, refer to `java.sql.ResultSet`
  Returns:
    a `Recordset` instance.
  Throws:
    `java.sql.SQLException`

### query

    Recordset query(Field[] fields,
                    java.lang.String whereClause,
                    jet.server.db.core.ParameterMetaInfo paras,
                    boolean distinct,
                    int setType)
                    throws java.sql.SQLException

  Return a linked or a cached record set by the specified columns and conditions.

  Parameters:
    `fields` - the columns to retrieve.
    `whereClause` - the sql where clause.
    `paras` - the sql parameter metadata information.
    `distinct` - the sql distinct.
    `setType` - record set type, which should be one of `jet.server.api.db.Recordset.LINKED` or `jet.server.api.db.Recordset.CACHED`
  Returns:
    a `Recordset` instance.
  Throws:
    `java.sql.SQLException`

### query

    Recordset query(Field[] fields,
                    java.lang.String whereClause,
                    jet.server.db.core.ParameterMetaInfo paras,
                    boolean distinct,
                    int setType,
                    int resultSetType)
                    throws java.sql.SQLException

  Return a linked or a cached record set by the specified columns and conditions.

  Parameters:
    `fields` - the columns to retrieve.
    `whereClause` - the sql where clause.
    `paras` - the sql parameter metadata information.
    `distinct` - the sql distinct.
    `setType` - record set type, which should be one of `jet.server.api.db.Recordset.LINKED` or `jet.server.api.db.Recordset.CACHED`
    `resultSetType` - result set type, refer to `java.sql.ResultSet`
  Returns:
    a `Recordset` instance.
  Throws:
    `java.sql.SQLException`

### queryCountValue

    int queryCountValue(java.lang.String field,
                        java.lang.String whereClause,
                        boolean distinct)
                        throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `queryCountValue(String, String, ParameterMetaInfo, boolean)`

  Equals to "SELECT COUNT (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `distinct` -
  Returns:
    count
  Throws:
    `java.sql.SQLException`

### queryCountValue

    int queryCountValue(java.lang.String field,
                        java.lang.String whereClause,
                        jet.server.db.core.ParameterMetaInfo paras,
                        boolean distinct)
                        throws java.sql.SQLException

  Equals to "SELECT COUNT (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `parameterMetaInfo` -
    `distinct` -
  Returns:
    count
  Throws:
    `java.sql.SQLException`

### querySumValue

    java.lang.Number querySumValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `querySumValue(String, String, ParameterMetaInfo, boolean)`

  Equals to "SELECT SUM (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `distinct` -
  Returns:
    sum
  Throws:
    `java.sql.SQLException`

### querySumValue

    java.lang.Number querySumValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   jet.server.db.core.ParameterMetaInfo paras,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Equals to "SELECT SUM (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `parameterMetaInfo` -
    `distinct` -
  Returns:
    sum
  Throws:
    `java.sql.SQLException`

### queryAvgValue

    java.lang.Number queryAvgValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `queryAvgValue(String, String, ParameterMetaInfo, boolean)`

  Equals to "SELECT AVG (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `distinct` -
  Returns:
    average
  Throws:
    `java.sql.SQLException`

### queryAvgValue

    java.lang.Number queryAvgValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   jet.server.db.core.ParameterMetaInfo paras,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Equals to "SELECT AVG (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `parameterMetaInfo` -
    `distinct` -
  Returns:
    average
  Throws:
    `java.sql.SQLException`

### queryMaxValue

    java.lang.Number queryMaxValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `queryMaxValue(String, String, ParameterMetaInfo, boolean)`

  Equals to "SELECT MAX (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `distinct` -
  Returns:
    maximal value
  Throws:
    `java.sql.SQLException`

### queryMaxValue

    java.lang.Number queryMaxValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   jet.server.db.core.ParameterMetaInfo paras,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Equals to "SELECT MAX (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `parameterMetaInfo` -
    `distinct` -
  Returns:
    maximal value
  Throws:
    `java.sql.SQLException`

### queryMinValue

    java.lang.Number queryMinValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `queryMinValue(String, String, ParameterMetaInfo, boolean)`

  Equals to "SELECT MIN (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `distinct` -
  Returns:
    minimal value
  Throws:
    `java.sql.SQLException`

### queryMinValue

    java.lang.Number queryMinValue(java.lang.String field,
                                   java.lang.String whereClause,
                                   jet.server.db.core.ParameterMetaInfo paras,
                                   boolean distinct)
                                   throws java.sql.SQLException

  Equals to "SELECT MIN (colName) FROM table WHERE.."

  Parameters:
    `field` -
    `whereClause` -
    `parameterMetaInfo` -
    `distinct` -
  Returns:
    minimal value
  Throws:
    `java.sql.SQLException`

### insert

    int insert(FieldValue[] fields)
               throws java.sql.SQLException

  Inserts a record to the table.

  Parameters:
    `fields` -
  Returns:
    int
  Throws:
    `java.sql.SQLException`

### insert

    int insert(java.util.List records)
               throws java.sql.SQLException

  Deprecated. this method can not handle complex data type correctly (for example LOB). As of v9 replaced by `insert2(java.util.List)`

  Inserts multiple records to the table.

  Parameters:
    `records` -
  Returns:
    int
  Throws:
    `java.sql.SQLException`

### insert2

    int insert2(java.util.List records)
                throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### update

    int update(FieldValue[] fields,
               java.lang.String whereClause)
               throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `update(FieldValue[], String, ParameterMetaInfo)`

  Updates the records of the table.

  Parameters:
    `fields` -
    `whereClause` -
  Returns:
    int
  Throws:
    `java.sql.SQLException`

### update

    int update(FieldValue[] fields,
               java.lang.String whereClause,
               jet.server.db.core.ParameterMetaInfo paras)
               throws java.sql.SQLException

  Updates the records of the table.

  Parameters:
    `fields` -
    `whereClause` -
    `paras` -
  Returns:
    int
  Throws:
    `java.sql.SQLException`

### delete

    int delete(java.lang.String whereClause)
               throws java.sql.SQLException

  Deprecated. SQL Injection Vulnerabilities. Replaced by `delete(String, ParameterMetaInfo)`

  Deletes records from the table.

  Parameters:
    `whereClause` -
  Returns:
    int
  Throws:
    `java.sql.SQLException`

### delete

    int delete(java.lang.String whereCluse,
               jet.server.db.core.ParameterMetaInfo paras)
               throws java.sql.SQLException

  Deletes records from the table.

  Parameters:
    `String` - whereCluse
    `ParameterMetaInfo` - paras
  Returns:
    int
  Throws:
    `java.sql.SQLException`

### hasExternalData

    boolean hasExternalData()

  Returns whether the table has external data.

  Returns:
    whether the table has external data.

### getExternalDataPath

    java.lang.String getExternalDataPath(FieldValue[] fields)

  Gets the external data path of a record.

  Parameters:
    `fields` -
  Returns:
    the external data path of a record.

### uniques

    Uniques uniques()

  Retrieves the `Unique` container of this table.

  Returns:
    the `Uniques`
  See Also:
    `Uniques`

### uniques

    Unique uniques(int index)

  Retrieves the `Unique` specified by the index.

  Parameters:
    `index` -
  Returns:
    the `Unique`

### uniques

    Unique uniques(java.lang.String unqName)

  Retrieves the `Unique` specified by the name.

  Parameters:
    `unqName` -
  Returns:
    the `Unique`

### getForeignTableNames

    java.util.Set<java.lang.String> getForeignTableNames()

  Retrieves the foreign table names of this table referenced

  Returns:

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD