All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mil.nga.geopackage.srs.SpatialReferenceSystemSqlMmDao Maven / Gradle / Ivy

The newest version!
package mil.nga.geopackage.srs;

import java.sql.SQLException;

import com.j256.ormlite.support.ConnectionSource;

import mil.nga.geopackage.GeoPackageCore;
import mil.nga.geopackage.db.GeoPackageCoreConnection;
import mil.nga.geopackage.db.GeoPackageDao;

/**
 * SQL/MM Spatial Reference System Data Access Object
 * 
 * @author osbornb
 */
public class SpatialReferenceSystemSqlMmDao
		extends GeoPackageDao {

	/**
	 * Create the DAO
	 * 
	 * @param geoPackage
	 *            GeoPackage
	 * @return dao
	 * @since 4.0.0
	 */
	public static SpatialReferenceSystemSqlMmDao create(
			GeoPackageCore geoPackage) {
		return create(geoPackage.getDatabase());
	}

	/**
	 * Create the DAO
	 * 
	 * @param db
	 *            database connection
	 * @return dao
	 * @since 4.0.0
	 */
	public static SpatialReferenceSystemSqlMmDao create(
			GeoPackageCoreConnection db) {
		SpatialReferenceSystemSqlMmDao dao = GeoPackageDao.createDao(db,
				SpatialReferenceSystemSqlMm.class);
		dao.verifyExists();
		return dao;
	}

	/**
	 * Constructor, required by ORMLite
	 * 
	 * @param connectionSource
	 *            connection source
	 * @param dataClass
	 *            data class
	 * @throws SQLException
	 *             upon failure
	 */
	public SpatialReferenceSystemSqlMmDao(ConnectionSource connectionSource,
			Class dataClass) throws SQLException {
		super(connectionSource, dataClass);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy