com.vodafone360.people.database.persistenceHelper
Class PersistenceHelper

java.lang.Object
  extended by com.vodafone360.people.database.persistenceHelper.PersistenceHelper

public class PersistenceHelper
extends java.lang.Object

Contains Methods for persisting classes to a DB and for reading values from DB and creating objects out of it

Version:
%I%, %G%

Constructor Summary
PersistenceHelper()
           
 
Method Summary
static void insertObject(java.lang.Object o)
          NOT READY NOW - DO NOT USE.
static void insertObjects(java.util.List<?> list)
          NOT READY NOW - DO NOT USE.
static boolean isPersistable(java.lang.Class<?> c)
          Determines if an class implements the persistable interface.
static void mapCursorToObject(java.lang.Object object, Cursor cursor)
          Populates an Object with values from Database.
static void saveObject(java.lang.Object o)
          NOT READY NOW - DO NOT USE.
static void saveObjects(java.util.List<?> list)
          NOT READY NOW - DO NOT USE.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceHelper

public PersistenceHelper()
Method Detail

isPersistable

public static boolean isPersistable(java.lang.Class<?> c)
Determines if an class implements the persistable interface.

Parameters:
c - Class whih is to be checked
Returns:
true if the given class implements the needed interface, false otherwise

saveObject

public static void saveObject(java.lang.Object o)
NOT READY NOW - DO NOT USE.

Parameters:
o - Object to be saved

insertObject

public static void insertObject(java.lang.Object o)
NOT READY NOW - DO NOT USE.

Parameters:
o - Object to be inserted into the database

saveObjects

public static void saveObjects(java.util.List<?> list)
NOT READY NOW - DO NOT USE.

Parameters:
list - List to be saved in the database

insertObjects

public static void insertObjects(java.util.List<?> list)
NOT READY NOW - DO NOT USE.

Parameters:
list - List to be inserted into database

mapCursorToObject

public static void mapCursorToObject(java.lang.Object object,
                                     Cursor cursor)
                              throws java.lang.Exception
Populates an Object with values from Database. This is very low level because you have to open the cursor(make the select) by yourself and also create the right object to take the values

Parameters:
object - Object from an Class which implements persistable interface
cursor - Cursor to a valid resultset
Throws:
java.lang.Exception - If given object is not persistable


JavaDoc