Class ContentsIdExtension

    • Field Detail

      • EXTENSION_NAME_NO_AUTHOR

        public static final String EXTENSION_NAME_NO_AUTHOR
        Extension name without the author
        See Also:
        Constant Field Values
      • EXTENSION_NAME

        public static final String EXTENSION_NAME
        Extension, with author and name
      • EXTENSION_DEFINITION

        public static final String EXTENSION_DEFINITION
        Extension definition URL
    • Constructor Detail

      • ContentsIdExtension

        public ContentsIdExtension​(GeoPackageCore geoPackage)
        Constructor
        Parameters:
        geoPackage - GeoPackage
    • Method Detail

      • getDao

        public ContentsIdDao getDao()
        Get the contents id DAO
        Returns:
        dao
      • has

        public boolean has()
        Determine if the GeoPackage has the extension
        Returns:
        true if has extension
      • get

        public ContentsId get​(Contents contents)
        Get the contents id object
        Parameters:
        contents - contents
        Returns:
        contents id or null
      • get

        public ContentsId get​(String tableName)
        Get the contents id object
        Parameters:
        tableName - table name
        Returns:
        contents id or null
      • getId

        public Long getId​(Contents contents)
        Get the contents id
        Parameters:
        contents - contents
        Returns:
        contents id or null
      • getId

        public Long getId​(String tableName)
        Get the contents id
        Parameters:
        tableName - table name
        Returns:
        contents id or null
      • create

        public ContentsId create​(Contents contents)
        Create a contents id
        Parameters:
        contents - contents
        Returns:
        new contents id
      • create

        public ContentsId create​(String tableName)
        Create a contents id
        Parameters:
        tableName - table name
        Returns:
        new contents id
      • createId

        public long createId​(Contents contents)
        Create a contents id
        Parameters:
        contents - contents
        Returns:
        new contents id
      • createId

        public long createId​(String tableName)
        Create a contents id
        Parameters:
        tableName - table name
        Returns:
        new contents id
      • getOrCreate

        public ContentsId getOrCreate​(Contents contents)
        Get or create a contents id
        Parameters:
        contents - contents
        Returns:
        new or existing contents id
      • getOrCreate

        public ContentsId getOrCreate​(String tableName)
        Get or create a contents id
        Parameters:
        tableName - table name
        Returns:
        new or existing contents id
      • getOrCreateId

        public long getOrCreateId​(Contents contents)
        Get or create a contents id
        Parameters:
        contents - contents
        Returns:
        new or existing contents id
      • getOrCreateId

        public long getOrCreateId​(String tableName)
        Get or create a contents id
        Parameters:
        tableName - table name
        Returns:
        new or existing contents id
      • delete

        public boolean delete​(Contents contents)
        Delete the contents id for the contents
        Parameters:
        contents - contents
        Returns:
        true if deleted
      • delete

        public boolean delete​(String tableName)
        Delete the contents id for the table
        Parameters:
        tableName - table name
        Returns:
        true if deleted
      • createIds

        public int createIds()
        Create contents ids for contents currently without
        Returns:
        newly created contents ids count
      • createIds

        public int createIds​(ContentsDataType type)
        Create contents ids for contents of the data type and currently without
        Parameters:
        type - contents data type
        Returns:
        newly created contents ids count
      • createIds

        public int createIds​(String type)
        Create contents ids for contents of the data type and currently without
        Parameters:
        type - contents data type
        Returns:
        newly created contents ids count
      • deleteIds

        public int deleteIds()
        Delete all contents ids
        Returns:
        deleted contents ids count
      • deleteIds

        public int deleteIds​(ContentsDataType type)
        Delete contents ids for contents of the data type
        Parameters:
        type - contents data type
        Returns:
        deleted contents ids count
      • deleteIds

        public int deleteIds​(String type)
        Delete contents ids for contents of the data type
        Parameters:
        type - contents data type
        Returns:
        deleted contents ids count
      • getIds

        public List<ContentsId> getIds()
        Get all contents ids
        Returns:
        contents ids
      • count

        public long count()
        Get the count of contents ids
        Returns:
        count
      • getIds

        public List<ContentsId> getIds​(ContentsDataType type)
        Get by contents data type
        Parameters:
        type - contents data type
        Returns:
        contents ids
      • getIds

        public List<ContentsId> getIds​(String type)
        Get by contents data type
        Parameters:
        type - contents data type
        Returns:
        contents ids
      • getMissing

        public List<String> getMissing()
        Get contents without contents ids
        Returns:
        table names without contents ids
      • getMissing

        public List<String> getMissing​(ContentsDataType type)
        Get contents by data type without contents ids
        Parameters:
        type - contents data type
        Returns:
        table names without contents ids
      • getMissing

        public List<String> getMissing​(String type)
        Get contents by data type without contents ids
        Parameters:
        type - contents data type
        Returns:
        table names without contents ids
      • getOrCreateExtension

        public Extensions getOrCreateExtension()
        Get or create if needed the extension
        Returns:
        extensions object
      • getExtension

        public Extensions getExtension()
        Get the extension
        Returns:
        extensions object or null if one does not exist
      • removeExtension

        public void removeExtension()
        Remove all trace of the extension
      • getContentsIdDao

        public ContentsIdDao getContentsIdDao()
        Get a Contents Id DAO
        Returns:
        contents id dao
        Since:
        4.0.0
      • getContentsIdDao

        public static ContentsIdDao getContentsIdDao​(GeoPackageCore geoPackage)
        Get a Contents Id DAO
        Parameters:
        geoPackage - GeoPackage
        Returns:
        contents id dao
        Since:
        4.0.0
      • getContentsIdDao

        public static ContentsIdDao getContentsIdDao​(GeoPackageCoreConnection db)
        Get a Contents Id DAO
        Parameters:
        db - database connection
        Returns:
        contents id dao
        Since:
        4.0.0
      • createContentsIdTable

        public boolean createContentsIdTable()
        Create the Contents Id Table if it does not exist
        Returns:
        true if created
        Since:
        4.0.0