Class DataColumnConstraintsDao
- java.lang.Object
-
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
-
- mil.nga.geopackage.db.GeoPackageDao<DataColumnConstraints,Void>
-
- mil.nga.geopackage.extension.schema.constraints.DataColumnConstraintsDao
-
- All Implemented Interfaces:
CloseableIterable<DataColumnConstraints>
,Dao<DataColumnConstraints,Void>
,Iterable<DataColumnConstraints>
public class DataColumnConstraintsDao extends GeoPackageDao<DataColumnConstraints,Void>
Data Column Constraints Data Access Object- Author:
- 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 DataColumnConstraintsDao(ConnectionSource connectionSource, Class<DataColumnConstraints> dataClass)
Constructor, required by ORMLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DataColumnConstraintsDao
create(GeoPackageCoreConnection db)
Create the DAOstatic DataColumnConstraintsDao
create(GeoPackageCore geoPackage)
Create the DAOint
delete(DataColumnConstraints dataColumnConstraints)
int
deleteCascade(PreparedQuery<DataColumnConstraints> preparedDelete)
Delete the Data Column Constraints matching the prepared query, cascadingint
deleteCascade(Collection<DataColumnConstraints> constraintsCollection)
Delete the collection of Data Column Constraints, cascadingint
deleteCascade(DataColumnConstraints constraints)
Delete the Data Columns Constraints, cascadingList<DataColumnConstraints>
queryByConstraintName(String constraintName)
Query by the constraint nameDataColumnConstraints
queryByUnique(String constraintName, DataColumnConstraintType constraintType, String value)
Query by the unique column valuesint
update(DataColumnConstraints dataColumnConstraints)
-
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, 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, 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
-
DataColumnConstraintsDao
public DataColumnConstraintsDao(ConnectionSource connectionSource, Class<DataColumnConstraints> dataClass) throws SQLException
Constructor, required by ORMLite- Parameters:
connectionSource
- connection sourcedataClass
- data class- Throws:
SQLException
- upon failure
-
-
Method Detail
-
create
public static DataColumnConstraintsDao create(GeoPackageCore geoPackage)
Create the DAO- Parameters:
geoPackage
- GeoPackage- Returns:
- dao
- Since:
- 4.0.0
-
create
public static DataColumnConstraintsDao create(GeoPackageCoreConnection db)
Create the DAO- Parameters:
db
- database connection- Returns:
- dao
- Since:
- 4.0.0
-
deleteCascade
public int deleteCascade(DataColumnConstraints constraints) throws SQLException
Delete the Data Columns Constraints, cascading- Parameters:
constraints
- data column constraints- Returns:
- deleted count
- Throws:
SQLException
- upon failure
-
deleteCascade
public int deleteCascade(Collection<DataColumnConstraints> constraintsCollection) throws SQLException
Delete the collection of Data Column Constraints, cascading- Parameters:
constraintsCollection
- constraints collection- Returns:
- deleted count
- Throws:
SQLException
- upon failure
-
deleteCascade
public int deleteCascade(PreparedQuery<DataColumnConstraints> preparedDelete) throws SQLException
Delete the Data Column Constraints matching the prepared query, cascading- Parameters:
preparedDelete
- prepared delete query- Returns:
- deleted count
- Throws:
SQLException
- upon failure
-
update
public int update(DataColumnConstraints dataColumnConstraints) throws SQLException
Update using the unique columns
- Specified by:
update
in interfaceDao<DataColumnConstraints,Void>
- Overrides:
update
in classBaseDaoImpl<DataColumnConstraints,Void>
- Throws:
SQLException
-
delete
public int delete(DataColumnConstraints dataColumnConstraints) throws SQLException
Delete using the unique columns
- Specified by:
delete
in interfaceDao<DataColumnConstraints,Void>
- Overrides:
delete
in classBaseDaoImpl<DataColumnConstraints,Void>
- Throws:
SQLException
-
queryByConstraintName
public List<DataColumnConstraints> queryByConstraintName(String constraintName) throws SQLException
Query by the constraint name- Parameters:
constraintName
- constraint name- Returns:
- data column constraints
- Throws:
SQLException
- upon failure
-
queryByUnique
public DataColumnConstraints queryByUnique(String constraintName, DataColumnConstraintType constraintType, String value) throws SQLException
Query by the unique column values- Parameters:
constraintName
- constraint nameconstraintType
- constraint typevalue
- value- Returns:
- data column constraints
- Throws:
SQLException
- upon failure
-
-