Example usage for com.liferay.portal.kernel.dao.db DB buildSQL

List of usage examples for com.liferay.portal.kernel.dao.db DB buildSQL

Introduction

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

Prototype

public String buildSQL(String template) throws IOException;

Source Link

Usage

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

License:Open Source License

/**
 * Performs a SQL query.//  w ww  .  j  a  v a2  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./*  w  ww.j av a 2 s  . 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  a2 s.  co 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.//from   ww w  . j av a 2 s. c om
 *
 * @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 2s. c om*/
 *
 * @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  . ja va2s.c  om*/
 *
 * @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./*from  w  ww . j  ava 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.//from w ww.j  a  v a 2 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./* w ww .j  a v a2 s . 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./*from   w w  w .  jav  a  2 s  .  co  m*/
 *
 * @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);
    }
}