Annotation Type Entity


  • @Target(TYPE)
    @Retention(RUNTIME)
    public @interface Entity
    This annotation indicates that this is an entity stored in the database. the entity name must be provided and it must be the same as its name in the database(name) primaryKey must provided whether be it a one column or more(primaryKey), the last configuration is to specify whether the primary key of the table is auto incremented by the database upon insertion this configuration is optional and false by default(isAutoIncrement)
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean isAutoIncrement  
    • Element Detail

      • name

        String name
        Returns:
        entity name represented in the database
      • primaryKey

        String[] primaryKey
        Returns:
        array of the primary keys
      • isAutoIncrement

        boolean isAutoIncrement
        Returns:
        whether is the primary key of the entity is auto incremented by the database
        Default:
        false