public class NamedDbModel
extends DbModel
Abstract class that models a database model with an ID and name
Modifier and Type | Class and Description |
---|---|
static class |
NamedDbModel.Companion
Static helper methods
|
Modifier and Type | Field and Description |
---|---|
static NamedDbModel.Companion |
Companion
Static helper methods
|
Constructor and Description |
---|
NamedDbModel(Table table,
int id,
java.lang.String name)
Abstract class that models a database model with an ID and name
|
Modifier and Type | Method and Description |
---|---|
static NamedDbModel |
createHelper(DbHandler dbHandler,
Table table,
java.lang.String name,
java.sql.PreparedStatement stmt)
Helper method that combines share aspects of a database row creation for named models.
If the model already exists in the database, the existing one will be returned
|
java.lang.String |
getName()
:
|
java.lang.String |
toString()
Creates a semicolon-separated String representation of the Model
|
public static NamedDbModel.Companion Companion
Static helper methods
public NamedDbModel(Table table, int id, java.lang.String name)
Abstract class that models a database model with an ID and name
table
- : The table in which the model is storedid
- : The ID of the model in the tablename
- : The unique name of the model in the database tabletable
- : The table in which the model is storedid
- : The ID of the model in the tablename
- : The unique name of the model in the database tablepublic java.lang.String toString()
Creates a semicolon-separated String representation of the Model
public java.lang.String getName()
:
The unique name of the model in the database table
public static NamedDbModel createHelper(DbHandler dbHandler, Table table, java.lang.String name, java.sql.PreparedStatement stmt)
Helper method that combines share aspects of a database row creation for named models. If the model already exists in the database, the existing one will be returned
dbHandler
- : The database handler to usetable
- : The database table typename
- : The name of the named database modelstmt
- : A prepared statement that is executed to insert a new object into the database