Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## javax.jdo.annotations
Annotation Type Column

    @Target(value={FIELD,METHOD})
    @Retention(value=RUNTIME)
    public @interface Column

Annotation for a column in the database. Corresponds to the xml element "column".

Since:
  2.1
Version:
  2.1

Optional Element Summary
`java.lang.String` | `allowsNull` Whether the column allows null values to be inserted.
`java.lang.String` | `defaultValue` Default value for this column.
`Extension[]` | `extensions` Vendor extensions.
`java.lang.String` | `insertValue` Value to be inserted when this is an "unmapped" column
`java.lang.String` | `jdbcType` JDBC Type for this column.
`int` | `length` Maximum length of data stored in this column.
`java.lang.String` | `name` Name of the column.
`int` | `scale` Scale for the column when handling floating point values.
`java.lang.String` | `sqlType` SQL Type for this column.
`java.lang.String` | `target` Target column for this column in the other table when part of a foreign key relation.
`java.lang.String` | `targetMember` Target member in the other class or interface for this column when part of a bidirectional relation.

### name

    public abstract java.lang.String name

  Name of the column.

  Returns:
    the name of the column
  Default:
    ""

### target

    public abstract java.lang.String target

  Target column for this column in the other table when part of a foreign key relation.

  Returns:
    the target column in the other table for this column when part of a foreign key relation.
  Default:
    ""

### targetMember

    public abstract java.lang.String targetMember

  Target member in the other class or interface for this column when part of a bidirectional relation.

  Returns:
    the target member for this column when part of a bidirectional relation.
  Default:
    ""

### jdbcType

    public abstract java.lang.String jdbcType

  JDBC Type for this column.

  Returns:
    JDBC type for this column
  Default:
    ""

### sqlType

    public abstract java.lang.String sqlType

  SQL Type for this column.

  Returns:
    SQL type for this column
  Default:
    ""

### length

    public abstract int length

  Maximum length of data stored in this column.

  Returns:
    the maximum length of data stored in this column
  Default:
    -1

### scale

    public abstract int scale

  Scale for the column when handling floating point values.

  Returns:
    the scale for the column when handling floating point values
  Default:
    -1

### allowsNull

    public abstract java.lang.String allowsNull

  Whether the column allows null values to be inserted.

  Returns:
    whether the column allows null values to be inserted
  Default:
    ""

### defaultValue

    public abstract java.lang.String defaultValue

  Default value for this column.

  Returns:
    the default value for this column
  Default:
    ""

### insertValue

    public abstract java.lang.String insertValue

  Value to be inserted when this is an "unmapped" column

  Returns:
    the value to be inserted when this is an "unmapped" column
  Default:
    ""

### extensions

    public abstract Extension[] extensions

  Vendor extensions.

  Returns:
    the vendor extensions
  Default:
    {}

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.