public void runSQL(Connection con, String sql) throws IOException, SQLException;
@Override public long increment() { DB db = DBManagerUtil.getDB(); return db.increment(); }
@Override public void runSQLTemplateString( String template, boolean evaluate, boolean failOnError) throws IOException, NamingException, SQLException { try (LoggingTimer loggingTimer = new LoggingTimer()) { DB db = DBManagerUtil.getDB(); if (connection == null) { db.runSQLTemplateString(template, evaluate, failOnError); } else { db.runSQLTemplateString( connection, template, evaluate, failOnError); } } }
/** * Performs a SQL query. * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddmFormInstanceRecordVersionPersistence.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); } }
if (getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_DDMTEMPLATE_WHERE); if (!getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_DDMTEMPLATE_NO_INLINE_DISTINCT_WHERE_2); if (getDB().isSupportsInlineDistinct()) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true); if (getDB().isSupportsInlineDistinct()) { query.append(DDMTemplateModelImpl.ORDER_BY_JPQL); if (getDB().isSupportsInlineDistinct()) { q.addEntity(_FILTER_ENTITY_ALIAS, DDMTemplateImpl.class);
@Override protected void doUpgrade() throws Exception { DB db = DBManagerUtil.getDB(); if (db.getDBType() == _dbType) { _upgradeTables(); } }
if (!db.isSupportsScrollableResults()) { if (_log.isWarnEnabled()) { _log.warn("Database does not support scrollable results");
protected boolean isSupportsAlterColumnType() { DB db = DBManagerUtil.getDB(); return db.isSupportsAlterColumnType(); }
protected boolean isSupportsAlterColumnName() { DB db = DBManagerUtil.getDB(); return db.isSupportsAlterColumnName(); }
/** * Performs a SQL query. * * @param sql the sql query */ protected void runSQL(String sql) { try { DataSource dataSource = ddmStructureLayoutPersistence.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); } }
if (getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_JOURNALARTICLE_WHERE); if (!getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_JOURNALARTICLE_NO_INLINE_DISTINCT_WHERE_2); if (getDB().isSupportsInlineDistinct()) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true); if (getDB().isSupportsInlineDistinct()) { query.append(JournalArticleModelImpl.ORDER_BY_JPQL); if (getDB().isSupportsInlineDistinct()) { q.addEntity(_FILTER_ENTITY_ALIAS, JournalArticleImpl.class);
public void setSessionFactory(SessionFactory sessionFactory) { _sessionFactory = sessionFactory; _dialect = _sessionFactory.getDialect(); _db = DBManagerUtil.getDB(_dialect, getDataSource()); DBType dbType = _db.getDBType(); _databaseOrderByMaxColumns = GetterUtil.getInteger( PropsUtil.get( PropsKeys.DATABASE_ORDER_BY_MAX_COLUMNS, new Filter(dbType.getName()))); databaseInMaxParameters = GetterUtil.getInteger( PropsUtil.get( PropsKeys.DATABASE_IN_MAX_PARAMETERS, new Filter(dbType.getName()))); }
if (!db.isSupportsScrollableResults()) { if (_log.isWarnEnabled()) { _log.warn("Database does not support scrollable results");
/** * Performs a SQL query. * * @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); } }
if (getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_JOURNALFEED_WHERE); if (!getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_JOURNALFEED_NO_INLINE_DISTINCT_WHERE_2); if (getDB().isSupportsInlineDistinct()) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true); if (getDB().isSupportsInlineDistinct()) { query.append(JournalFeedModelImpl.ORDER_BY_JPQL); if (getDB().isSupportsInlineDistinct()) { q.addEntity(_FILTER_ENTITY_ALIAS, JournalFeedImpl.class);
public void runSQL(String[] sqls) throws IOException, SQLException;
protected long increment(String name) { DB db = DBManagerUtil.getDB(); return db.increment(name); }