List of usage examples for com.liferay.portal.kernel.util PortalUtil transformSQL
public static String transformSQL(String sql)
From source file:com.liferay.dynamic.data.mapping.service.base.DDMTemplateLinkLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.// ww w . j av a 2 s . com * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddmTemplateLinkPersistence.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.DDMTemplateLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w ww .ja v a 2s . co m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddmTemplatePersistence.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.DDMTemplateVersionLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w w w . ja va2 s . c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddmTemplateVersionPersistence.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.example.servicebuilder.extdb.service.base.UserLoginLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w w w .j a v a2 s . c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = userLoginPersistence.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.gs.hack.service.base.ClientLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*ww w . j a va 2s. c om*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = clientPersistence.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.gs.hack.service.base.ProjectLocalServiceBaseImpl.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 = projectPersistence.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.gs.hack.service.base.ProjectTaskLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*w w w . j a v a2 s. c o m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = projectTaskPersistence.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.gs.hack.service.base.ProjectUserLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w ww . j a v a 2s . c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = projectUserPersistence.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.gs.hack.service.base.TimesheetApprovalLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from w ww.ja va 2 s . c om*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = timesheetApprovalPersistence.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.gs.hack.service.base.TimesheetLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from ww w.j a va 2 s . c om * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = timesheetPersistence.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); } }