Annotation Interface Table


@Target(TYPE) @Retention(RUNTIME) public @interface Table
Indicates a database table.

This annotation must be used in conjunction with the Entity annotation.

 @Entity
 @Table(name = "EMP")
 public class Employee {
     ...
 }
 
  • Element Details

    • catalog

      String catalog
      Returns:
      the catalog name for the database table.
      Default:
      ""
    • schema

      String schema
      Returns:
      the schema name for the database table.
      Default:
      ""
    • name

      String name
      The table name.

      If not specified, the table name is resolved by Entity.naming().

      Returns:
      the table name
      Default:
      ""
    • quote

      boolean quote
      Returns:
      whether quotation marks should be used for the catalog name, the schema name and the table name in SQL statements.
      Default:
      false