code: protected Extensions getOrCreate(String extensionName, String tableName,
  			String columnName, String definition, ExtensionScopeType scopeType) {
  
  		Extensions extension = get(extensionName, tableName, columnName);
  
  		if (extension == null) {
  			try {
  				if (!extensionsDao.isTableExists()) {
  					geoPackage.createExtensionsTable();
  				}
  
  				extension = new Extensions();
  				extension.setTableName(tableName);
  				extension.setColumnName(columnName);
  				extension.setExtensionName(extensionName);
  				extension.setDefinition(definition);
  				extension.setScope(scopeType);
  
  				extensionsDao.create(extension);
  			} catch (SQLException e) {
  				throw new GeoPackageException("Failed to create '"
  						+ extensionName + "' extension for GeoPackage: "
  						+ geoPackage.getName() + ", Table Name: " + tableName
  						+ ", Column Name: " + columnName, e);
  			}
  		}
  
  		return extension;
  	}
docs: Get the extension or create as needed
  
  @param extensionName
  extension name
  @param tableName
  table name
  @param columnName
  column name
  @param definition
  extension definition
  @param scopeType
  extension scope type
  @return extension