Class AbstractDatabasePojo
java.lang.Object
com.github.tadukoo.database.mysql.pojo.AbstractDatabasePojo
- All Implemented Interfaces:
DatabasePojo
,com.github.tadukoo.util.pojo.MappedPojo
Abstract Database Pojo is a simple implementation of a
DatabasePojo
to use to easily make pojos that
can be stored and retrieved from a Database
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<String,
ColumnDefinition> The Map ofcolumn definitions
for this pojoprivate final List<ForeignKeyConstraint>
The List of anyforeign keys
present for this pojoThe Map of items in this pojoprivate final Map<String,
SubPojoDefinition> The Map ofsubPojo definitions
for this pojo -
Constructor Summary
ModifierConstructorDescriptionprotected
Constructs a newAbstractDatabasePojo
with an empty itemMap and columnDefMap, and callsDatabasePojo.setDefaultColumnDefs()
protected
AbstractDatabasePojo
(com.github.tadukoo.util.pojo.MappedPojo pojo) Constructs a newAbstractDatabasePojo
with the itemMap from the givenMappedPojo
, an empty columnDefMap, and callsDatabasePojo.setDefaultColumnDefs()
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.tadukoo.database.mysql.pojo.DatabasePojo
addColumnDef, addColumnDef, addForeignKey, addSubPojo, createTable, doSearch, doSearch, getColumnDefByKey, getColumnDefKeys, getIDColumnName, getResultSetFunc, getResultSetListFunc, getSubPojoDefBySubPojoKey, getSubPojoKeys, getTableName, retrieveValues, retrieveValues, setDefaultColumnDefs, storeValues
Methods inherited from interface com.github.tadukoo.util.pojo.MappedPojo
clear, getItem, getKeys, getListItem, getListItemNoThrow, getListItemNoThrow, getPojoItem, getPojoItemNoThrow, getPojoItemNoThrow, hasItem, hasKey, isEmpty, removeItem, setItem
-
Field Details
-
itemMap
The Map of items in this pojo -
columnDefMap
The Map ofcolumn definitions
for this pojo -
subPojoDefs
The Map ofsubPojo definitions
for this pojo -
foreignKeys
The List of anyforeign keys
present for this pojo
-
-
Constructor Details
-
AbstractDatabasePojo
protected AbstractDatabasePojo()Constructs a newAbstractDatabasePojo
with an empty itemMap and columnDefMap, and callsDatabasePojo.setDefaultColumnDefs()
-
AbstractDatabasePojo
protected AbstractDatabasePojo(com.github.tadukoo.util.pojo.MappedPojo pojo) Constructs a newAbstractDatabasePojo
with the itemMap from the givenMappedPojo
, an empty columnDefMap, and callsDatabasePojo.setDefaultColumnDefs()
- Parameters:
pojo
- TheMappedPojo
to use for its itemMap
-
-
Method Details
-
getMap
- Specified by:
getMap
in interfacecom.github.tadukoo.util.pojo.MappedPojo
- Returns:
- The full Map of items in the pojo
-
getColumnDefs
- Specified by:
getColumnDefs
in interfaceDatabasePojo
- Returns:
- A Map of all the
column definitions
in this pojo
-
getSubPojoDefs
- Specified by:
getSubPojoDefs
in interfaceDatabasePojo
- Returns:
- A Map of all
subPojo definitions
in this pojo
-
getForeignKeys
- Specified by:
getForeignKeys
in interfaceDatabasePojo
- Returns:
- The List of
foreign keys
for this pojo
-