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 Field

All Superinterfaces:
  DBObject

    public interface Field

extends DBObject

A `Field` is column of a table.

Field Summary
`static int` | `CALC_AVG` The constant indicates whether the field has AVG calculating mode.
`static int` | `CALC_COUNT` The constant indicates whether the field has COUNT calculating mode.
`static int` | `CALC_MAX` The constant indicates whether the field has MAX calculating mode.
`static int` | `CALC_MIN` The constant indicates whether the field has MIN calculating mode.
`static int` | `CALC_NONE` The constant indicates whether the field has a calculating mode.
`static int` | `CALC_SUM` The constant indicates whether the field has SUM calculating mode.
`static int` | `DefaultAttributes` The constant indicates the default attributes of a Field.
`static int` | `ForeignKey` The constant indicates whether the field is a foreign key.
`static int` | `Identity` The constant indicates whether the field is an identity field.
`static int` | `NotNull` The constant indicates whether the field accepts a `NULL` value.
`static int` | `PrimaryKey` The constant indicates whether the field is a primary key.
`static int` | `Truncated` The constant indicates whether the field value will be truncated when it is assigned to a value exceeding its declared maximum column length.
`static int` | `Unique` The constant indicates whether the field is unique.

Method Summary
`Field` | `createClone()` Clones a `Field`.
`FieldValue` | `createFieldValue()` Creates a `FieldValue` object and fills it with default value.
`int` | `getCalculating()` Gets the calculating mode of a field.
`java.lang.String` | `getDispName()` Gets the field's suggested title for display.
`java.lang.String` | `getForeignTableName()` Gets the name of the table which is referenced by the foreign key.
`java.lang.String` | `getFullyQualifiedName()` Gets the table name plus field name.
`JDBCType` | `getJDBCType()` Gets the JDBC type of the field.
`Table` | `getParentTable()` Gets the parent table of this field.
`int` | `getSize()` Gets the field's string size.
`java.lang.String` | `getTableName()` Gets the name of the table containing the field.
`boolean` | `isForeignKey()` Judges whether the field is a foreign key.
`boolean` | `isIdentity()` Judges whether the field is an identity field.
`boolean` | `isNotNull()` Judges whether the field can accept a `NULL` value.
`boolean` | `isPrimaryKey()` Judges whether the field is a primary key.
`boolean` | `isTruncated()` Judges whether the field value will be truncated before it was written into database, if the length of the field value exceeds the max length.
`boolean` | `isUnique()` Judge whether the field is a unique field.

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

Field Detail

### DefaultAttributes

    static final int DefaultAttributes

  The constant indicates the default attributes of a Field.

  See Also:
    Constant Field Values

### NotNull

    static final int NotNull

  The constant indicates whether the field accepts a `NULL` value.

  See Also:
    Constant Field Values

### Identity

    static final int Identity

  The constant indicates whether the field is an identity field.

  See Also:
    Constant Field Values

### Unique

    static final int Unique

  The constant indicates whether the field is unique.

  See Also:
    Constant Field Values

### PrimaryKey

    static final int PrimaryKey

  The constant indicates whether the field is a primary key.

  See Also:
    Constant Field Values

### Truncated

    static final int Truncated

  The constant indicates whether the field value will be truncated when it is assigned to a value exceeding its declared maximum column length.
  The constant is only used for Non-critical char-based columns whose value length is unpredictable and whose integrity is not cared.
  It is not a database level attribute.

  See Also:
    `jet#server#db#core#FileValueImpl#setValue()`, Constant Field Values

### ForeignKey

    static final int ForeignKey

  The constant indicates whether the field is a foreign key.

  See Also:
    Constant Field Values

### CALC_NONE

    static final int CALC_NONE

  The constant indicates whether the field has a calculating mode.

  See Also:
    Constant Field Values

### CALC_COUNT

    static final int CALC_COUNT

  The constant indicates whether the field has COUNT calculating mode.

  See Also:
    Constant Field Values

### CALC_SUM

    static final int CALC_SUM

  The constant indicates whether the field has SUM calculating mode.

  See Also:
    Constant Field Values

### CALC_AVG

    static final int CALC_AVG

  The constant indicates whether the field has AVG calculating mode.

  See Also:
    Constant Field Values

### CALC_MAX

    static final int CALC_MAX

  The constant indicates whether the field has MAX calculating mode.

  See Also:
    Constant Field Values

### CALC_MIN

    static final int CALC_MIN

  The constant indicates whether the field has MIN calculating mode.

  See Also:
    Constant Field Values

Method Detail

### getParentTable

    Table getParentTable()

  Gets the parent table of this field.

  Returns:
    A table instance.

### getJDBCType

    JDBCType getJDBCType()

  Gets the JDBC type of the field.

  Returns:
    JDBCType from jet.server.api.dao.JDBCType

### getSize

    int getSize()

  Gets the field's string size.

  Returns:
    precision

### isNotNull

    boolean isNotNull()

  Judges whether the field can accept a `NULL` value.

  Returns:
    Return `true` if can accept, otherwise return `false`.

### isIdentity

    boolean isIdentity()

  Judges whether the field is an identity field.

  Returns:
    Return `true` if it is, otherwise return `false`.

### isUnique

    boolean isUnique()

  Judge whether the field is a unique field.

  Returns:
    Return `true` if it is, otherwise return `false`.

### isPrimaryKey

    boolean isPrimaryKey()

  Judges whether the field is a primary key.

  Returns:
    Return `true` if it is, otherwise return `false`.

### isTruncated

    boolean isTruncated()

  Judges whether the field value will be truncated before it was written into database, if the length of the field value exceeds the max length.

  Returns:
    Return `true` if it will be truncated, otherwise return `false`.

### isForeignKey

    boolean isForeignKey()

  Judges whether the field is a foreign key.

  Returns:
    Return `true` if it is, otherwise return `false`.

### getCalculating

    int getCalculating()

  Gets the calculating mode of a field.

  Returns:
    An `int` which indicates the calculating mode of the field.

### createFieldValue

    FieldValue createFieldValue()

  Creates a `FieldValue` object and fills it with default value.

  Returns:
    An `FieldValue` object.

### getTableName

    java.lang.String getTableName()

  Gets the name of the table containing the field.

  Returns:
    A String whose value is the name of the table containing the field.

### getDispName

    java.lang.String getDispName()

  Gets the field's suggested title for display.

  Returns:
    A String which is the suggested column title.

### getFullyQualifiedName

    java.lang.String getFullyQualifiedName()

  Gets the table name plus field name.

  Returns:
    A String whose value is the full field name.

### getForeignTableName

    java.lang.String getForeignTableName()

  Gets the name of the table which is referenced by the foreign key.

  Returns:
    A String which is the name of the table.

### createClone

    Field createClone()

  Clones a `Field`.

  Returns:
    A cloned Field.

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