Annotation Interface Table
Indicates that the annotated class represents a database table.
Example usage:
\@Table(name = "products", indexes = {
\@Index(name = "idx_product_name", columnList = "name"),
\@Index(name = "idx_product_category", columnList = "category_id")
})
public class Product {
// Class implementation omitted for brevity
}
In this example, the 'Product' class is annotated with '@Table' to indicate that it
represents a database table named 'products'. Additionally, two indexes are defined
for the 'products' table: one on the 'name' column and another on the 'category_id' column.- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Optional Element Summary
-
Element Details
-
name
String nameSpecifies the name of the table.- Returns:
- the name of the table
- Default:
""
-
indexes
Index[] indexes(Optional) Indexes for the table. These are only used if table generation is in effect. Note that it is not necessary to specify an index for a primary key, as the primary key index will be created automatically.- Returns:
- an array of indexes for the table
- Default:
{}
-