C# Class OpenSim.Data.SQLite.SQLiteInventoryStore

An Inventory Interface to the SQLite database
Inheritance: OpenSim.Data.SQLite.SQLiteUtil, IInventoryDataPlugin
Show file Open project: N3X15/VoxelSim

Public Methods

Method Description
Dispose ( ) : void

Closes the inventory interface

Initialise ( ) : void
Initialise ( string dbconnect ) : void

Initialises Inventory interface Loads and initialises a new SQLite connection and maintains it. use default URI if connect string string is empty.

Shutdown ( ) : void

TODO : DataSet commit

addInventoryFolder ( OpenSim.Framework.InventoryFolderBase folder ) : void

Adds a new folder specified by folder

addInventoryItem ( OpenSim.Framework.InventoryItemBase item ) : void

Creates a new inventory item based on item

buildItem ( DataRow row ) : OpenSim.Framework.InventoryItemBase

deleteInventoryFolder ( UUID folderID ) : void

Delete a folder

This will clean-up any child folders and child items as well

deleteInventoryItem ( UUID itemID ) : void

Delete an inventory item

fetchActiveGestures ( UUID avatarID ) : List
getFolderHierarchy ( UUID parentID ) : List

See IInventoryDataPlugin

getInventoryFolder ( UUID folder ) : OpenSim.Framework.InventoryFolderBase

Returns a specified inventory folder by its UUID

getInventoryFolders ( UUID parentID ) : List

Returns a list of inventory folders contained in the folder 'parentID'

getInventoryInFolder ( UUID folderID ) : List

Returns a list of inventory items contained within the specified folder

getInventoryItem ( UUID item ) : OpenSim.Framework.InventoryItemBase

Returns an inventory item by its UUID

getUserRootFolder ( UUID user ) : OpenSim.Framework.InventoryFolderBase
getUserRootFolders ( UUID user ) : List

Returns a list of the root folders within a users inventory

moveInventoryFolder ( OpenSim.Framework.InventoryFolderBase folder ) : void

Moves a folder based on its ID with folder

queryInventoryFolder ( UUID folderID ) : OpenSim.Framework.InventoryFolderBase
queryInventoryItem ( UUID itemID ) : OpenSim.Framework.InventoryItemBase
updateInventoryFolder ( OpenSim.Framework.InventoryFolderBase folder ) : void

Updates a folder based on its ID with folder

updateInventoryItem ( OpenSim.Framework.InventoryItemBase item ) : void

Updates an inventory item with item (updates based on ID)

Protected Methods

Method Description
CreateDataSetMapping ( IDataAdapter da, string tableName ) : void
getInventoryFolders ( List &folders, UUID parentID ) : void

Append a list of all the child folders of a parent folder

Private Methods

Method Description
addFolder ( OpenSim.Framework.InventoryFolderBase folder, bool add ) : void

Add inventory folder

nasty

addItem ( OpenSim.Framework.InventoryItemBase item, bool add ) : void

add an item in inventory

buildFolder ( DataRow row ) : OpenSim.Framework.InventoryFolderBase

createInventoryFoldersTable ( ) : DataTable

Creates the "inventoryfolders" table

createInventoryItemsTable ( ) : DataTable

Create the "inventoryitems" table

deleteItemsInFolder ( UUID folderId ) : void

Delete all items in the specified folder

fillFolderRow ( DataRow row, OpenSim.Framework.InventoryFolderBase folder ) : void

fillItemRow ( DataRow row, OpenSim.Framework.InventoryItemBase item ) : void

Fill a database row with item data

moveFolder ( OpenSim.Framework.InventoryFolderBase folder ) : void

Move an inventory folder

moveFolderRow ( DataRow row, OpenSim.Framework.InventoryFolderBase folder ) : void

setupFoldersCommands ( SqliteDataAdapter da, SqliteConnection conn ) : void

setupItemsCommands ( SqliteDataAdapter da, SqliteConnection conn ) : void

Method Details

CreateDataSetMapping() protected method

protected CreateDataSetMapping ( IDataAdapter da, string tableName ) : void
da IDataAdapter
tableName string
return void

Dispose() public method

Closes the inventory interface
public Dispose ( ) : void
return void

