Coverage Report - org.kuali.student.lum.lu.dao.impl.LuDaoImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
LuDaoImpl
74%
161/215
66%
12/18
1.209
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.lum.lu.dao.impl;
 17  
 
 18  
 import java.util.Date;
 19  
 import java.util.List;
 20  
 
 21  
 import javax.persistence.EntityManager;
 22  
 import javax.persistence.PersistenceContext;
 23  
 import javax.persistence.Query;
 24  
 
 25  
 import org.kuali.student.core.dao.impl.AbstractSearchableCrudDaoImpl;
 26  
 import org.kuali.student.core.versionmanagement.dto.VersionDisplayInfo;
 27  
 import org.kuali.student.lum.lu.dao.LuDao;
 28  
 import org.kuali.student.lum.lu.entity.Clu;
 29  
 import org.kuali.student.lum.lu.entity.CluCluRelation;
 30  
 import org.kuali.student.lum.lu.entity.CluLoRelation;
 31  
 import org.kuali.student.lum.lu.entity.CluPublication;
 32  
 import org.kuali.student.lum.lu.entity.CluResult;
 33  
 import org.kuali.student.lum.lu.entity.CluResultType;
 34  
 import org.kuali.student.lum.lu.entity.CluSet;
 35  
 import org.kuali.student.lum.lu.entity.Lui;
 36  
 import org.kuali.student.lum.lu.entity.LuiLuiRelation;
 37  
 
 38  
 import edu.emory.mathcs.backport.java.util.Collections;
 39  
 
 40  11
 public class LuDaoImpl extends AbstractSearchableCrudDaoImpl implements LuDao {
 41  
 
 42  
         @PersistenceContext(unitName = "Lu")
 43  
         @Override
 44  
         public void setEm(EntityManager em) {
 45  4
                 super.setEm(em);
 46  4
         }
 47  
 
 48  
         @Override
 49  
         public List<Clu> getClusByIdList(List<String> cluIdList) {
 50  2
                 Query query = em.createNamedQuery("Clu.findClusByIdList");
 51  2
                 query.setParameter("idList", cluIdList);
 52  
                 @SuppressWarnings("unchecked")
 53  2
                 List<Clu> resultList = query.getResultList();
 54  2
                 return resultList;
 55  
         }
 56  
 
 57  
         @Override
 58  
         public List<Clu> getClusByLuType(String luTypeKey, String luState) {
 59  6
                 Query query = em.createNamedQuery("Clu.getClusByLuType");
 60  6
                 query.setParameter("luTypeKey", luTypeKey);
 61  6
                 query.setParameter("luState", luState);
 62  
                 @SuppressWarnings("unchecked")
 63  6
                 List<Clu> resultList = query.getResultList();
 64  6
                 return resultList;
 65  
         }
 66  
 
 67  
         @Override
 68  
         public List<CluSet> getCluSetInfoByIdList(List<String> cluSetIdList) {
 69  7
                 Query query = em.createNamedQuery("CluSet.getCluSetInfoByIdList");
 70  7
                 query.setParameter("cluSetIdList", cluSetIdList);
 71  
                 @SuppressWarnings("unchecked")
 72  7
                 List<CluSet> resultList = query.getResultList();
 73  7
                 return resultList;
 74  
         }
 75  
 
 76  
         @Override
 77  
         public List<Lui> getLuisByIdList(List<String> luiIds) {
 78  2
                 Query query = em.createNamedQuery("Lui.getLuisByIdList");
 79  2
                 query.setParameter("luiIdList", luiIds);
 80  
                 @SuppressWarnings("unchecked")
 81  2
                 List<Lui> luis = query.getResultList();
 82  2
                 return luis;
 83  
         }
 84  
 
 85  
         @Override
 86  
         public List<String> getLuiIdsByCluId(String cluId) {
 87  3
                 Query query = em.createNamedQuery("Lui.getLuiIdsByCluId");
 88  3
                 query.setParameter("cluId", cluId);
 89  
                 @SuppressWarnings("unchecked")
 90  3
                 List<String> luiIds = query.getResultList();
 91  3
                 return luiIds;
 92  
         }
 93  
 
 94  
         @Override
 95  
         public List<Lui> getLuisByRelationType(String luiId,
 96  
                         String luLuRelationTypeId) {
 97  2
                 Query query = em
 98  
                                 .createNamedQuery("LuiLuiRelation.getLuisByRelationType");
 99  2
                 query.setParameter("luiId", luiId);
 100  2
                 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
 101  
 
 102  
                 @SuppressWarnings("unchecked")
 103  2
                 List<Lui> luis = query.getResultList();
 104  2
                 return luis;
 105  
         }
 106  
 
 107  
         @Override
 108  
         public List<String> getLuiIdsByRelationType(String relatedLuiId,
 109  
                         String luLuRelationTypeId) {
 110  2
                 Query query = em
 111  
                                 .createNamedQuery("LuiLuiRelation.getLuiIdsByRelationType");
 112  2
                 query.setParameter("luiId", relatedLuiId);
 113  2
                 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
 114  
 
 115  
                 @SuppressWarnings("unchecked")
 116  2
                 List<String> luiIds = query.getResultList();
 117  2
                 return luiIds;
 118  
         }
 119  
 
 120  
         @Override
 121  
         public List<String> getLuiIdsInAtpByCluId(String cluId, String atpKey) {
 122  4
                 Query query = em.createNamedQuery("Lui.getLuiIdsInAtpByCluId");
 123  4
                 query.setParameter("cluId", cluId);
 124  4
                 query.setParameter("atpKey", atpKey);
 125  
                 @SuppressWarnings("unchecked")
 126  4
                 List<String> luiIds = query.getResultList();
 127  4
                 return luiIds;
 128  
         }
 129  
 
 130  
         @Override
 131  
         public Boolean isCluInCluSet(String cluId, String cluSetId) {
 132  4
                 Query query = em.createNamedQuery("CluSet.isCluInCluSet");
 133  4
                 query.setParameter("cluId", cluId);
 134  4
                 query.setParameter("cluSetId", cluSetId);
 135  4
                 Long valid = (Long) query.getSingleResult();
 136  4
                 return valid.intValue() > 0;
 137  
         }
 138  
 
 139  
         @Override
 140  
         public List<LuiLuiRelation> getLuiLuiRelations(String luiId) {
 141  3
                 Query query = em
 142  
                                 .createNamedQuery("LuiLuiRelation.getLuiLuiRelationsByLuiId");
 143  3
                 query.setParameter("luiId", luiId);
 144  
                 @SuppressWarnings("unchecked")
 145  3
                 List<LuiLuiRelation> luiLuiRelations = query.getResultList();
 146  3
                 return luiLuiRelations;
 147  
         }
 148  
 
 149  
         @Override
 150  
         public List<CluCluRelation> getCluCluRelationsByClu(String cluId) {
 151  80
                 Query query = em.createNamedQuery("CluCluRelation.getCluCluRelation");
 152  80
                 query.setParameter("cluId", cluId);
 153  
                 @SuppressWarnings("unchecked")
 154  80
                 List<CluCluRelation> cluCluRelations = query.getResultList();
 155  80
                 return cluCluRelations;
 156  
         }
 157  
 
 158  
         @Override
 159  
         public List<String> getCluIdsByLoId(String loId) {
 160  0
                 Query query = em.createNamedQuery("Clu.getCluIdsByLoId");
 161  0
                 query.setParameter("loId", loId);
 162  
                 @SuppressWarnings("unchecked")
 163  0
                 List<String> cluIds = query.getResultList();
 164  0
                 return cluIds;
 165  
         }
 166  
 
 167  
         @Override
 168  
         public List<String> getRelatedCluIdsByCluId(String cluId,
 169  
                         String luLuRelationTypeId) {
 170  85
                 Query query = em
 171  
                                 .createNamedQuery("CluCluRelation.getRelatedCluIdsByCluId");
 172  85
                 query.setParameter("cluId", cluId);
 173  85
                 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
 174  
                 @SuppressWarnings("unchecked")
 175  85
                 List<String> relatedCluIds = query.getResultList();
 176  85
                 return relatedCluIds;
 177  
         }
 178  
 
 179  
         @Override
 180  
     public List<String> getCluIdsByRelatedCluId(String relatedCluId, String luLuRelationTypeId) {
 181  17
         Query query = em.createNamedQuery("CluCluRelation.getCluIdsByRelatedCluId");
 182  17
         query.setParameter("relatedCluId", relatedCluId);
 183  17
         query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
 184  
         @SuppressWarnings("unchecked")
 185  17
         List<String> relatedCluIds = query.getResultList();
 186  17
         return relatedCluIds;
 187  
     }
 188  
 
 189  
     @Override
 190  
         public List<Clu> getRelatedClusByCluId(String cluId,
 191  
                         String luLuRelationTypeId) {
 192  64
                 Query query = em
 193  
                                 .createNamedQuery("CluCluRelation.getRelatedClusByCluId");
 194  64
                 query.setParameter("cluId", cluId);
 195  64
                 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
 196  
                 @SuppressWarnings("unchecked")
 197  64
                 List<Clu> relatedClus = query.getResultList();
 198  64
                 return relatedClus;
 199  
         }
 200  
 
 201  
         @Override
 202  
         public List<String> getRelatedLuiIdsByLuiId(String luiId,
 203  
                         String luLuRelationTypeId) {
 204  1
                 Query query = em
 205  
                                 .createNamedQuery("LuiLuiRelation.getRelatedLuiIdsByLuiId");
 206  1
                 query.setParameter("luiId", luiId);
 207  1
                 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
 208  
                 @SuppressWarnings("unchecked")
 209  1
                 List<String> relatedLuiIds = query.getResultList();
 210  1
                 return relatedLuiIds;
 211  
         }
 212  
 
 213  
         @Override
 214  
         public List<Lui> getRelatedLuisByLuiId(String luiId,
 215  
                         String luLuRelationTypeId) {
 216  1
                 Query query = em
 217  
                                 .createNamedQuery("LuiLuiRelation.getRelatedLuisByLuiId");
 218  1
                 query.setParameter("luiId", luiId);
 219  1
                 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
 220  
                 @SuppressWarnings("unchecked")
 221  1
                 List<Lui> relatedLuis = query.getResultList();
 222  1
                 return relatedLuis;
 223  
         }
 224  
 
 225  
         @Override
 226  
         public List<Clu> getClusByRelation(String parentCluId,
 227  
                         String luLuRelationTypeKey) {
 228  3
                 Query query = em.createNamedQuery("Clu.getClusByRelation");
 229  3
                 query.setParameter("parentCluId", parentCluId);
 230  3
                 query.setParameter("luLuRelationTypeKey", luLuRelationTypeKey);
 231  
                 @SuppressWarnings("unchecked")
 232  3
                 List<Clu> resultList = query.getResultList();
 233  3
                 return resultList;
 234  
         }
 235  
 
 236  
         @Override
 237  
         public List<CluLoRelation> getCluLoRelationsByClu(String cluId) {
 238  184
                 Query query = em
 239  
                                 .createNamedQuery("CluLoRelation.getCluLoRelationByClu");
 240  184
                 query.setParameter("cluId", cluId);
 241  
                 @SuppressWarnings("unchecked")
 242  184
                 List<CluLoRelation> cluLoRelations = query.getResultList();
 243  184
                 return cluLoRelations;
 244  
         }
 245  
 
 246  
         @Override
 247  
         public List<CluLoRelation> getCluLoRelationsByLo(String loId) {
 248  1
                 Query query = em
 249  
                                 .createNamedQuery("CluLoRelation.getCluLoRelationByLo");
 250  1
                 query.setParameter("loId", loId);
 251  
                 @SuppressWarnings("unchecked")
 252  1
                 List<CluLoRelation> cluLoRelations = query.getResultList();
 253  1
                 return cluLoRelations;
 254  
         }
 255  
 
 256  
         @Override
 257  
         public List<CluLoRelation> getCluLoRelationsByCludIdAndLoId(String cluId,
 258  
                         String loId) {
 259  102
                 Query query = em.createNamedQuery("CluLoRelation.getCluLoRelation");
 260  102
                 query.setParameter("cluId", cluId);
 261  102
                 query.setParameter("loId", loId);
 262  
 
 263  
                 @SuppressWarnings("unchecked")
 264  102
                 List<CluLoRelation> rels = query.getResultList();
 265  102
                 return rels;
 266  
         }
 267  
 
 268  
         @Override
 269  
         public List<String> getAllowedLuLuRelationTypesForLuType(String luTypeId,
 270  
                         String relatedLuTypeId) {
 271  0
                 Query query = em
 272  
                                 .createNamedQuery("AllowedLuLuRelationType.getAllowedTypesByLuTypes");
 273  0
                 query.setParameter("luTypeId", luTypeId);
 274  0
                 query.setParameter("relatedLuTypeId", relatedLuTypeId);
 275  
                 @SuppressWarnings("unchecked")
 276  0
                 List<String> resultList = query.getResultList();
 277  0
                 return resultList;
 278  
         }
 279  
 
 280  
         @Override
 281  
         public List<String> getAllowedCluLoRelationTypesForLuType(String luTypeId) {
 282  0
                 Query query = em
 283  
                                 .createNamedQuery("AllowedCluLoRealtionType.getAllowedTypesByLuType");
 284  0
                 query.setParameter("luTypeId", luTypeId);
 285  
                 @SuppressWarnings("unchecked")
 286  0
                 List<String> resultList = query.getResultList();
 287  0
                 return resultList;
 288  
         }
 289  
 
 290  
         @Override
 291  
         public List<String> getAllowedResultUsageTypesForLuType(String luTypeId) {
 292  0
                 Query query = em
 293  
                                 .createNamedQuery("AllowedResultUsageLuType.getAllowedTypesByLuType");
 294  0
                 query.setParameter("luTypeId", luTypeId);
 295  
                 @SuppressWarnings("unchecked")
 296  0
                 List<String> resultList = query.getResultList();
 297  0
                 return resultList;
 298  
         }
 299  
 
 300  
         @Override
 301  
         public List<String> getAllowedResultComponentTypesForResultUsageType(
 302  
                         String resultUsageType) {
 303  0
                 Query query = em
 304  
                                 .createNamedQuery("AllowedResultComponentUsageType.getAllowedComponentsByUsageType");
 305  0
                 query.setParameter("resultUsageType", resultUsageType);
 306  
                 @SuppressWarnings("unchecked")
 307  0
                 List<String> resultList = query.getResultList();
 308  0
                 return resultList;
 309  
         }
 310  
 
 311  
         @Override
 312  
         public List<CluResultType> getAllowedCluResultTypesForLuType(String luTypeId) {
 313  0
                 Query query = em
 314  
                                 .createNamedQuery("AllowedCluResultLuType.getAllowedTypesByLuType");
 315  0
                 query.setParameter("luTypeId", luTypeId);
 316  
                 @SuppressWarnings("unchecked")
 317  0
                 List<CluResultType> resultList = query.getResultList();
 318  0
                 return resultList;
 319  
         }
 320  
 
 321  
         @Override
 322  
         public List<String> getCluIdsByResultUsageType(String resultUsageTypeKey) {
 323  0
                 Query query = em
 324  
                                 .createNamedQuery("CluResult.getCluIdByResultUsageType");
 325  0
                 query.setParameter("resultUsageType", resultUsageTypeKey);
 326  
                 @SuppressWarnings("unchecked")
 327  0
                 List<String> resultList = query.getResultList();
 328  0
                 return resultList;
 329  
         }
 330  
 
 331  
         @Override
 332  
         public List<String> getCluIdsByResultComponentId(String resultComponentId) {
 333  0
                 Query query = em
 334  
                                 .createNamedQuery("CluResult.getCluIdByResultComponentId");
 335  0
                 query.setParameter("resultComponentId", resultComponentId);
 336  
                 @SuppressWarnings("unchecked")
 337  0
                 List<String> resultList = query.getResultList();
 338  0
                 return resultList;
 339  
         }
 340  
 
 341  
         @Override
 342  
         public List<String> getAllowedLuLuRelationTypesByLuiId(String luiId,
 343  
                         String relatedLuiId) {
 344  0
                 Query query = em
 345  
                                 .createNamedQuery("LuiLuiRelation.getRelationTypeByLuiId");
 346  0
                 query.setParameter("luiId", luiId);
 347  0
                 query.setParameter("relatedLuiId", relatedLuiId);
 348  
                 @SuppressWarnings("unchecked")
 349  0
                 List<String> resultList = query.getResultList();
 350  0
                 return resultList;
 351  
         }
 352  
 
 353  
         @Override
 354  
         public List<String> getAllowedLuLuRelationTypesByCluId(String cluId,
 355  
                         String relatedCluId) {
 356  0
                 Query query = em
 357  
                                 .createNamedQuery("CluCluRelation.getRelationTypeByCluId");
 358  0
                 query.setParameter("cluId", cluId);
 359  0
                 query.setParameter("relatedCluId", relatedCluId);
 360  
                 @SuppressWarnings("unchecked")
 361  0
                 List<String> resultList = query.getResultList();
 362  0
                 return resultList;
 363  
         }
 364  
 
 365  
         @Override
 366  
         public List<CluResult> getCluResultByClu(String cluId) {
 367  124
                 Query query = em
 368  
                                 .createNamedQuery("CluResult.getCluResultByCluId");
 369  124
                 query.setParameter("cluId", cluId);
 370  
                 @SuppressWarnings("unchecked")
 371  124
                 List<CluResult> resultList = query.getResultList();
 372  124
                 return resultList;
 373  
         }
 374  
 
 375  
     @Override
 376  
     public Clu getLatestCluVersion(String cluVersionIndId) {
 377  18
         Query query = em.createNamedQuery("Clu.findLatestClu");
 378  18
         query.setParameter("versionIndId", cluVersionIndId);
 379  18
         Clu clu = (Clu)query.getSingleResult();
 380  18
         return clu;
 381  
     }
 382  
 
 383  
         @Override
 384  
         public Clu getCurrentCluVersion(String cluVersionIndId) {
 385  203
         Query query = em.createNamedQuery("Clu.findCurrentClu");
 386  203
         query.setParameter("versionIndId", cluVersionIndId);
 387  203
         query.setParameter("currentTime", new Date());
 388  203
         Clu clu = (Clu)query.getSingleResult();
 389  203
         return clu;
 390  
         }
 391  
 
 392  
         @Override
 393  
         public VersionDisplayInfo getCurrentCluVersionInfo(String cluVersionIndId, String objectTypeURI) {
 394  36
         Query query = em.createNamedQuery("Clu.findCurrentVersionInfo");
 395  36
         query.setParameter("versionIndId", cluVersionIndId);
 396  36
         query.setParameter("currentTime", new Date());
 397  36
         VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
 398  33
         versionDisplayInfo.setObjectTypeURI(objectTypeURI);
 399  33
         return versionDisplayInfo;
 400  
         }
 401  
 
 402  
         @Override
 403  
         public VersionDisplayInfo getCurrentVersionOnDate(String versionIndId,
 404  
                         String objectTypeURI, Date date) {
 405  3
         Query query = em.createNamedQuery("Clu.findCurrentVersionOnDate");
 406  3
         query.setParameter("versionIndId", versionIndId);
 407  3
         query.setParameter("date", date);
 408  3
         VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
 409  3
         versionDisplayInfo.setObjectTypeURI(objectTypeURI);
 410  3
         return versionDisplayInfo;
 411  
         }
 412  
 
 413  
         @Override
 414  
         public VersionDisplayInfo getFirstVersion(String versionIndId,
 415  
                         String objectTypeURI) {
 416  1
         Query query = em.createNamedQuery("Clu.findFirstVersion");
 417  1
         query.setParameter("versionIndId", versionIndId);
 418  1
         VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
 419  1
         versionDisplayInfo.setObjectTypeURI(objectTypeURI);
 420  1
         return versionDisplayInfo;
 421  
         }
 422  
 
 423  
         @Override
 424  
         public VersionDisplayInfo getLatestVersion(String versionIndId,
 425  
                         String objectTypeURI) {
 426  0
         Query query = em.createNamedQuery("Clu.findLatestVersion");
 427  0
         query.setParameter("versionIndId", versionIndId);
 428  0
         VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
 429  0
         versionDisplayInfo.setObjectTypeURI(objectTypeURI);
 430  0
         return versionDisplayInfo;
 431  
         }
 432  
 
 433  
         @Override
 434  
         public VersionDisplayInfo getVersionBySequenceNumber(String versionIndId,
 435  
                         String objectTypeURI, Long sequenceNumber) {
 436  1
         Query query = em.createNamedQuery("Clu.findVersionBySequence");
 437  1
         query.setParameter("versionIndId", versionIndId);
 438  1
         query.setParameter("sequenceNumber", sequenceNumber);
 439  1
         VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
 440  1
         versionDisplayInfo.setObjectTypeURI(objectTypeURI);
 441  1
         return versionDisplayInfo;
 442  
         }
 443  
 
 444  
         @Override
 445  
         public List<VersionDisplayInfo> getVersions(String versionIndId,
 446  
                         String objectTypeURI) {
 447  2
         Query query = em.createNamedQuery("Clu.findVersions");
 448  2
         query.setParameter("versionIndId", versionIndId);
 449  2
         List<VersionDisplayInfo> versionDisplayInfos = (List<VersionDisplayInfo>)query.getResultList();
 450  2
         if(versionDisplayInfos==null){
 451  0
                 versionDisplayInfos = Collections.emptyList();
 452  
         }
 453  2
         for(VersionDisplayInfo versionDisplayInfo:versionDisplayInfos){
 454  3
                 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
 455  
         }
 456  2
         return versionDisplayInfos;
 457  
         }
 458  
 
 459  
         @Override
 460  
         public List<VersionDisplayInfo> getVersionsInDateRange(String versionIndId,
 461  
                         String objectTypeURI, Date from, Date to) {
 462  8
                 if(from==null&&to==null){
 463  0
                         throw new IllegalArgumentException("from and to dates can not both be null");
 464  
                 }
 465  
                 Query query;
 466  8
                 if(from==null){
 467  0
                         query = em.createNamedQuery("Clu.findVersionsBeforeDate");
 468  0
                 query.setParameter("versionIndId", versionIndId);
 469  0
                 query.setParameter("date", to);                        
 470  8
                 }else if(to==null){
 471  7
                         query = em.createNamedQuery("Clu.findVersionsAfterDate");
 472  7
                 query.setParameter("versionIndId", versionIndId);
 473  7
                 query.setParameter("date", from);
 474  
                 }else{
 475  1
                         query = em.createNamedQuery("Clu.findVersionsInDateRange");
 476  1
                 query.setParameter("versionIndId", versionIndId);
 477  1
                 query.setParameter("from", from);
 478  1
                 query.setParameter("to", to);
 479  
                 }
 480  
                 
 481  8
         List<VersionDisplayInfo> versionDisplayInfos = (List<VersionDisplayInfo>)query.getResultList();
 482  8
         if(versionDisplayInfos==null){
 483  0
                 versionDisplayInfos = Collections.emptyList();
 484  
         }
 485  8
         for(VersionDisplayInfo versionDisplayInfo:versionDisplayInfos){
 486  1
                 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
 487  
         }
 488  8
         return versionDisplayInfos;
 489  
         }
 490  
 
 491  
         @Override
 492  
         public List<CluPublication> getCluPublicationsByType(
 493  
                         String luPublicationTypeKey) {
 494  1
         Query query = em.createNamedQuery("CluPublication.findCluPublicationsByType");
 495  1
         query.setParameter("luPublicationTypeKey", luPublicationTypeKey);
 496  1
         List<CluPublication> cluPublications = query.getResultList();
 497  1
         return cluPublications;
 498  
         }
 499  
 
 500  
         @Override
 501  
         public List<CluPublication> getCluPublicationsByCluId(String cluId) {
 502  185
         Query query = em.createNamedQuery("CluPublication.findPublicationsByCluId");
 503  185
         query.setParameter("cluId", cluId);
 504  185
         List<CluPublication> cluPublications = query.getResultList();
 505  185
         return cluPublications;
 506  
         }
 507  
         
 508  
 }