List of usage examples for com.liferay.portal.kernel.util PortalUtil transformSQL
public static String transformSQL(String sql)
From source file:com.liferay.mobile.device.rules.service.base.MDRRuleLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w ww. jav a 2 s .c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = mdrRulePersistence.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.online.service.base.AppLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from ww w . j a v a 2 s . co m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = appPersistence.getDataSource(); DB db = DBManagerUtil.getDB(); sql = db.buildSQL(sql); sql = PortalUtil.transformSQL(sql); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql, new int[0]); sqlUpdate.update(); } catch (Exception e) { throw new SystemException(e); } }
From source file:com.liferay.osb.scv.user.mapper.service.base.MappingDataSourceLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*w ww .j ava2s. co m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = mappingDataSourcePersistence.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.osb.scv.user.mapper.service.base.UserMappingRuleLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from ww w . j a v a 2 s . c om * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = userMappingRulePersistence.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.pokedex.service.base.PokemonLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from ww w .j a va 2s. c o m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = pokemonPersistence.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.projects.dashboard.business.unit.service.base.BusinessUnitLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from w w w.ja v a2 s . c o m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = businessUnitPersistence.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.projects.dashboard.business.unit.service.base.ProjectBULocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./*from w w w . j av a 2 s. co m*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = projectBUPersistence.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.projects.dashboard.problem.service.base.ProblemLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query.//from ww w. j a va2s . co m * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = problemPersistence.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.recommend.service.base.RecommendEntityLocalServiceBaseImpl.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 = recommendEntityPersistence.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.roster.service.base.ClubLocalServiceBaseImpl.java
License:Open Source License
/** * Performs a SQL query./* w w w . ja v a2 s. c om*/ * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = clubPersistence.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); } }