Initialise() public method

public Initialise ( ) : void
return void

Initialise() public method

Initialises Inventory interface Loads and initialises a new SQLite connection and maintains it. use default URI if connect string string is empty.
public Initialise ( string dbconnect ) : void
dbconnect string connect string
return void

Shutdown() public method

TODO : DataSet commit
public Shutdown ( ) : void
return void

addInventoryFolder() public method

Adds a new folder specified by folder
public addInventoryFolder ( OpenSim.Framework.InventoryFolderBase folder ) : void
folder OpenSim.Framework.InventoryFolderBase The inventory folder
return void

addInventoryItem() public method

Creates a new inventory item based on item
public addInventoryItem ( OpenSim.Framework.InventoryItemBase item ) : void
item OpenSim.Framework.InventoryItemBase The item to be created
return void

buildItem() public method

public buildItem ( DataRow row ) : OpenSim.Framework.InventoryItemBase
row System.Data.DataRow
return OpenSim.Framework.InventoryItemBase

deleteInventoryFolder() public method

Delete a folder
This will clean-up any child folders and child items as well
public deleteInventoryFolder ( UUID folderID ) : void
folderID UUID the folder UUID
return void

deleteInventoryItem() public method

Delete an inventory item
public deleteInventoryItem ( UUID itemID ) : void
itemID UUID
return void

fetchActiveGestures() public method

public fetchActiveGestures ( UUID avatarID ) : List
avatarID UUID
return List

getFolderHierarchy() public method

See IInventoryDataPlugin
public getFolderHierarchy ( UUID parentID ) : List
parentID UUID
return List

getInventoryFolder() public method

Returns a specified inventory folder by its UUID
public getInventoryFolder ( UUID folder ) : OpenSim.Framework.InventoryFolderBase
folder UUID The UUID of the folder to be returned
return OpenSim.Framework.InventoryFolderBase

getInventoryFolders() public method

Returns a list of inventory folders contained in the folder 'parentID'
public getInventoryFolders ( UUID parentID ) : List
parentID UUID The folder to get subfolders for
return List

getInventoryFolders() protected method

Append a list of all the child folders of a parent folder
protected getInventoryFolders ( List &folders, UUID parentID ) : void
folders List list where folders will be appended
parentID UUID ID of parent
return void

getInventoryInFolder() public method

Returns a list of inventory items contained within the specified folder
public getInventoryInFolder ( UUID folderID ) : List
folderID UUID The UUID of the target folder
return List

getInventoryItem() public method

Returns an inventory item by its UUID
public getInventoryItem ( UUID item ) : OpenSim.Framework.InventoryItemBase
item UUID The UUID of the item to be returned
return OpenSim.Framework.InventoryItemBase

getUserRootFolder() public method

public getUserRootFolder ( UUID user ) : OpenSim.Framework.InventoryFolderBase
user UUID
return OpenSim.Framework.InventoryFolderBase

getUserRootFolders() public method

Returns a list of the root folders within a users inventory
public getUserRootFolders ( UUID user ) : List
user UUID The user whos inventory is to be searched
return List

moveInventoryFolder() public method

Moves a folder based on its ID with folder
public moveInventoryFolder ( OpenSim.Framework.InventoryFolderBase folder ) : void
folder OpenSim.Framework.InventoryFolderBase The inventory folder
return void

queryInventoryFolder() public method

public queryInventoryFolder ( UUID folderID ) : OpenSim.Framework.InventoryFolderBase
folderID UUID
return OpenSim.Framework.InventoryFolderBase

queryInventoryItem() public method

public queryInventoryItem ( UUID itemID ) : OpenSim.Framework.InventoryItemBase
itemID UUID
return OpenSim.Framework.InventoryItemBase

updateInventoryFolder() public method

Updates a folder based on its ID with folder
public updateInventoryFolder ( OpenSim.Framework.InventoryFolderBase folder ) : void
folder OpenSim.Framework.InventoryFolderBase The inventory folder
return void

updateInventoryItem() public method

Updates an inventory item with item (updates based on ID)
public updateInventoryItem ( OpenSim.Framework.InventoryItemBase item ) : void
item OpenSim.Framework.InventoryItemBase The updated item
return void