Interface Record



  • public interface Record
    Database record.
    • Method Detail

      • getId

        int getId​()
        Returns id of the record.
        Returns:
        id id of the record
      • setId

        default void setId​(int id)
        Sets id of the record. Default implementation throws UnsupportedOperationException to guarantee correct behavior for immutable records utilizing RecordBuilder annotation. Mutable records that use setters must override this method.
        Parameters:
        id - id of the record
      • getTableName

        default java.lang.String getTableName​()
        Returns table name. Class must be annotated by Table.
        Returns:
        table name
        Throws:
        java.lang.IllegalStateException - if class is not annotated by Table.
      • getTableName

        static java.lang.String getTableName​(java.lang.Class<? extends Record> table)
        Returns table name for table class. Class must be annotated by Table.
        Parameters:
        table - table class
        Returns:
        table name
        Throws:
        java.lang.IllegalStateException - if class is not annotated by Table.