List of usage examples for com.liferay.portal.kernel.util PortalUtil transformSQL
public static String transformSQL(String sql)
From source file:com.liferay.asset.entry.rel.service.base.AssetEntryAssetCategoryRelLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from w w w. j a va 2 s .c om*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = assetEntryAssetCategoryRelPersistence.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.asset.tag.stats.service.base.AssetTagStatsLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*ww w . ja v a 2s . c om*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = assetTagStatsPersistence.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.blade.samples.jdbcservicebuilder.service.base.CountryLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//w w w .j av a 2 s. c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = countryPersistence.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.blade.samples.jndiservicebuilder.service.base.RegionLocalServiceBaseImpl.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 = regionPersistence.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.blade.samples.servicebuilder.adq.service.base.BarLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w w w .j a v a 2s. co m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = barPersistence.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.book.service.base.BookLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w w w. j a v a 2 s . com * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = bookPersistence.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.bookmarks.service.base.BookmarksEntryLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from w ww .j a va 2 s . c o m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = bookmarksEntryPersistence.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.bookmarks.service.base.BookmarksFolderLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from www .ja va 2 s . c o m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = bookmarksFolderPersistence.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.demo.todo.service.base.TodoLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./* w ww .j ava2s . c o m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = todoPersistence.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.docs.guestbook.service.base.GuestbookEntryLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from www.j ava 2 s. c o m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = guestbookEntryPersistence.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); } }