List of usage examples for com.liferay.portal.kernel.util PortalUtil transformSQL
public static String transformSQL(String sql)
From source file:com.liferay.docs.guestbook.service.base.GuestbookLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//w ww.j av a 2 s.c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = guestbookPersistence.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.document.library.content.service.base.DLContentLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//w w w .jav a 2 s. c om * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = dlContentPersistence.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.document.library.file.rank.service.base.DLFileRankLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.// w w w. ja va 2 s . c om * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = dlFileRankPersistence.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.document.library.sync.service.base.DLSyncEventLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w w w . j a va 2 s . c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = dlSyncEventPersistence.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.dynamic.data.lists.service.base.DDLRecordLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.// ww w . j a va 2 s . co m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddlRecordPersistence.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.dynamic.data.lists.service.base.DDLRecordSetLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.// w ww. ja v a 2 s. c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddlRecordSetPersistence.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.dynamic.data.lists.service.base.DDLRecordSetVersionLocalServiceBaseImpl.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 = ddlRecordSetVersionPersistence.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.dynamic.data.lists.service.base.DDLRecordVersionLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from www . j av a2 s .c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddlRecordVersionPersistence.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.dynamic.data.mapping.service.base.DDMContentLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.// ww w .ja v a 2 s . co m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddmContentPersistence.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.dynamic.data.mapping.service.base.DDMDataProviderInstanceLinkLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from ww w . j a v a2 s .co m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddmDataProviderInstanceLinkPersistence.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); } }