-
public interface RecordDatabase record.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intgetId()Returns id of the record.default java.lang.StringgetTableName()Returns table name.static java.lang.StringgetTableName(java.lang.Class<? extends Record> table)Returns table name for table class.default voidsetId(int id)Sets id of the 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 throwsUnsupportedOperationExceptionto guarantee correct behavior for immutable records utilizingRecordBuilderannotation. 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 byTable.- Returns:
- table name
- Throws:
java.lang.IllegalStateException- if class is not annotated byTable.
-
-