/**
*/
public void testQueryReferencableResourcesLimitType() {
DB db = DBFactory.getInstance();
OLATResourceManager resm = OLATResourceManager.getInstance();
RepositoryManager rm = RepositoryManager.getInstance();
Manager securityManager = ManagerFactory.getManager();
Identity id1 = JunitTestHelper.createAndPersistIdentityAsAuthor("id1");
Identity id2 = JunitTestHelper.createAndPersistIdentityAsAuthor("id2");
// generate 5000 repo entries
int numbRes = 5000;
long startCreate = System.currentTimeMillis();
for (int i = 1; i < numbRes; i++) {
// create course and persist as OLATResourceImpl
final int ifin = i;
OLATResourceable resourceable = new OLATResourceable() {
public String getResourceableTypeName() { return CourseModule.getCourseTypeName();}
public Long getResourceableId() {return new Long(ifin);}
};
OLATResource r = resm.createOLATResourceInstance(resourceable);
db.saveObject(r);
// now make a repository entry for this course
RepositoryEntry re = rm.createRepositoryEntryInstance("Florian Gnägi", "Lernen mit OLAT " + i, "yo man description bla bla + i");
re.setDisplayname("JunitTest_RepositoryEntry_" + i);