Example usage for com.liferay.portal.kernel.util PortalUtil transformSQL

List of usage examples for com.liferay.portal.kernel.util PortalUtil transformSQL

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PortalUtil transformSQL.

Prototype

public static String transformSQL(String sql) 

Source Link

Usage

From source file:com.liferay.layout.page.template.service.base.LayoutPageTemplateCollectionLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//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 = layoutPageTemplateCollectionPersistence.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.liferay.layout.page.template.service.base.LayoutPageTemplateEntryLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query./* w w  w.  j a v a 2  s. com*/
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = layoutPageTemplateEntryPersistence.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.liferay.maven.test.sb.service.base.AssignmentLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query./*  www.  j a  v a 2  s. co m*/
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = assignmentPersistence.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.liferay.maven.test.sb.service.base.SubmissionLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//from  w  w  w  . j  av  a 2 s . com
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = submissionPersistence.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.liferay.meeting.webex.service.base.WebExAccountLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//from ww  w.j  av  a2s  . c om
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = webExAccountPersistence.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.liferay.meeting.webex.service.base.WebExSiteLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//  w  w w  .java  2s.  c o  m
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = webExSitePersistence.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.liferay.message.boards.service.base.MBBanLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//w  w  w.j  a  va2  s.  c  o  m
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = mbBanPersistence.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.liferay.message.boards.service.base.MBDiscussionLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query./*from   w  w w  .ja  va 2s  .  c o  m*/
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = mbDiscussionPersistence.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.liferay.message.boards.service.base.MBMailingListLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//from  w  w  w.j  ava2 s.  c  o  m
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = mbMailingListPersistence.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.liferay.message.boards.service.base.MBStatsUserLocalServiceBaseImpl.java

License:Open Source License

/**
 * Performs a SQL query.//from  w ww.  j av a  2s .  c  o  m
 *
 * @param sql the sql query
 */
protected void runSQL(String sql) {
    try {
        DataSource dataSource = mbStatsUserPersistence.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);
    }
}