DS-3004: Added to group name as a column to the group entity and use to to find groups by name instead of searching in the metdata

This commit is contained in:
Tom Desair
2016-02-24 13:49:11 +01:00
parent a8f6157d22
commit 845c1bae90
4 changed files with 29 additions and 7 deletions

View File

@@ -26,14 +26,13 @@ import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.EPersonService;
import org.dspace.eperson.service.GroupService;
import org.dspace.event.Event;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.sql.SQLException;
import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Service implementation for the Group object.
* This class is responsible for all business logic calls for the Group object and is autowired by spring.
@@ -247,7 +246,7 @@ public class GroupServiceImpl extends DSpaceObjectServiceImpl<Group> implements
return null;
}
return groupDAO.findByMetadataField(context, name, metadataFieldService.findByElement(context, MetadataSchema.DC_SCHEMA, "title", null));
return groupDAO.findByName(context, name);
}
@Override