Class ExtendedRelationsDao
- java.lang.Object
-
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
-
- mil.nga.geopackage.db.GeoPackageDao<ExtendedRelation,Long>
-
- mil.nga.geopackage.extension.related.ExtendedRelationsDao
-
- All Implemented Interfaces:
CloseableIterable<ExtendedRelation>
,Dao<ExtendedRelation,Long>
,Iterable<ExtendedRelation>
public class ExtendedRelationsDao extends GeoPackageDao<ExtendedRelation,Long>
Extended Relations Data Access Object- Since:
- 3.0.1
- Author:
- jyutzler, osbornb
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.j256.ormlite.dao.Dao
Dao.CreateOrUpdateStatus, Dao.DaoObserver
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.db.GeoPackageDao
db
-
Fields inherited from class com.j256.ormlite.dao.BaseDaoImpl
connectionSource, constructor, databaseType, dataClass, lastIterator, objectFactory, statementExecutor, tableConfig, tableInfo
-
-
Constructor Summary
Constructors Constructor Description ExtendedRelationsDao(ConnectionSource connectionSource, Class<ExtendedRelation> dataClass)
Constructor, required by ORMLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtendedRelationsDao
create(GeoPackageCoreConnection db)
Create the DAOstatic ExtendedRelationsDao
create(GeoPackageCore geoPackage)
Create the DAOList<ExtendedRelation>
getBaseTableRelations(String baseTable)
Get the relations to the base tableList<String>
getBaseTables()
Get all the base table namesList<ExtendedRelation>
getRelatedTableRelations(String relatedTable)
Get the relations to the related tableList<String>
getRelatedTables()
Get all the related table namesList<ExtendedRelation>
getRelations(String baseTable, String baseColumn, String relatedTable, String relatedColumn, String relation, String mappingTable)
Get the relations matching the non null provided valuesList<ExtendedRelation>
getTableRelations(String table)
Get the relations to the table, both base table and related table-
Methods inherited from class mil.nga.geopackage.db.GeoPackageDao
createDao, createDao, createDao, dropTable, getDatabase, isTable, isTableExists, isTableOrView, isView, setDatabase, tableExists, tableOrViewExists, verifyExists, viewExists
-
Methods inherited from class com.j256.ormlite.dao.BaseDaoImpl
assignEmptyForeignCollection, callBatchTasks, checkForInitialized, clearAllInternalObjectCaches, clearObjectCache, closeableIterator, closeLastIterator, commit, countOf, countOf, create, create, createIfNotExists, createObjectInstance, createOrUpdate, delete, delete, delete, deleteBuilder, deleteById, deleteIds, endThreadConnection, executeRaw, executeRawNoArgs, extractId, findForeignFieldType, getConnectionSource, getDataClass, getEmptyForeignCollection, getObjectCache, getRawRowMapper, getSelectStarRowMapper, getTableConfig, getTableInfo, getTableName, getWrappedIterable, getWrappedIterable, idExists, initialize, isAutoCommit, isUpdatable, iterator, iterator, iterator, iterator, mapSelectStarRow, notifyChanges, objectsEqual, objectToString, query, queryBuilder, queryForAll, queryForEq, queryForFieldValues, queryForFieldValuesArgs, queryForFirst, queryForFirst, queryForId, queryForMatching, queryForMatchingArgs, queryForSameId, queryRaw, queryRaw, queryRaw, queryRaw, queryRaw, queryRawValue, refresh, registerObserver, rollBack, setAutoCommit, setConnectionSource, setObjectCache, setObjectCache, setObjectFactory, setTableConfig, startThreadConnection, unregisterObserver, update, update, updateBuilder, updateId, updateRaw
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ExtendedRelationsDao
public ExtendedRelationsDao(ConnectionSource connectionSource, Class<ExtendedRelation> dataClass) throws SQLException
Constructor, required by ORMLite- Parameters:
connectionSource
- connection sourcedataClass
- data class- Throws:
SQLException
- upon failure
-
-
Method Detail
-
create
public static ExtendedRelationsDao create(GeoPackageCore geoPackage)
Create the DAO- Parameters:
geoPackage
- GeoPackage- Returns:
- dao
- Since:
- 4.0.0
-
create
public static ExtendedRelationsDao create(GeoPackageCoreConnection db)
Create the DAO- Parameters:
db
- database connection- Returns:
- dao
- Since:
- 4.0.0
-
getBaseTables
public List<String> getBaseTables() throws SQLException
Get all the base table names- Returns:
- base table names
- Throws:
SQLException
- upon failure
-
getRelatedTables
public List<String> getRelatedTables() throws SQLException
Get all the related table names- Returns:
- related table names
- Throws:
SQLException
- upon failure
-
getBaseTableRelations
public List<ExtendedRelation> getBaseTableRelations(String baseTable) throws SQLException
Get the relations to the base table- Parameters:
baseTable
- base table- Returns:
- extended relations
- Throws:
SQLException
- upon failure
-
getRelatedTableRelations
public List<ExtendedRelation> getRelatedTableRelations(String relatedTable) throws SQLException
Get the relations to the related table- Parameters:
relatedTable
- related table- Returns:
- extended relations
- Throws:
SQLException
- upon failure
-
getTableRelations
public List<ExtendedRelation> getTableRelations(String table) throws SQLException
Get the relations to the table, both base table and related table- Parameters:
table
- table name- Returns:
- extended relations
- Throws:
SQLException
- upon failure
-
getRelations
public List<ExtendedRelation> getRelations(String baseTable, String baseColumn, String relatedTable, String relatedColumn, String relation, String mappingTable) throws SQLException
Get the relations matching the non null provided values- Parameters:
baseTable
- base table namebaseColumn
- base primary column namerelatedTable
- related table namerelatedColumn
- related primary column namerelation
- relation namemappingTable
- mapping table name- Returns:
- extended relations
- Throws:
SQLException
- upon failure- Since:
- 3.2.0
-
-