3 * The general interface for all other database interfaces
5 * @author Roland Haeder <roland __NOSPAM__ [at] __REMOVE_ME__ mxchange [dot] org>
8 interface FrameworkDatabaseInterface extends FrameworkInterface {
10 * Saves a whole object by serializing it entirely or some specifyable
11 * parts. Specifying parts must be done before this method is called. If
12 * it is not done this method will serialize the whole object.
14 * @param $object An instance to the object we want to save
16 * @see limitObject(ObjectLimits) limitObject
18 function saveObject ($object);
21 * Analyses if a unique ID has already been used or not. This method does
22 * only pass the given ID through to the "real" database layer.
24 * @param $uniqueID A unique ID number which shall be checked
25 * before it will be used
26 * @param $inConstructor If called from a constructor or from
28 * @return $isUnused true = The unique ID was not found in the database,
29 * false = It is already in use by an other object
30 * @throws NullPointerException If $dbInstance is null
31 * @throws NoObjectException If $dbInstance is not an object
32 * @throws MissingMethodException If the required method
33 * isUniqueIdUsed() was not found
35 function isUniqueIdUsed ($uniqueID, $inConstructor = false);
38 * Gets cached data from the database layer and if not found fetch it from
39 * the database again. This method does not return the header stuff because
40 * The underlaying database class will return only the requested content.
42 * @param $idNumber The ID number which we need for looking up
44 * @return $cachedArray The maybe cached data from the database
45 * @throws NullPointerException If $dbInstance is null
46 * @throws NoObjectException If $dbInstance is not an object
47 * @throws MissingMethodException If the required method
48 * isUniqueIdUsed() was not found
50 function getObjectFromCachedData ($idNumber);