public class OrganizationServiceImpl extends BaseOrganizationService
{
public OrganizationServiceImpl(ListenerService listenerService, DatabaseService dbService) throws Exception
{
ExoDatasource datasource = dbService.getDatasource();
userDAO_ = new UserDAOImpl(this, listenerService, datasource, new UserMapper());
groupDAO_ = new GroupDAOImpl(this, listenerService, datasource, new GroupMapper());
membershipTypeDAO_ = new MembershipTypeDAOImpl(listenerService, datasource, new MembershipTypeMapper());
membershipDAO_ = new MembershipDAOImpl(listenerService, datasource, new MembershipMapper(), this);
userProfileDAO_ = new UserProfileDAOImpl(listenerService, datasource, new UserProfileMapper(), userDAO_);
DBTableManager dbManager = datasource.getDBTableManager();
if (!dbManager.hasTable(UserImpl.class))
dbManager.createTable(UserImpl.class, false);
if (!dbManager.hasTable(GroupImpl.class))
dbManager.createTable(GroupImpl.class, false);