ePerion Gallery  1.2
ePerion gallery application for the europeean ePerion project. This is an android application which manage a smart gallery where you can modify picture colors, sort the pictures and visualize any picture on Google Map.
 All Classes Namespaces Functions
com.android.ePerion.gallery.database.PicturesDBAdapter Class Reference

Public Member Functions

 PicturesDBAdapter (Context context)
 
void open ()
 
void close ()
 
SQLiteDatabase getDatabase ()
 
void dropPictureTable ()
 
Picture getPicture (int id)
 
ArrayList< PicturegetAllPicturesOrderByDate ()
 
ArrayList< PicturegetAllPicturesOrderByLocation ()
 
ArrayList< PicturegetAllPicturesOrderByName ()
 
ArrayList< PicturegetAllPictures ()
 
void insertPicture (Picture pic)
 
void updatePicture (int id, Picture pictureToUpdate)
 
void removePicture (int id)
 
void removePicture (String name)
 

Detailed Description

Database adapter which allows retrieve, update or insert picture attributes from the database.

Author
Julien Salvi

Constructor & Destructor Documentation

com.android.ePerion.gallery.database.PicturesDBAdapter.PicturesDBAdapter ( Context  context)

Construct the database adapter in the current context.

Parameters
contextActivity context.

Member Function Documentation

void com.android.ePerion.gallery.database.PicturesDBAdapter.close ( )

Close the database.

void com.android.ePerion.gallery.database.PicturesDBAdapter.dropPictureTable ( )

Delete all rows which belong to the picture table.

ArrayList<Picture> com.android.ePerion.gallery.database.PicturesDBAdapter.getAllPictures ( )

Get all the pictures from the database.

Returns
An ArrayList of all pictures that belong to the database.
ArrayList<Picture> com.android.ePerion.gallery.database.PicturesDBAdapter.getAllPicturesOrderByDate ( )

Get all the pictures order by the date.

Returns
An ArrayList of all pictures that belong to the database.
ArrayList<Picture> com.android.ePerion.gallery.database.PicturesDBAdapter.getAllPicturesOrderByLocation ( )

Get all the pictures order by the location where the pictures were taken.

Returns
An ArrayList of all pictures that belong to the database.
ArrayList<Picture> com.android.ePerion.gallery.database.PicturesDBAdapter.getAllPicturesOrderByName ( )

Get all the pictures order by their name.

Returns
An ArrayList of all pictures that belong to the database.
SQLiteDatabase com.android.ePerion.gallery.database.PicturesDBAdapter.getDatabase ( )

Get the current database.

Returns
A SQLite database.
Picture com.android.ePerion.gallery.database.PicturesDBAdapter.getPicture ( int  id)

Return a picture based on its ID.

Parameters
idPicture ID.
Returns
A picture.
void com.android.ePerion.gallery.database.PicturesDBAdapter.insertPicture ( Picture  pic)

Insert a new picture in the picture database.

Parameters
picthe pic
void com.android.ePerion.gallery.database.PicturesDBAdapter.open ( )

Open the database.

void com.android.ePerion.gallery.database.PicturesDBAdapter.removePicture ( int  id)

Remove the selected picture with its ID.

Parameters
idPicture ID.
void com.android.ePerion.gallery.database.PicturesDBAdapter.removePicture ( String  name)

Remove the selected picture from its Uri.

Parameters
namethe name
void com.android.ePerion.gallery.database.PicturesDBAdapter.updatePicture ( int  id,
Picture  pictureToUpdate 
)

Update a row thanks to its ID and the new picture attributes.

Parameters
idRow ID.
pictureToUpdatePicture object with the new attributes.

The documentation for this class was generated from the following file: