Icodeon SCORM 2004 Player Version 2 API Specification

com.icodeon.services.cmi.dao
Interface ICocdDAO


public interface ICocdDAO

Interface for a data access object (DAO) for the Content Object Communication Data model type (Cocd). The intention is that different implementations of the Cocd data access objects, which will have varying persistence strategies. For example, one implementation of the Cocd data access object might serialize a Cocd type to the file system as XML. A different implementation might persist the field values of the the Cocd type to a relational database. The Content Object Communication Data model type is the root container for all the data model elements defined in the IEEE 1484.11.3 standard "Data Model for Content Object Communication". Although not specified by the current version of SCORM 2004, all the specificed cmi. (dot notation) elements in the SCORM 2004 Run Time Environment can be mapped to element in the IEEE 1484.11.3 standard.

Author:
Icodeon Ltd
See Also:
com.icodeon.services.cmi.dao.xml.PersistenceFactoryImpl, ICocdDAO, com.icodeon.services.cmi.dao.xml.CocdDAO, CocdType, Cocd

Method Summary
 com.icodeon.services.cmi.Cocd createObject()
          Method to create a new instance of a Cocd type.
 boolean deleteObject(java.lang.String primaryKey)
          Method to delete an exisiting persistent record of an instance of a Cocd type that has previously been persited with a synthetic surrogate key (a primary key).
 boolean deleteObject(java.lang.String learnerID, java.lang.String courseID, java.lang.String orgID, java.lang.String scoID, java.lang.String sessionID)
          Method to delete an exisiting persistent record of an instance of a Cocd type.
 void destroy()
          Method to be invoked at the end of a transaction that has used the data access object.
 com.icodeon.services.cmi.RteDataModelType findByName(java.lang.String learnerID, java.lang.String courseID, java.lang.String orgID, java.lang.String scoID, java.lang.String sessionID)
          Method to read an exisiting persistent record of an instance of a Cocd type.
 void init()
          Method to be invoked at the start of a transaction that will use the data access object.
 java.lang.String insertObject(java.lang.String learnerID, java.lang.String courseID, java.lang.String orgID, java.lang.String scoID, java.lang.String sessionID, com.icodeon.services.cmi.Cocd cocd)
          Method to make a new persistent record of an instance of a Cocd type.
 com.icodeon.services.cmi.Cocd readObject(java.lang.String primaryKey)
          Method to read an persistent record of an instance of a Cocd type that has previously been persisted with a synthetic surrogate key.
 boolean updateObject(java.lang.String primaryKey, com.icodeon.services.cmi.Cocd cocd)
          Method to update an persistent record of an instance of a Cocd type that has previously been persisted with a synthetic surrogate key (a primary key).
 

Method Detail

init

void init()
          throws java.lang.Exception
Method to be invoked at the start of a transaction that will use the data access object. May be left unimplemented if there is no initialisation behaviour required.

Throws:
java.lang.Exception

destroy

void destroy()
             throws java.lang.Exception
Method to be invoked at the end of a transaction that has used the data access object. May be left unimplemented if there is no closing behaviour required.

Throws:
java.lang.Exception

createObject

com.icodeon.services.cmi.Cocd createObject()
                                           throws java.lang.Exception
Method to create a new instance of a Cocd type. The type is transient. The call to this method assumes that no persistent record of the instance is created.

Returns:
instance of Cocd
Throws:
java.lang.Exception

insertObject

java.lang.String insertObject(java.lang.String learnerID,
                              java.lang.String courseID,
                              java.lang.String orgID,
                              java.lang.String scoID,
                              java.lang.String sessionID,
                              com.icodeon.services.cmi.Cocd cocd)
                              throws java.lang.Exception
Method to make a new persistent record of an instance of a Cocd type. The first four argument of learnerID, courseID, orgID and scoID together represent the compound natural key of the instance of the Cocd type. The method returns a synthetic surrogate key (a primary key) which can be used in place of the compound natural key on future method calls to the data access object.

Parameters:
learnerID, - corresponds to cmi.learner_id
courseID, - the unique identifier of a content package
orgID, - corresponds the the identifier
scoID, - corresponds to the identifier
sessionID, - optional identifier for session
cocd, - the instance of a Cocd type
Returns:
synthetic surrogate key (the primary key)
Throws:
java.lang.Exception

deleteObject

boolean deleteObject(java.lang.String learnerID,
                     java.lang.String courseID,
                     java.lang.String orgID,
                     java.lang.String scoID,
                     java.lang.String sessionID)
                     throws java.lang.Exception
Method to delete an exisiting persistent record of an instance of a Cocd type. The first four argument of learnerID, courseID, orgID and scoID together represent the compound natural key of the instance of the Cocd type.

Parameters:
learnerID, - corresponds to cmi.learner_id
courseID, - the unique identifier of a content package
orgID, - corresponds the the identifier
scoID, - corresponds to the identifier
sessionID, - optional identifier for session
Returns:
true is the peristent record was deleted
Throws:
java.lang.Exception

readObject

com.icodeon.services.cmi.Cocd readObject(java.lang.String primaryKey)
                                         throws java.lang.Exception
Method to read an persistent record of an instance of a Cocd type that has previously been persisted with a synthetic surrogate key. (a primary key).

Parameters:
primaryKey -
Returns:
the persisted instance of the Cocd type
Throws:
java.lang.Exception

updateObject

boolean updateObject(java.lang.String primaryKey,
                     com.icodeon.services.cmi.Cocd cocd)
                     throws java.lang.Exception
Method to update an persistent record of an instance of a Cocd type that has previously been persisted with a synthetic surrogate key (a primary key).

Parameters:
primaryKey -
cocd -
Returns:
true if updated successfully
Throws:
java.lang.Exception

deleteObject

boolean deleteObject(java.lang.String primaryKey)
                     throws java.lang.Exception
Method to delete an exisiting persistent record of an instance of a Cocd type that has previously been persited with a synthetic surrogate key (a primary key).

Parameters:
primaryKey -
Returns:
true is the peristent record was deleted
Throws:
java.lang.Exception

findByName

com.icodeon.services.cmi.RteDataModelType findByName(java.lang.String learnerID,
                                                     java.lang.String courseID,
                                                     java.lang.String orgID,
                                                     java.lang.String scoID,
                                                     java.lang.String sessionID)
                                                     throws java.lang.Exception
Method to read an exisiting persistent record of an instance of a Cocd type. The first four argument of learnerID, courseID, orgID and scoID together represent the compound natural key of the instance of the Cocd type. The method also wraps the Cocd instance in an instance of the RteDataModeType for return to a SCO. The RteDataModelType fields of learner, course, org, sco, session and pk are set by the values of learnerID, courseID, orgID, scoID, sessionID and primaryKey respectively.

Parameters:
learnerID, - corresponds to cmi.learner_id
courseID, - the unique identifier of a content package
orgID, - corresponds the the identifier
scoID, - corresponds to the identifier
sessionID, - optional identifier for session
Returns:
instance of the RteDataModelType
Throws:
java.lang.Exception

Icodeon SCORM 2004 Player Version 2 API Specification

Copyright (c) 2007 Icodeon Ltd - Registered Company in England and Wales No: 5068195