package info.tregmine.database;

import java.util.Map;
import java.util.List;

import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.inventory.ItemStack;

import info.tregmine.api.TregminePlayer;
import info.tregmine.api.InventoryAccess;

public interface IInventoryDAO
{
    public enum InventoryType
    {
        BLOCK,
        PLAYER,
        PLAYER_ARMOR;
    };

    public enum ChangeType
    {
        ADD,
        REMOVE;
    };

    public int getInventoryId(int playerId,
                              InventoryType type) throws DAOException;

    public int getInventoryId(Location loc) throws DAOException;

    public int insertInventory(TregminePlayer player,
                               Location loc,
                               InventoryType type) throws DAOException;

    public void insertAccessLog(TregminePlayer player,
                                int inventoryId) throws DAOException;

    public void insertChangeLog(TregminePlayer player,
                                int inventoryId,
                                int slot,
                                ItemStack slotContent,
                                ChangeType type) throws DAOException;

    public void insertStacks(int inventoryId,
                             ItemStack[] contents) throws DAOException;

    public ItemStack[] getStacks(int inventoryId,
                                 int size) throws DAOException;

    public List<InventoryAccess> getAccessLog(int inventoryId,
                                              int count) throws DAOException;
}

@@ -37,222 +37,174 @@
 ort 
-java.util.Map;%0Aimport java.util.List;%0A%0Aimport org.bukkit.Location;%0Aimport org.bukkit.Server;%0Aimport org.bukkit.inventory.ItemStack;%0A%0Aimport info.tregmine.api.TregminePlayer;%0Aimport info.tregmine.api.InventoryAccess
+info.tregmine.api.InventoryAccess;%0Aimport info.tregmine.api.TregminePlayer;%0A%0Aimport java.util.List;%0A%0Aimport org.bukkit.Location;%0Aimport org.bukkit.inventory.ItemStack
 ;%0A%0Ap
@@ -1529,10 +1529,724 @@
 eption;%0A
+    %0A    %0A    public void saveInventory(TregminePlayer player,%0A                                int inventoryID,%0A                                String type) throws DAOException;%0A    %0A    public void loadInventory(TregminePlayer player,%0A                                int inventoryID,%0A                                String type) throws DAOException;%0A    %0A    public int fetchInventory(TregminePlayer player,%0A                                String inventoryName,%0A                                String type) throws DAOException;%0A    %0A    public void createInventory(TregminePlayer player,%0A                                String inventoryName,%0A                                String type) throws DAOException;%0A    %0A
 %7D%0A

Update IInventoryDAO.java