Stopped the authoring using the DTOs as a way of converting the data coming from Flash.Using the DTOs caused the WDDX null values (e.g. -1111111) to be written to the database.
Fixed up the comment for method getActivitiesByLibraryID: in a normal case, each library shouldnt have more than on template activity.Also added the method getTemplateActivityByLibraryID