Package org.exoplatform.services.database

Examples of org.exoplatform.services.database.ExoDatasource


      Iterator<?> i = params.getPropertiesParamIterator();
      while (i.hasNext())
      {
         PropertiesParam param = (PropertiesParam)i.next();
         String name = param.getName();
         ExoDatasource ds = new ExoDatasource(createDatasource(param.getProperties()));
         datasources_.put(name, ds);
         if (defaultDS_ == null)
            defaultDS_ = ds;
      }
   }
View Full Code Here


      return defaultDS_.getConnection();
   }

   public Connection getConnection(String dsName) throws Exception
   {
      ExoDatasource ds = datasources_.get(dsName);
      return ds.getConnection();
   }
View Full Code Here

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());

      DBTableManager dbManager = datasource.getDBTableManager();
      if (!dbManager.hasTable(UserImpl.class))
         dbManager.createTable(UserImpl.class, false);

      if (!dbManager.hasTable(GroupImpl.class))
         dbManager.createTable(GroupImpl.class, false);
View Full Code Here

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);
View Full Code Here

public class OrganizationServiceImpl extends BaseOrganizationService
{

   public OrganizationServiceImpl(ListenerService listenerService, DatabaseService dbService) throws Exception
   {
      ExoDatasource datasource = dbService.getDatasource();
      userDAO_ = new UserDAOImpl(listenerService, datasource, new UserMapper());
      groupDAO_ = new GroupDAOImpl(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());

      DBTableManager dbManager = datasource.getDBTableManager();
      // try{
      if (!dbManager.hasTable(UserImpl.class))
         dbManager.createTable(UserImpl.class, false);
      // int k = 3/0;
      // } catch(Exception e) {
View Full Code Here

      Iterator i = params.getPropertiesParamIterator();
      while (i.hasNext())
      {
         PropertiesParam param = (PropertiesParam)i.next();
         String name = param.getName();
         ExoDatasource ds = new ExoDatasource(createDatasource(param.getProperties()));
         datasources_.put(name, ds);
         if (defaultDS_ == null)
            defaultDS_ = ds;
      }
   }
View Full Code Here

      return defaultDS_.getConnection();
   }

   public Connection getConnection(String dsName) throws Exception
   {
      ExoDatasource ds = datasources_.get(dsName);
      return ds.getConnection();
   }
View Full Code Here

      Iterator i = params.getPropertiesParamIterator();
      while (i.hasNext())
      {
         PropertiesParam param = (PropertiesParam)i.next();
         String name = param.getName();
         ExoDatasource ds = new ExoDatasource(createDatasource(param.getProperties()));
         datasources_.put(name, ds);
         if (defaultDS_ == null)
            defaultDS_ = ds;
      }
   }
View Full Code Here

      return defaultDS_.getConnection();
   }

   public Connection getConnection(String dsName) throws Exception
   {
      ExoDatasource ds = datasources_.get(dsName);
      return ds.getConnection();
   }
View Full Code Here

public class OrganizationServiceImpl extends BaseOrganizationService
{

   public OrganizationServiceImpl(ListenerService listenerService, DatabaseService dbService) throws Exception
   {
      ExoDatasource datasource = dbService.getDatasource();
      userDAO_ = new UserDAOImpl(listenerService, datasource, new UserMapper());
      groupDAO_ = new GroupDAOImpl(listenerService, datasource, new GroupMapper());
      membershipTypeDAO_ = new MembershipTypeDAOImpl(listenerService, datasource, new MembershipTypeMapper());

      membershipDAO_ = new MembershipDAOImpl(listenerService, datasource, new MembershipMapper());
      userProfileDAO_ = new UserProfileDAOImpl(listenerService, datasource, new UserProfileMapper());

      DBTableManager dbManager = datasource.getDBTableManager();
      // try{
      if (!dbManager.hasTable(UserImpl.class))
         dbManager.createTable(UserImpl.class, false);
      // int k = 3/0;
      // } catch(Exception e) {
View Full Code Here

TOP

Related Classes of org.exoplatform.services.database.ExoDatasource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.