Annotation Interface Table


@Retention(RUNTIME) @Target(TYPE) public @interface Table
Annotation to map an object to a database/view table.
 This is a class level annotation and is required for models.
 It has the following attributes
 
 name = "tablename"
 schema = "schemaname"
 catalog = "catalogname"

 @Table(name="products")
  public class Product{
    .....
  }
  
 @Table(name="products", schema="someSchemaName")
  public class Product{
    .....
  }
  
 @Table(name="products", catalog="someCatalogName")
  public class Product{
    .....
  }
  
  @Table(name="products", schema="someSchemaName", catalog="someCatalogName")
  public class Product{
    .....
  }

 
Author:
Antony Joseph
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
     
  • Element Details