PapaganEgitim::PapaganDAO Class Reference

Data Access Objects class for Papagan. More...

List of all members.

Public Member Functions

 PapaganDAO ()

Static Public Member Functions

static OleDbConnection connectToDB ()
static void insertItemToDB (String name, String animationPath)
static int getInitialFromList (char initial)
static string getNameOfAWord (int itemid)
static String getAnimationPathOfAWord (int itemid)
static ArrayList getCategoryNames ()
static ArrayList getCategoryListOfAWord (int id)
static ArrayList getPictureListOfAWord (int id)
static ArrayList getVideoListOfAWord (int id)
static void addPictureToItem (int itemid, string path)
static void addVideoToItem (int itemid, string path)
static ArrayList getWordByCategory (int categoryId)
static WordDTO getWordFromDB (int itemid)
static void deleteVideoFromItem (int itemid, string videoPath)
static void deleteCategoryFromItem (int itemid, int categoryid)
static void deletePictureFromItem (int itemid, string picturePath)
static void addCategoryToItem (int itemid, int categoryid)
static ArrayList getAllWords ()
static void addCategoryToDB (string newc)
static void addAnimationToItem (int id, string path)
static void deleteWord (int id)

Static Private Attributes

static string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+System.Windows.Forms.Application.StartupPath+"\\papagan.mdb;User Id=admin;Password=;"


Detailed Description

Data Access Objects class for Papagan.

The class is a general abstraction of SQL queries which access the Papagan Database. This class provides reusability for SQL queries


Constructor & Destructor Documentation

PapaganEgitim::PapaganDAO::PapaganDAO  )  [inline]
 

Default Constructor.


Member Function Documentation

static void PapaganEgitim::PapaganDAO::addAnimationToItem int  id,
string  path
[inline, static]
 

Method that adds animation to an item.

Parameters:
itemid id of the item
path path of the animation

static void PapaganEgitim::PapaganDAO::addCategoryToDB string  newc  )  [inline, static]
 

Method that adds new category to database.

Parameters:
newc name of the new category

static void PapaganEgitim::PapaganDAO::addCategoryToItem int  itemid,
int  categoryid
[inline, static]
 

Method that adds category to an item.

Parameters:
itemid id of the item
path path of the category

static void PapaganEgitim::PapaganDAO::addPictureToItem int  itemid,
string  path
[inline, static]
 

Method that adds picture to an item.

Parameters:
itemid id of the item
path path of the picture

static void PapaganEgitim::PapaganDAO::addVideoToItem int  itemid,
string  path
[inline, static]
 

Method that adds video to an item.

Parameters:
itemid id of the item
path path of the video

static OleDbConnection PapaganEgitim::PapaganDAO::connectToDB  )  [inline, static]
 

opens the connection to a database

opens connection to the Papagan.mdb

Returns:
an OleDbConnection to Papagan.mdb

static void PapaganEgitim::PapaganDAO::deleteCategoryFromItem int  itemid,
int  categoryid
[inline, static]
 

Method that deletes the category from that item.

Parameters:
itemid item id of the word
categoryid path of the category

static void PapaganEgitim::PapaganDAO::deletePictureFromItem int  itemid,
string  picturePath
[inline, static]
 

Method that deletes the picture from that item.

Parameters:
itemid item id of the word
picturePath path of the picture

static void PapaganEgitim::PapaganDAO::deleteVideoFromItem int  itemid,
string  videoPath
[inline, static]
 

Method that deletes the video from that item.

Parameters:
itemid item id of the word
videoPath path of the video

static void PapaganEgitim::PapaganDAO::deleteWord int  id  )  [inline, static]
 

Method that deletes the item.

Parameters:
id id of the item
path path of the animation

static ArrayList PapaganEgitim::PapaganDAO::getAllWords  )  [inline, static]
 

Method that adds new category to database.

Returns:
Arraylist containing all the words

static String PapaganEgitim::PapaganDAO::getAnimationPathOfAWord int  itemid  )  [inline, static]
 

Retrieves the animation path of a word with the given id.

Parameters:
itemid id of the item
Returns:
animationPath

static ArrayList PapaganEgitim::PapaganDAO::getCategoryListOfAWord int  id  )  [inline, static]
 

Returns the category list regarding to a word in the db.

Parameters:
id the id of the word
Returns:
Arraylist of the word's categories

static ArrayList PapaganEgitim::PapaganDAO::getCategoryNames  )  [inline, static]
 

Method that returns the list of categories.

Returns:
ArrayList containing the categories

static int PapaganEgitim::PapaganDAO::getInitialFromList char  initial  )  [inline, static]
 

This function gives the ID of a word, which starts with the desired initial letter.

Parameters:
initial A character variable equal to the initial letter that will be queried.
Returns:
A random ID from the list of IDs that represent the words starting with the initial letter given.

static string PapaganEgitim::PapaganDAO::getNameOfAWord int  itemid  )  [inline, static]
 

Retrieves the name of the word with the given id.

Parameters:
itemid the id of the word

static ArrayList PapaganEgitim::PapaganDAO::getPictureListOfAWord int  id  )  [inline, static]
 

Returns the picture list regarding to a word in the db.

Parameters:
id the id of the word
Returns:
Arraylist of the word's pictures

static ArrayList PapaganEgitim::PapaganDAO::getVideoListOfAWord int  id  )  [inline, static]
 

Returns the video list regarding to a word in the db.

Parameters:
id the id of the word
Returns:
Arraylist of the word's videos

static ArrayList PapaganEgitim::PapaganDAO::getWordByCategory int  categoryId  )  [inline, static]
 

Method that fetches the words regarding to one category.

Parameters:
categoryId the id of the category
Returns:
ArrayList of the words related to the requestedcategory

static WordDTO PapaganEgitim::PapaganDAO::getWordFromDB int  itemid  )  [inline, static]
 

Method that retrieves the word from db.

Parameters:
itemid id of the item
Returns:
WordDTO of the requessted item

static void PapaganEgitim::PapaganDAO::insertItemToDB String  name,
String  animationPath
[inline, static]
 

Inserts an item to the dictionary with its animation path.

Parameters:
name name of the word
animationPath animation path of the word


Member Data Documentation

string PapaganEgitim::PapaganDAO::connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+System.Windows.Forms.Application.StartupPath+"\\papagan.mdb;User Id=admin;Password=;" [static, private]
 


The documentation for this class was generated from the following file:
Generated on Mon May 29 01:05:01 2006 for PAPAGAN by  doxygen 1.4.6-NO