diff --git a/src/main/java/org/olat/core/commons/persistence/_spring/core_persistence.xml b/src/main/java/org/olat/core/commons/persistence/_spring/core_persistence.xml index 6d241e8c2837d8551316ed0689187b1b0c508513..c63ca562c0c79ffece9635b4d0c3ccb293322d5a 100644 --- a/src/main/java/org/olat/core/commons/persistence/_spring/core_persistence.xml +++ b/src/main/java/org/olat/core/commons/persistence/_spring/core_persistence.xml @@ -104,7 +104,6 @@ <class>org.olat.course.nodes.cl.model.DBCheck</class> <class>org.olat.group.model.ContactView</class> <class>org.olat.group.model.ContactViewExtended</class> - <class>org.olat.group.model.BusinessGroupLazyImpl</class> <class>org.olat.group.model.BusinessGroupMembershipViewImpl</class> <class>org.olat.group.model.BGRepositoryEntryRelation</class> <class>org.olat.repository.RepositoryEntry</class> diff --git a/src/main/java/org/olat/group/BusinessGroupLazy.java b/src/main/java/org/olat/group/BusinessGroupLazy.java deleted file mode 100644 index c1157060914f3123bb1933e5d77f858863329ab4..0000000000000000000000000000000000000000 --- a/src/main/java/org/olat/group/BusinessGroupLazy.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ -package org.olat.group; - -import org.olat.core.id.Persistable; - - -/** - * - * Very short version of business group. - * - * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com - */ -public interface BusinessGroupLazy extends BusinessGroupShort, Persistable { - - public String getDescription(); - -} diff --git a/src/main/java/org/olat/group/BusinessGroupService.java b/src/main/java/org/olat/group/BusinessGroupService.java index 990bdc2f60270eb2861a3ae6b038a7da7d7cb146..6c87806a5ee8f3c48e10acacb895c9ace449886c 100644 --- a/src/main/java/org/olat/group/BusinessGroupService.java +++ b/src/main/java/org/olat/group/BusinessGroupService.java @@ -248,7 +248,7 @@ public interface BusinessGroupService { */ public List<BusinessGroup> findBusinessGroupsAttendedBy(Identity identity); - public List<BusinessGroupLazy> findBusinessGroups(Identity identity, int maxResults, BusinessGroupOrder... order); + public List<BusinessGroup> findBusinessGroups(Identity identity, int maxResults, BusinessGroupOrder... order); /** * Find all business-groups where the identity is on the waiting-list. diff --git a/src/main/java/org/olat/group/manager/BusinessGroupDAO.java b/src/main/java/org/olat/group/manager/BusinessGroupDAO.java index 606832da04c21c9b18980ef75e76384d2271e907..d2b68ec92ced6043ddfea471889ff36d967696e4 100644 --- a/src/main/java/org/olat/group/manager/BusinessGroupDAO.java +++ b/src/main/java/org/olat/group/manager/BusinessGroupDAO.java @@ -44,7 +44,6 @@ import org.olat.core.id.Identity; import org.olat.core.util.StringHelper; import org.olat.group.BusinessGroup; import org.olat.group.BusinessGroupImpl; -import org.olat.group.BusinessGroupLazy; import org.olat.group.BusinessGroupMembership; import org.olat.group.BusinessGroupOrder; import org.olat.group.BusinessGroupShort; @@ -380,26 +379,30 @@ public class BusinessGroupDAO { return res; } - public List<BusinessGroupLazy> findBusinessGroup(Identity identity, int maxResults, BusinessGroupOrder... ordering) { + public List<BusinessGroup> findBusinessGroup(Identity identity, int maxResults, BusinessGroupOrder... ordering) { StringBuilder sb = new StringBuilder(); - sb.append("select gp from lazybusinessgroup gp where gp.memberId=:identityKey)"); - + sb.append("select bgi from ").append(BusinessGroupImpl.class.getName()).append(" as bgi ") + .append(" inner join bgi.baseGroup as baseGroup") + .append(" where exists (select bmember from bgroupmember as bmember") + .append(" where bmember.identity.key=:identKey and bmember.group=baseGroup and bmember.role in ('").append(GroupRoles.coach.name()).append("','").append(GroupRoles.participant.name()).append("')") + .append(" )"); + if(ordering != null && ordering.length > 0 && ordering[0] != null) { sb.append(" order by "); for(BusinessGroupOrder o:ordering) { switch(o) { - case nameAsc: sb.append("gp.name");break; - case nameDesc: sb.append("gp.name desc");break; - case creationDateAsc: sb.append("gp.creationDate");break; - case creationDateDesc: sb.append("gp.creationDate desc");break; + case nameAsc: sb.append("bgi.name");break; + case nameDesc: sb.append("bgi.name desc");break; + case creationDateAsc: sb.append("bgi.creationDate");break; + case creationDateDesc: sb.append("bgi.creationDate desc");break; } } //sb.append(" gp.key "); } - TypedQuery<BusinessGroupLazy> query = dbInstance.getCurrentEntityManager() - .createQuery(sb.toString(), BusinessGroupLazy.class) - .setParameter("identityKey", identity.getKey()); + TypedQuery<BusinessGroup> query = dbInstance.getCurrentEntityManager() + .createQuery(sb.toString(), BusinessGroup.class) + .setParameter("identKey", identity.getKey()); if(maxResults > 0) { query.setMaxResults(maxResults); } diff --git a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java index 0347e4b401ff5a3e9120401b6f003b84ab6515d2..f3e06a0fa9c94c3424b1c808c96b4bdebdef1bf2 100644 --- a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java +++ b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java @@ -70,7 +70,6 @@ import org.olat.core.util.resource.OresHelper; import org.olat.group.BusinessGroup; import org.olat.group.BusinessGroupAddResponse; import org.olat.group.BusinessGroupImpl; -import org.olat.group.BusinessGroupLazy; import org.olat.group.BusinessGroupManagedFlag; import org.olat.group.BusinessGroupMembership; import org.olat.group.BusinessGroupModule; @@ -629,7 +628,7 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD } @Override - public List<BusinessGroupLazy> findBusinessGroups(Identity identity, int maxResults, BusinessGroupOrder... orderBy) { + public List<BusinessGroup> findBusinessGroups(Identity identity, int maxResults, BusinessGroupOrder... orderBy) { return businessGroupDAO.findBusinessGroup(identity, maxResults, orderBy); } diff --git a/src/main/java/org/olat/group/model/BusinessGroupLazyImpl.java b/src/main/java/org/olat/group/model/BusinessGroupLazyImpl.java deleted file mode 100644 index ff0fa8f7bafae08e5e1aea358fbf7365e50596d1..0000000000000000000000000000000000000000 --- a/src/main/java/org/olat/group/model/BusinessGroupLazyImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * <a href="http://www.openolat.org"> - * OpenOLAT - Online Learning and Training</a><br> - * <p> - * Licensed under the Apache License, Version 2.0 (the "License"); <br> - * you may not use this file except in compliance with the License.<br> - * You may obtain a copy of the License at the - * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> - * <p> - * Unless required by applicable law or agreed to in writing,<br> - * software distributed under the License is distributed on an "AS IS" BASIS, <br> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> - * See the License for the specific language governing permissions and <br> - * limitations under the License. - * <p> - * Initial code contributed and copyrighted by<br> - * frentix GmbH, http://www.frentix.com - * <p> - */ -package org.olat.group.model; - -import java.util.Date; - -import javax.persistence.Cacheable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; - -import org.hibernate.annotations.GenericGenerator; -import org.olat.core.id.CreateInfo; -import org.olat.core.id.Persistable; -import org.olat.group.BusinessGroupLazy; -import org.olat.group.BusinessGroupManagedFlag; - -/** - * - * Initial date: 15.07.2013<br> - * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com - * - */ -@Cacheable(false) -@Entity(name="lazybusinessgroup") -@Table(name="o_gp_member_v") -public class BusinessGroupLazyImpl implements BusinessGroupLazy, CreateInfo, Persistable { - - private static final long serialVersionUID = 5125563005863650603L; - - @Id - @GeneratedValue(generator = "system-uuid") - @GenericGenerator(name = "system-uuid", strategy = "hilo") - @Column(name="bg_id", nullable=false, insertable=true, updatable=false) - private Long key; - - @Column(name="member_id", nullable=false, insertable=true, updatable=true) - private Long memberId; - - @Temporal(TemporalType.TIMESTAMP) - @Column(name="bg_creationdate", nullable=false, insertable=true, updatable=false) - private Date creationDate; - - @Column(name="bg_name", nullable=false, insertable=true, updatable=true) - private String name; - - @Column(name="bg_desc", nullable=false, insertable=true, updatable=true) - private String description; - - @Column(name="bg_managed_flags", nullable=false, insertable=true, updatable=true) - private String managedFlagsString; - - @Override - public Long getKey() { - return key; - } - - public Long getMemberId() { - return memberId; - } - - @Override - public Date getCreationDate() { - return creationDate; - } - - @Override - public String getName() { - return name; - } - - @Override - public String getDescription() { - return description; - } - - @Override - public String getResourceableTypeName() { - return "BusinessGroup"; - } - - public String getManagedFlagsString() { - return managedFlagsString; - } - - @Override - public BusinessGroupManagedFlag[] getManagedFlags() { - return BusinessGroupManagedFlag.toEnum(managedFlagsString); - } - - @Override - public Long getResourceableId() { - return key; - } - - @Override - public int hashCode() { - return key == null ? 925867 : key.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if(this == obj) { - return true; - } - if(obj instanceof BusinessGroupLazyImpl) { - BusinessGroupLazyImpl msg = (BusinessGroupLazyImpl)obj; - return key != null && key.equals(msg.key); - } - return false; - } - - @Override - public boolean equalsByPersistableKey(Persistable persistable) { - return equals(persistable); - } -} diff --git a/src/main/java/org/olat/group/ui/portlet/GroupsPortletRunController.java b/src/main/java/org/olat/group/ui/portlet/GroupsPortletRunController.java index 2725d1f603d5303fb7988f2f86aafada2c52b62a..7c43dcbd3e9ff1cb88b282f33f39f911fb9d8a61 100644 --- a/src/main/java/org/olat/group/ui/portlet/GroupsPortletRunController.java +++ b/src/main/java/org/olat/group/ui/portlet/GroupsPortletRunController.java @@ -61,7 +61,6 @@ import org.olat.core.util.event.GenericEventListener; import org.olat.core.util.filter.FilterFactory; import org.olat.core.util.resource.OresHelper; import org.olat.group.BusinessGroup; -import org.olat.group.BusinessGroupLazy; import org.olat.group.BusinessGroupOrder; import org.olat.group.BusinessGroupService; import org.olat.group.model.SearchBusinessGroupParams; @@ -146,9 +145,9 @@ public class GroupsPortletRunController extends AbstractPortletRunController<Bus return convertedList; } - private List<PortletEntry<BusinessGroupEntry>> convertShortBusinessGroupToPortletEntryList(List<BusinessGroupLazy> groups, boolean withDescription) { + private List<PortletEntry<BusinessGroupEntry>> convertShortBusinessGroupToPortletEntryList(List<BusinessGroup> groups, boolean withDescription) { List<PortletEntry<BusinessGroupEntry>> convertedList = new ArrayList<PortletEntry<BusinessGroupEntry>>(); - for(BusinessGroupLazy group:groups) { + for(BusinessGroup group:groups) { GroupPortletEntry entry = new GroupPortletEntry(group); if(withDescription) { entry.getValue().setDescription(group.getDescription()); @@ -158,20 +157,21 @@ public class GroupsPortletRunController extends AbstractPortletRunController<Bus return convertedList; } - protected void reloadModel(SortingCriteria sortingCriteria) { - if (sortingCriteria.getSortingType() == SortingCriteria.AUTO_SORTING) { + @Override + protected void reloadModel(SortingCriteria sortCriteria) { + if (sortCriteria.getSortingType() == SortingCriteria.AUTO_SORTING) { BusinessGroupOrder order = null; - if(sortingCriteria.getSortingTerm()==SortingCriteria.ALPHABETICAL_SORTING) { - order = sortingCriteria.isAscending() ? BusinessGroupOrder.nameAsc : BusinessGroupOrder.nameDesc; - } else if(sortingCriteria.getSortingTerm()==SortingCriteria.DATE_SORTING) { - order = sortingCriteria.isAscending() ? BusinessGroupOrder.creationDateAsc : BusinessGroupOrder.creationDateDesc; + if(sortCriteria.getSortingTerm()==SortingCriteria.ALPHABETICAL_SORTING) { + order = sortCriteria.isAscending() ? BusinessGroupOrder.nameAsc : BusinessGroupOrder.nameDesc; + } else if(sortCriteria.getSortingTerm()==SortingCriteria.DATE_SORTING) { + order = sortCriteria.isAscending() ? BusinessGroupOrder.creationDateAsc : BusinessGroupOrder.creationDateDesc; } - int maxEntries = sortingCriteria.getMaxEntries(); - List<BusinessGroupLazy> groupList = businessGroupService.findBusinessGroups(getIdentity(), maxEntries * 2, order); - Set<BusinessGroupLazy> removeDuplicates = new HashSet<BusinessGroupLazy>(maxEntries); - for(Iterator<BusinessGroupLazy> it=groupList.iterator(); it.hasNext(); ) { - BusinessGroupLazy group = it.next(); + int maxEntries = sortCriteria.getMaxEntries(); + List<BusinessGroup> groupList = businessGroupService.findBusinessGroups(getIdentity(), maxEntries * 2, order); + Set<BusinessGroup> removeDuplicates = new HashSet<BusinessGroup>(maxEntries); + for(Iterator<BusinessGroup> it=groupList.iterator(); it.hasNext(); ) { + BusinessGroup group = it.next(); if(removeDuplicates.contains(group)) { it.remove(); } else { @@ -179,7 +179,7 @@ public class GroupsPortletRunController extends AbstractPortletRunController<Bus } } - List<BusinessGroupLazy> uniqueList = groupList.subList(0, Math.min(maxEntries, groupList.size())); + List<BusinessGroup> uniqueList = groupList.subList(0, Math.min(maxEntries, groupList.size())); List<PortletEntry<BusinessGroupEntry>> entries = convertShortBusinessGroupToPortletEntryList(uniqueList, false); groupListModel.setObjects(entries); tableCtr.modelChanged(); @@ -261,7 +261,7 @@ public class GroupsPortletRunController extends AbstractPortletRunController<Bus */ protected PortletToolSortingControllerImpl<BusinessGroupEntry> createSortingTool(UserRequest ureq, WindowControl wControl) { if(portletToolsController==null) { - List<BusinessGroupLazy> groupList = businessGroupService.findBusinessGroups(getIdentity(), -1); + List<BusinessGroup> groupList = businessGroupService.findBusinessGroups(getIdentity(), -1); List<PortletEntry<BusinessGroupEntry>> portletEntryList = convertShortBusinessGroupToPortletEntryList(groupList, true); GroupsManualSortingTableDataModel tableDataModel = new GroupsManualSortingTableDataModel(portletEntryList); List<PortletEntry<BusinessGroupEntry>> sortedItems = getPersistentManuallySortedItems(); @@ -290,7 +290,7 @@ public class GroupsPortletRunController extends AbstractPortletRunController<Bus List<BusinessGroup> groups = businessGroupService.findBusinessGroups(params, null, 0, -1); portletEntryList = convertBusinessGroupToPortletEntryList(groups, false); } else { - List<BusinessGroupLazy> groups = new ArrayList<BusinessGroupLazy>(); + List<BusinessGroup> groups = new ArrayList<BusinessGroup>(); portletEntryList = convertShortBusinessGroupToPortletEntryList(groups, false); } return getPersistentManuallySortedItems(portletEntryList); @@ -300,19 +300,19 @@ public class GroupsPortletRunController extends AbstractPortletRunController<Bus * Comparator implementation used for sorting BusinessGroup entries according with the * input sortingCriteria. * <p> - * @param sortingCriteria + * @param sortCriteria * @return a Comparator for the input sortingCriteria */ - protected Comparator<BusinessGroupEntry> getComparator(final SortingCriteria sortingCriteria) { + protected Comparator<BusinessGroupEntry> getComparator(final SortingCriteria sortCriteria) { return new Comparator<BusinessGroupEntry>(){ public int compare(final BusinessGroupEntry group1, final BusinessGroupEntry group2) { int comparisonResult = 0; - if(sortingCriteria.getSortingTerm()==SortingCriteria.ALPHABETICAL_SORTING) { + if(sortCriteria.getSortingTerm()==SortingCriteria.ALPHABETICAL_SORTING) { comparisonResult = collator.compare(group1.getName(), group2.getName()); - } else if(sortingCriteria.getSortingTerm()==SortingCriteria.DATE_SORTING) { + } else if(sortCriteria.getSortingTerm()==SortingCriteria.DATE_SORTING) { comparisonResult = group1.getCreationDate().compareTo(group2.getCreationDate()); } - if(!sortingCriteria.isAscending()) { + if(!sortCriteria.isAscending()) { //if not isAscending return (-comparisonResult) return -comparisonResult; } @@ -404,11 +404,6 @@ public class GroupsPortletRunController extends AbstractPortletRunController<Bus key = group.getKey(); } - public GroupPortletEntry(BusinessGroupLazy group) { - value = new BusinessGroupEntry(group); - key = group.getKey(); - } - public Long getKey() { return key; } diff --git a/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql b/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql index b5655ad7ce67bc34d8c80d0bc3d1ddde9b74bda4..86f0942f793d7cdb2f2db4828bd4dffd9a647049 100644 --- a/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql +++ b/src/main/resources/database/mysql/alter_10_0_0_to_10_1_0.sql @@ -1,4 +1,6 @@ drop view o_qp_item_shared_v; drop view o_qp_item_pool_v; drop view o_qp_item_author_v; -drop view o_qp_item_v; \ No newline at end of file +drop view o_qp_item_v; + +drop view o_gp_member_v; \ No newline at end of file diff --git a/src/main/resources/database/mysql/setupDatabase.sql b/src/main/resources/database/mysql/setupDatabase.sql index e89c601650b3fc775cfa4fd9806ebc94fc4f85b3..5a7f4736b5b3d8a8189b2fdc8978075039004f02 100644 --- a/src/main/resources/database/mysql/setupDatabase.sql +++ b/src/main/resources/database/mysql/setupDatabase.sql @@ -1399,18 +1399,6 @@ create view o_bs_gp_membership_v as ( inner join o_gp_business as gp on (gp.fk_group_id=membership.fk_group_id) ); -create or replace view o_gp_member_v as ( - select - gp.group_id as bg_id, - gp.groupname as bg_name, - gp.creationdate as bg_creationdate, - gp.managed_flags as bg_managed_flags, - gp.descr as bg_desc, - membership.fk_identity_id as member_id - from o_gp_business as gp - inner join o_bs_group_member as membership on (membership.fk_group_id = gp.fk_group_id and membership.g_role in ('coach','participant')) -); - create view o_gp_business_v as ( select gp.group_id as group_id, diff --git a/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql b/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql index b5655ad7ce67bc34d8c80d0bc3d1ddde9b74bda4..86f0942f793d7cdb2f2db4828bd4dffd9a647049 100644 --- a/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql +++ b/src/main/resources/database/oracle/alter_10_0_0_to_10_1_0.sql @@ -1,4 +1,6 @@ drop view o_qp_item_shared_v; drop view o_qp_item_pool_v; drop view o_qp_item_author_v; -drop view o_qp_item_v; \ No newline at end of file +drop view o_qp_item_v; + +drop view o_gp_member_v; \ No newline at end of file diff --git a/src/main/resources/database/oracle/setupDatabase.sql b/src/main/resources/database/oracle/setupDatabase.sql index cf8cb7a7d060b234a2532c369479b55fbda1ea7c..fef80cd1c40ed1146eb6a3c601dcc5c5824dde7d 100644 --- a/src/main/resources/database/oracle/setupDatabase.sql +++ b/src/main/resources/database/oracle/setupDatabase.sql @@ -1451,18 +1451,6 @@ create view o_bs_gp_membership_v as ( inner join o_gp_business gp on (gp.fk_group_id=membership.fk_group_id) ); -create view o_gp_member_v as ( - select - gp.group_id as bg_id, - gp.groupname as bg_name, - gp.creationdate as bg_creationdate, - gp.managed_flags as bg_managed_flags, - gp.descr as bg_desc, - membership.fk_identity_id as member_id - from o_gp_business gp - inner join o_bs_group_member membership on (membership.fk_group_id = gp.fk_group_id and membership.g_role in ('coach','participant')) -); - create or replace view o_gp_business_v as ( select gp.group_id as group_id, diff --git a/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql b/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql index b5655ad7ce67bc34d8c80d0bc3d1ddde9b74bda4..86f0942f793d7cdb2f2db4828bd4dffd9a647049 100644 --- a/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql +++ b/src/main/resources/database/postgresql/alter_10_0_0_to_10_1_0.sql @@ -1,4 +1,6 @@ drop view o_qp_item_shared_v; drop view o_qp_item_pool_v; drop view o_qp_item_author_v; -drop view o_qp_item_v; \ No newline at end of file +drop view o_qp_item_v; + +drop view o_gp_member_v; \ No newline at end of file diff --git a/src/main/resources/database/postgresql/setupDatabase.sql b/src/main/resources/database/postgresql/setupDatabase.sql index d458f240be7e98bf5f85a5c7dfe69456a0db9ced..bc6fc216e351cdbae12e97a2a1590d4e006ba7fd 100644 --- a/src/main/resources/database/postgresql/setupDatabase.sql +++ b/src/main/resources/database/postgresql/setupDatabase.sql @@ -1400,18 +1400,6 @@ create view o_bs_gp_membership_v as ( inner join o_gp_business as gp on (gp.fk_group_id=membership.fk_group_id) ); -create view o_gp_member_v as ( - select - gp.group_id as bg_id, - gp.groupname as bg_name, - gp.creationdate as bg_creationdate, - gp.managed_flags as bg_managed_flags, - gp.descr as bg_desc, - membership.fk_identity_id as member_id - from o_gp_business as gp - inner join o_bs_group_member as membership on (membership.fk_group_id = gp.fk_group_id and membership.g_role in ('coach','participant')) -); - create or replace view o_gp_business_v as ( select gp.group_id as group_id, diff --git a/src/test/java/org/olat/group/test/BusinessGroupDAOTest.java b/src/test/java/org/olat/group/test/BusinessGroupDAOTest.java index d11fe89c5c2b642961f0448d83645f8de6e6cd20..3a802363fd2a5c48ca29e2db5cb1009ae58d3e57 100644 --- a/src/test/java/org/olat/group/test/BusinessGroupDAOTest.java +++ b/src/test/java/org/olat/group/test/BusinessGroupDAOTest.java @@ -41,7 +41,6 @@ import org.olat.core.commons.persistence.PersistenceHelper; import org.olat.core.commons.services.mark.MarkManager; import org.olat.core.id.Identity; import org.olat.group.BusinessGroup; -import org.olat.group.BusinessGroupLazy; import org.olat.group.BusinessGroupMembership; import org.olat.group.BusinessGroupOrder; import org.olat.group.BusinessGroupShort; @@ -1099,7 +1098,7 @@ public class BusinessGroupDAOTest extends OlatTestCase { dbInstance.commitAndCloseSession(); //check - List<BusinessGroupLazy> myLazyGroups = businessGroupDao.findBusinessGroup(id, 0); + List<BusinessGroup> myLazyGroups = businessGroupDao.findBusinessGroup(id, 0); Assert.assertNotNull(myLazyGroups); Assert.assertEquals(2, myLazyGroups.size()); List<Long> originalKeys = PersistenceHelper.toKeys(myLazyGroups);