protected long addLayoutSet( long layoutSetId, long companyId, long groupId, long layoutSetPrototypeId, UserGroupTemplateInfo userGroupTemplateInfo) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(); StringBundler sb = new StringBundler(5); sb.append("insert into LayoutSet (layoutSetId, groupId, "); sb.append("companyId, privateLayout, logo, logoId, themeId, "); sb.append("colorSchemeId, wapThemeId, wapColorSchemeId, css, "); sb.append("pageCount, settings_, layoutSetPrototypeId) values "); sb.append("(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); String sql = sb.toString(); ps = con.prepareStatement(sql); ps.setLong(1, layoutSetId); ps.setLong(2, groupId); ps.setLong(3, companyId); ps.setBoolean(4, userGroupTemplateInfo.isPrivateLayout()); ps.setShort(5, userGroupTemplateInfo.getLogo()); ps.setLong(6, userGroupTemplateInfo.getLogoId()); ps.setString(7, userGroupTemplateInfo.getThemeId()); ps.setString(8, userGroupTemplateInfo.getColorSchemeId()); ps.setString(9, userGroupTemplateInfo.getWapThemeId()); ps.setString(10, userGroupTemplateInfo.getWapColorSchemeId()); ps.setString(11, userGroupTemplateInfo.getCss()); ps.setLong(12, userGroupTemplateInfo.getPageCount()); ps.setString(13, userGroupTemplateInfo.getSettings()); ps.setLong(14, layoutSetPrototypeId); ps.execute(); return layoutSetId; } finally { DataAccess.cleanUp(con, ps, rs); } }