Changeset 1309
- Timestamp:
- 05/16/11 10:07:17 (13 years ago)
- Location:
- ComponentRegistry/trunk/ComponentRegistry/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/impl/database/AbstractDescriptionDao.java
r1306 r1309 94 94 95 95 /** 96 * Get by ComponentId / ProfileId 97 * @param id Full component id 98 * @return The description, if it exists; null otherwise 99 */ 100 protected T getByCmdId(String id) { 101 return getFirstOrNull(getSelectStatement("where " + getCMDIdColumn() + " = :id"), id); 102 } 103 104 /** 96 105 * 97 106 * @return All descriptions in the public space -
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/impl/database/ComponentRegistryDbImpl.java
r1308 r1309 57 57 return profileDescriptionDao.getPublicProfileDescriptions(); 58 58 } else { 59 return null;59 return profileDescriptionDao.getUserspaceDescriptions(getUserId()); 60 60 } 61 61 } … … 63 63 @Override 64 64 public ProfileDescription getProfileDescription(String id) { 65 throw new UnsupportedOperationException("Not supported yet.");65 return profileDescriptionDao.getByCmdId(id); 66 66 } 67 67 … … 77 77 @Override 78 78 public ComponentDescription getComponentDescription(String id) { 79 throw new UnsupportedOperationException("Not supported yet.");79 return componentDescriptionDao.getByCmdId(id); 80 80 } 81 81 -
ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/impl/database/ComponentRegistryDbImplTest.java
r1308 r1309 65 65 assertNull(register.getMDProfile(desc.getId())); 66 66 67 ComponentDescription componentDescription = register.getComponentDescription(description.getId()); 68 assertNotNull(componentDescription); 69 67 70 assertEquals("Header id should be set from description id", description. 68 71 getId(), component.getHeader().getID());
Note: See TracChangeset
for help on using the changeset viewer.