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
FieldsModifier and TypeFieldDescriptionprivate final Map<String,ColumnDefinition> The Map ofcolumn definitionsfor this pojoprivate final List<ForeignKeyConstraint>The List of anyforeign keyspresent for this pojoThe Map of items in this pojoprivate final Map<String,SubPojoDefinition> The Map ofsubPojo definitionsfor this pojo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a newAbstractDatabasePojowith an empty itemMap and columnDefMap, and callsDatabasePojo.setDefaultColumnDefs()protectedAbstractDatabasePojo(com.github.tadukoo.util.pojo.MappedPojo pojo) Constructs a newAbstractDatabasePojowith 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, waitMethods 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, storeValuesMethods 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 definitionsfor this pojo -
subPojoDefs
The Map ofsubPojo definitionsfor this pojo -
foreignKeys
The List of anyforeign keyspresent for this pojo
-
-
Constructor Details
-
AbstractDatabasePojo
protected AbstractDatabasePojo()Constructs a newAbstractDatabasePojowith an empty itemMap and columnDefMap, and callsDatabasePojo.setDefaultColumnDefs() -
AbstractDatabasePojo
protected AbstractDatabasePojo(com.github.tadukoo.util.pojo.MappedPojo pojo) Constructs a newAbstractDatabasePojowith the itemMap from the givenMappedPojo, an empty columnDefMap, and callsDatabasePojo.setDefaultColumnDefs()- Parameters:
pojo- TheMappedPojoto use for its itemMap
-
-
Method Details
-
getMap
- Specified by:
getMapin interfacecom.github.tadukoo.util.pojo.MappedPojo- Returns:
- The full Map of items in the pojo
-
getColumnDefs
- Specified by:
getColumnDefsin interfaceDatabasePojo- Returns:
- A Map of all the
column definitionsin this pojo
-
getSubPojoDefs
- Specified by:
getSubPojoDefsin interfaceDatabasePojo- Returns:
- A Map of all
subPojo definitionsin this pojo
-
getForeignKeys
- Specified by:
getForeignKeysin interfaceDatabasePojo- Returns:
- The List of
foreign keysfor this pojo
-