Example usage for com.liferay.portal.kernel.dao.db DBManagerUtil getDB

List of usage examples for com.liferay.portal.kernel.dao.db DBManagerUtil getDB

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.dao.db DBManagerUtil getDB.

Prototype

public static DB getDB() 

Source Link

Usage

From source file:at.graz.meduni.bibbox.liferay.portlet.service.base.ApplicationInstanceContainerLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query./*from w  ww.jav  a  2  s.c o  m*/
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = applicationInstanceContainerPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:at.graz.meduni.bibbox.liferay.portlet.service.base.ApplicationInstanceLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//from  w  w w  .j ava2s  .  c  om
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = applicationInstancePersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:at.graz.meduni.bibbox.liferay.portlet.service.base.ApplicationInstancePortLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//from w w w  .j  a v  a  2  s  . c o  m
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = applicationInstancePortPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:at.graz.meduni.bibbox.liferay.portlet.service.base.ApplicationInstanceStatusLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//  ww  w .j a v  a 2s.com
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = applicationInstanceStatusPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:blade.servicebuilder.service.base.FooLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query./*from w  w  w . j  a  va  2  s  .co m*/
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = fooPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:ca.efendi.datafeeds.service.base.CJProductLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//  w  w w  .  j  av  a2  s .  c  o  m
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = cjProductPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:ca.efendi.datafeeds.service.base.FtpSubscriptionLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query./*  w ww . jav a  2 s .c  o  m*/
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = ftpSubscriptionPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:com.bemis.portal.carriers.service.base.CarrierLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.// w ww  .j av  a2 s  . c o m
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = carrierPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:com.bemis.portal.customer.service.base.CustomerLocationLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query./*from w  w w  . jav  a  2s . c o m*/
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = customerLocationPersistence.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}

From source file:com.bemis.portal.customer.service.base.CustomerProfileLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.// w ww  .j a  v a 2s .  c  om
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = InfrastructureUtil.getDataSource();

        DB db = DBManagerUtil.getDB();

        sql = db.buildSQL(sql);
        sql = PortalUtil.transformSQL(sql);

        SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql);

        sqlUpdate.update();
    } catch (Exception e) {
        throw new SystemException(e);
    }
}