Changeset 5647
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/ItemSubtype.java
r5645 r5647 111 111 112 112 /** 113 Utility method for loading a subtype that is related to the subtype of the given item. 114 @param dc A DbControl to use for database access 115 @param item A subtypable item 116 @param relatedItem The main item type of the related subtype we are looking for 117 @param defaultRelatedId An ID of the subtype to return if no related subtype is found 118 119 @return An ItemSubtype or null 120 */ 121 public static ItemSubtype getRelatedSubtype(DbControl dc, Subtypable item, Item relatedItem, int defaultRelatedId) 122 { 123 ItemSubtype related = null; 124 ItemSubtype subtype = item.getItemSubtype(); 125 if (subtype != null) 126 { 127 related = subtype.getRelatedSubtype(relatedItem); 128 } 129 if (related == null && defaultRelatedId > 0) 130 { 131 related = getById(dc, defaultRelatedId); 132 } 133 return related; 134 } 135 136 /** 113 137 Create a new item subtype item. 114 138 -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java
r5646 r5647 1098 1098 if (subtypeQuery == null) 1099 1099 { 1100 subtypeQuery = initReferenceQuery(dc, idMethod, ItemSubtype.getQuery(null) );1100 subtypeQuery = initReferenceQuery(dc, idMethod, ItemSubtype.getQuery(null), false); 1101 1101 subtypeQuery.restrictPermanent( 1102 1102 Restrictions.eq( … … 1107 1107 } 1108 1108 subtypeQuery.setParameter("itemType", mainType.getValue(), Type.INT); 1109 return findReferencedItem(dc, idMethod, subtypeQuery, identifier, true);1109 return findReferencedItem(dc, idMethod, subtypeQuery, identifier, 0, false); 1110 1110 } 1111 1111 … … 1143 1143 if (protocolQuery == null) 1144 1144 { 1145 // where ... (itemSubtype = :subtype AND checkType = 1) || checkType = 0 1146 Expression checkType = Expressions.parameter("checkType"); 1147 protocolQuery = initReferenceQuery(dc, idMethod, Protocol.getQuery()); 1148 protocolQuery.restrictPermanent( 1149 Restrictions.or( 1150 Restrictions.and( 1151 Restrictions.eq(Hql.property("itemSubtype"), Expressions.parameter("subtype")), 1152 Restrictions.eq(checkType, Expressions.integer(1)) 1153 ), 1154 Restrictions.eq(checkType, Expressions.integer(0)) 1155 ) 1156 ); 1157 } 1158 protocolQuery.setParameter("subtype", subtype == null ? 0 : subtype.getId(), Type.INT); 1159 protocolQuery.setParameter("checkType", subtype == null ? 0 : 1, Type.INT); 1160 Protocol protocol = findReferencedItem(dc, idMethod, protocolQuery, identifier, true); 1161 if (protocol == null) 1162 { 1163 protocolQuery.setParameter("checkType", 0, Type.INT); 1164 protocol = findReferencedItem(dc, idMethod, protocolQuery, identifier, false); 1165 } 1166 return protocol; 1145 protocolQuery = initReferenceQuery(dc, idMethod, Protocol.getQuery(), true); 1146 } 1147 return findReferencedItemWithSubtype(dc, idMethod, protocolQuery, identifier, subtype, false); 1167 1148 } 1168 1149 … … 1200 1181 if (tagQuery == null) 1201 1182 { 1202 // where ... (itemSubtype = :subtype AND checkType = 1) || checkType = 0 1203 Expression checkType = Expressions.parameter("checkType"); 1204 tagQuery = initReferenceQuery(dc, idMethod, Tag.getQuery()); 1205 tagQuery.restrictPermanent( 1206 Restrictions.or( 1207 Restrictions.and( 1208 Restrictions.eq(Hql.property("itemSubtype"), Expressions.parameter("subtype")), 1209 Restrictions.eq(checkType, Expressions.integer(1)) 1210 ), 1211 Restrictions.eq(checkType, Expressions.integer(0)) 1212 ) 1213 ); 1214 } 1215 tagQuery.setParameter("subtype", subtype == null ? 0 : subtype.getId(), Type.INT); 1216 tagQuery.setParameter("checkType", subtype == null ? 0 : 1, Type.INT); 1217 Tag tag = findReferencedItem(dc, idMethod, tagQuery, identifier, true); 1218 if (tag == null) 1219 { 1220 tagQuery.setParameter("checkType", 0, Type.INT); 1221 tag = findReferencedItem(dc, idMethod, tagQuery, identifier, false); 1222 } 1223 return tag; 1183 tagQuery = initReferenceQuery(dc, idMethod, Tag.getQuery(), true); 1184 } 1185 return findReferencedItemWithSubtype(dc, idMethod, tagQuery, identifier, subtype, false); 1224 1186 } 1225 1187 … … 1258 1220 if (hardwareQuery == null) 1259 1221 { 1260 // where ... (itemSubtype = :subtype AND checkType = 1) || checkType = 0 1261 Expression checkType = Expressions.parameter("checkType"); 1262 hardwareQuery = initReferenceQuery(dc, idMethod, Hardware.getQuery()); 1263 hardwareQuery.restrictPermanent( 1264 Restrictions.or( 1265 Restrictions.and( 1266 Restrictions.eq(Hql.property("itemSubtype"), Expressions.parameter("subtype")), 1267 Restrictions.eq(checkType, Expressions.integer(1)) 1268 ), 1269 Restrictions.eq(checkType, Expressions.integer(0)) 1270 ) 1271 ); 1272 } 1273 hardwareQuery.setParameter("subtype", subtype == null ? 0 : subtype.getId(), Type.INT); 1274 hardwareQuery.setParameter("checkType", subtype == null ? 0 : 1, Type.INT); 1275 Hardware hardware = findReferencedItem(dc, idMethod, hardwareQuery, identifier, true); 1276 if (hardware == null) 1277 { 1278 hardwareQuery.setParameter("checkType", 0, Type.INT); 1279 hardware = findReferencedItem(dc, idMethod, hardwareQuery, identifier, false); 1280 } 1281 return hardware; 1222 hardwareQuery = initReferenceQuery(dc, idMethod, Hardware.getQuery(), true); 1223 } 1224 return findReferencedItemWithSubtype(dc, idMethod, hardwareQuery, identifier, subtype, false); 1282 1225 } 1283 1226 … … 1315 1258 if (softwareQuery == null) 1316 1259 { 1317 // where ... (itemSubtype = :subtype AND checkType = 1) || checkType = 0 1318 Expression checkType = Expressions.parameter("checkType"); 1319 softwareQuery = initReferenceQuery(dc, idMethod, Software.getQuery()); 1320 softwareQuery.restrictPermanent( 1321 Restrictions.or( 1322 Restrictions.and( 1323 Restrictions.eq(Hql.property("itemSubtype"), Expressions.parameter("subtype")), 1324 Restrictions.eq(checkType, Expressions.integer(1)) 1325 ), 1326 Restrictions.eq(checkType, Expressions.integer(0)) 1327 ) 1328 ); 1329 } 1330 softwareQuery.setParameter("subtype", subtype == null ? 0 : subtype.getId(), Type.INT); 1331 softwareQuery.setParameter("checkType", subtype == null ? 0 : 1, Type.INT); 1332 Software software = findReferencedItem(dc, idMethod, softwareQuery, identifier, true); 1333 if (software == null) 1334 { 1335 softwareQuery.setParameter("checkType", 0, Type.INT); 1336 software = findReferencedItem(dc, idMethod, softwareQuery, identifier, false); 1337 } 1338 return software; 1260 softwareQuery = initReferenceQuery(dc, idMethod, Software.getQuery(), true); 1261 } 1262 return findReferencedItemWithSubtype(dc, idMethod, softwareQuery, identifier, subtype, false); 1339 1263 } 1340 1264 … … 1358 1282 if (platformQuery == null) 1359 1283 { 1360 platformQuery = initReferenceQuery(dc, idMethod, Platform.getQuery() );1361 } 1362 return findReferencedItem(dc, idMethod, platformQuery, identifier, false);1284 platformQuery = initReferenceQuery(dc, idMethod, Platform.getQuery(), false); 1285 } 1286 return findReferencedItem(dc, idMethod, platformQuery, identifier, 0, false); 1363 1287 } 1364 1288 /** … … 1408 1332 if (variantQuery == null) 1409 1333 { 1410 variantQuery = initReferenceQuery(dc, idMethod, PlatformVariant.getQuery() );1334 variantQuery = initReferenceQuery(dc, idMethod, PlatformVariant.getQuery(), false); 1411 1335 // variant.platform = :platform or 1 = :anyplatform 1412 1336 variantQuery.restrict( … … 1419 1343 variantQuery.setParameter("platform", platform == null ? 0 : platform.getId(), Type.INT); 1420 1344 variantQuery.setParameter("anyplatform", platform == null ? 1 : 0, Type.INT); 1421 return findReferencedItem(dc, idMethod, variantQuery, identifier, false);1345 return findReferencedItem(dc, idMethod, variantQuery, identifier, 0, false); 1422 1346 } 1423 1347 … … 1455 1379 if (fileTypeQuery == null) 1456 1380 { 1457 fileTypeQuery = initReferenceQuery(dc, idMethod, DataFileType.getQuery() );1458 } 1459 return findReferencedItem(dc, idMethod, fileTypeQuery, identifier, false);1381 fileTypeQuery = initReferenceQuery(dc, idMethod, DataFileType.getQuery(), false); 1382 } 1383 return findReferencedItem(dc, idMethod, fileTypeQuery, identifier, 0, false); 1460 1384 } 1461 1385 … … 1479 1403 if (permissionTemplateQuery == null) 1480 1404 { 1481 permissionTemplateQuery = initReferenceQuery(dc, idMethod, PermissionTemplate.getQuery() );1482 } 1483 return findReferencedItem(dc, idMethod, permissionTemplateQuery, identifier, false);1405 permissionTemplateQuery = initReferenceQuery(dc, idMethod, PermissionTemplate.getQuery(), false); 1406 } 1407 return findReferencedItem(dc, idMethod, permissionTemplateQuery, identifier, 0, false); 1484 1408 } 1485 1409 1486 1410 1487 1411 private ItemQuery<BioSource> bioSourceQuery; 1412 /** 1413 Same as {@link #findBioSource(DbControl, IdMethod, String, ItemSubtype)} with 1414 a null item subtype. 1415 */ 1416 protected BioSource findBioSource(DbControl dc, IdMethod idMethod, String identifier) 1417 { 1418 return findBioSource(dc, idMethod, identifier, null); 1419 } 1420 1488 1421 /** 1489 1422 Find a biosource with a given identifier. This is a utility method that … … 1494 1427 Subsequent calls uses the same query. Thus, this method should always be 1495 1428 called with the same id method object, otherwise the result is undefined. 1429 <p> 1430 NOTE! If this method is called with a non-null item subtype parameter and 1431 no biosource is found the query will be retried without any subtype. 1496 1432 1497 1433 @param dc The DbControl to use for database access 1498 1434 @param identifier The identifier protocol 1435 @param subtype The biosource subtype, or null if the type doesn't matter 1499 1436 @return A biosource, or null if no item could be found 1500 */ 1501 protected BioSource findBioSource(DbControl dc, IdMethod idMethod, String identifier) 1437 @since 3.0 1438 */ 1439 protected BioSource findBioSource(DbControl dc, IdMethod idMethod, String identifier, ItemSubtype subtype) 1502 1440 { 1503 1441 if (identifier == null) return null; 1504 if (bioSourceQuery == null) bioSourceQuery = initReferenceQuery(dc, idMethod, BioSource.getQuery()); 1505 return findReferencedItem(dc, idMethod, bioSourceQuery, identifier, false); 1506 } 1442 if (bioSourceQuery == null) 1443 { 1444 // where ... (itemSubtype = :subtype AND checkType = 1) || checkType = 0 1445 bioSourceQuery = initReferenceQuery(dc, idMethod, BioSource.getQuery(), true); 1446 } 1447 return findReferencedItemWithSubtype(dc, idMethod, bioSourceQuery, identifier, subtype, false); } 1507 1448 1508 1449 private ItemQuery<Sample> sampleQuery; 1450 /** 1451 Same as {@link #findSample(DbControl, IdMethod, String, ItemSubtype)} 1452 with a null subtype. 1453 */ 1454 protected Sample findSample(DbControl dc, IdMethod idMethod, String identifier) 1455 { 1456 return findSample(dc, idMethod, identifier, null); 1457 } 1458 1509 1459 /** 1510 1460 Find a sample with a given identifier. This is a utility method that … … 1515 1465 Subsequent calls uses the same query. Thus, this method should always be 1516 1466 called with the same id method object, otherwise the result is undefined. 1467 <p> 1468 NOTE! If this method is called with a non-null item subtype parameter and 1469 no sample is found the query will be retried without any subtype. 1517 1470 1518 1471 @param dc The DbControl to use for database access 1519 1472 @param identifier The identifier protocol 1473 @param subtype The biosource subtype, or null if the type doesn't matter 1520 1474 @return A sample, or null if no item could be found 1521 */ 1522 protected Sample findSample(DbControl dc, IdMethod idMethod, String identifier) 1475 @since 3.0 1476 */ 1477 protected Sample findSample(DbControl dc, IdMethod idMethod, String identifier, ItemSubtype subtype) 1523 1478 { 1524 1479 if (identifier == null) return null; 1525 if (sampleQuery == null) sampleQuery = initReferenceQuery(dc, idMethod, Sample.getQuery()); 1526 return findReferencedItem(dc, idMethod, sampleQuery, identifier, false); 1527 } 1528 1480 if (sampleQuery == null) 1481 { 1482 sampleQuery = initReferenceQuery(dc, idMethod, Sample.getQuery(), true); 1483 } 1484 return findReferencedItemWithSubtype(dc, idMethod, sampleQuery, identifier, subtype, false); 1485 } 1486 1529 1487 private ItemQuery<Extract> extractQuery; 1530 1488 /** … … 1546 1504 if (extractQuery == null) 1547 1505 { 1548 extractQuery = initReferenceQuery(dc, idMethod, Extract.getQuery()); 1549 extractQuery.restrictPermanent(Restrictions.eq(Hql.property("itemSubtype"), null)); 1550 1551 } 1552 return findReferencedItem(dc, idMethod, extractQuery, identifier, false); 1506 extractQuery = initReferenceQuery(dc, idMethod, Extract.getQuery(), false); 1507 } 1508 return findReferencedItem(dc, idMethod, extractQuery, identifier, 0, false); 1553 1509 } 1554 1510 … … 1572 1528 if (labeledExtractQuery == null) 1573 1529 { 1574 labeledExtractQuery = initReferenceQuery(dc, idMethod, Extract.getQuery() );1530 labeledExtractQuery = initReferenceQuery(dc, idMethod, Extract.getQuery(), false); 1575 1531 labeledExtractQuery.restrictPermanent( 1576 1532 Restrictions.eq( … … 1580 1536 ); 1581 1537 } 1582 return findReferencedItem(dc, idMethod, labeledExtractQuery, identifier, false);1538 return findReferencedItem(dc, idMethod, labeledExtractQuery, identifier, 0, false); 1583 1539 } 1584 1540 … … 1602 1558 if (bioPlateQuery == null) 1603 1559 { 1604 bioPlateQuery = initReferenceQuery(dc, idMethod, BioPlate.getQuery() );1605 } 1606 return findReferencedItem(dc, idMethod, bioPlateQuery, identifier, false);1560 bioPlateQuery = initReferenceQuery(dc, idMethod, BioPlate.getQuery(), false); 1561 } 1562 return findReferencedItem(dc, idMethod, bioPlateQuery, identifier, 0, false); 1607 1563 } 1608 1564 … … 1653 1609 if (arraySlideQuery == null) 1654 1610 { 1655 arraySlideQuery = initReferenceQuery(dc, idMethod, ArraySlide.getQuery() );1656 } 1657 return findReferencedItem(dc, idMethod, arraySlideQuery, identifier, false);1611 arraySlideQuery = initReferenceQuery(dc, idMethod, ArraySlide.getQuery(), false); 1612 } 1613 return findReferencedItem(dc, idMethod, arraySlideQuery, identifier, 0, false); 1658 1614 } 1659 1615 … … 1677 1633 if (hybQuery == null) 1678 1634 { 1679 hybQuery = initReferenceQuery(dc, idMethod, PhysicalBioAssay.getQuery() );1680 } 1681 return findReferencedItem(dc, idMethod, hybQuery, identifier, false);1635 hybQuery = initReferenceQuery(dc, idMethod, PhysicalBioAssay.getQuery(), false); 1636 } 1637 return findReferencedItem(dc, idMethod, hybQuery, identifier, 0, false); 1682 1638 } 1683 1639 … … 1701 1657 if (scanQuery == null) 1702 1658 { 1703 scanQuery = initReferenceQuery(dc, idMethod, Scan.getQuery() );1704 } 1705 return findReferencedItem(dc, idMethod, scanQuery, identifier, false);1659 scanQuery = initReferenceQuery(dc, idMethod, Scan.getQuery(), false); 1660 } 1661 return findReferencedItem(dc, idMethod, scanQuery, identifier, 0, false); 1706 1662 } 1707 1663 … … 1779 1735 if (designQuery == null) 1780 1736 { 1781 designQuery = initReferenceQuery(dc, idMethod, ArrayDesign.getQuery() );1782 } 1783 return findReferencedItem(dc, idMethod, designQuery, identifier, false);1737 designQuery = initReferenceQuery(dc, idMethod, ArrayDesign.getQuery(), false); 1738 } 1739 return findReferencedItem(dc, idMethod, designQuery, identifier, 0, false); 1784 1740 } 1785 1741 … … 1803 1759 if (batchQuery == null) 1804 1760 { 1805 batchQuery = initReferenceQuery(dc, idMethod, ArrayBatch.getQuery() );1806 } 1807 return findReferencedItem(dc, idMethod, batchQuery, identifier, false);1761 batchQuery = initReferenceQuery(dc, idMethod, ArrayBatch.getQuery(), false); 1762 } 1763 return findReferencedItem(dc, idMethod, batchQuery, identifier, 0, false); 1808 1764 } 1809 1765 … … 1829 1785 if (geometryQuery == null) 1830 1786 { 1831 geometryQuery = initReferenceQuery(dc, idMethod, PlateGeometry.getQuery() );1832 } 1833 return findReferencedItem(dc, idMethod, geometryQuery, identifier, false);1787 geometryQuery = initReferenceQuery(dc, idMethod, PlateGeometry.getQuery(), false); 1788 } 1789 return findReferencedItem(dc, idMethod, geometryQuery, identifier, 0, false); 1834 1790 } 1835 1791 … … 1854 1810 if (bioPlateTypeQuery == null) 1855 1811 { 1856 bioPlateTypeQuery = initReferenceQuery(dc, idMethod, BioPlateType.getQuery() );1857 } 1858 return findReferencedItem(dc, idMethod, bioPlateTypeQuery, identifier, false);1812 bioPlateTypeQuery = initReferenceQuery(dc, idMethod, BioPlateType.getQuery(), false); 1813 } 1814 return findReferencedItem(dc, idMethod, bioPlateTypeQuery, identifier, 0, false); 1859 1815 } 1860 1816 … … 1946 1902 @param idMethod The identification method to use 1947 1903 @param query The query to initialised 1904 @param subtype If TRUE a restriction for subtype is added to the query 1948 1905 @return The initialised query 1949 1906 */ 1950 protected <T extends BasicItem> ItemQuery<T> initReferenceQuery(DbControl dc, IdMethod idMethod, ItemQuery<T> query) 1907 protected <T extends BasicItem> ItemQuery<T> initReferenceQuery(DbControl dc, IdMethod idMethod, 1908 ItemQuery<T> query, boolean subtype) 1951 1909 { 1952 1910 query = idMethod.prepareQuery(dc, query); 1953 1911 query.include(Include.MINE, Include.IN_PROJECT, Include.SHARED, Include.OTHERS); 1912 if (subtype) 1913 { 1914 // where ... (itemSubtype = :subtype AND checkType = 1) || checkType = 0 1915 Expression checkType = Expressions.parameter("checkType"); 1916 query.restrictPermanent( 1917 Restrictions.or( 1918 Restrictions.and( 1919 Restrictions.eq(Hql.property("itemSubtype"), Expressions.parameter("subtype")), 1920 Restrictions.eq(checkType, Expressions.integer(1)) 1921 ), 1922 Restrictions.eq(checkType, Expressions.integer(0)) 1923 ) 1924 ); 1925 } 1954 1926 return query; 1927 } 1928 1929 /** 1930 Find a referenced item with a subtype. This method may 1931 call the {@link #findReferencedItem(DbControl, IdMethod, ItemQuery, String, int, boolean)} 1932 method two times. First, with a query limited to return items of the given subtype, 1933 then a second time without the limit. The query must have been created by 1934 the {@link #initReferenceQuery(DbControl, IdMethod, ItemQuery, boolean)} method with 1935 TRUE for the last parameter. If the subtype parameter is null the first query is 1936 skipped. 1937 */ 1938 protected <T extends BasicItem> T findReferencedItemWithSubtype(DbControl dc, IdMethod idMethod, 1939 ItemQuery<T> query, String identifier, ItemSubtype subtype, boolean ignoreNotFound) 1940 { 1941 T item = null; 1942 if (subtype != null) 1943 { 1944 query.setParameter("subtype", subtype.getId(), Type.INT); 1945 query.setParameter("checkType", 1, Type.INT); 1946 item = findReferencedItem(dc, idMethod, query, identifier, subtype.getId(), true); 1947 } 1948 if (item == null) 1949 { 1950 query.setParameter("subtype", 0, Type.INT); 1951 query.setParameter("checkType", 0, Type.INT); 1952 item = findReferencedItem(dc, idMethod, query, identifier, 0, ignoreNotFound); 1953 } 1954 return item; 1955 1955 } 1956 1956 … … 1974 1974 @SuppressWarnings("unchecked") 1975 1975 protected <T extends BasicItem> T findReferencedItem(DbControl dc, IdMethod idMethod, 1976 ItemQuery<T> query, String identifier, boolean ignoreNotFound)1976 ItemQuery<T> query, String identifier, int subtypeId, boolean ignoreNotFound) 1977 1977 { 1978 1978 T item = null; 1979 1979 Item itemType = query.getItemType(); 1980 String cacheKey = itemType.name() + ":" + identifier ;1980 String cacheKey = itemType.name() + ":" + identifier + ":" + subtypeId; 1981 1981 if (itemCache.containsKey(cacheKey)) 1982 1982 { -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/SampleImporter.java
r5630 r5647 216 216 } 217 217 218 @Override 219 protected Item getItemForSubtypes() 220 { 221 return Item.SAMPLE; 222 } 223 218 224 /** 219 225 Adds column mappings for name, externalId, description, … … 226 232 parameters.add(internalIdColumnMapping); 227 233 parameters.add(nameColumnMapping); 234 parameters.add(subtypeColumnMapping); 228 235 parameters.add(externalIdColumnMapping); 229 236 parameters.add(descriptionColumnMapping); … … 287 294 BioMaterialEvent creationEvent = sample.getCreationEvent(); 288 295 if (createdMapper != null) creationEvent.setEventDate(parseDate(createdMapper.getValue(data))); 296 updateItemSubtype(dc, sample, data); 289 297 if (protocolMapper != null) 290 298 { 291 299 String nameOrId = protocolMapper.getValue(data); 292 ItemSubtype type = ItemSubtype.get ById(dc,300 ItemSubtype type = ItemSubtype.getRelatedSubtype(dc, sample, Item.PROTOCOL, 293 301 SystemItems.getId(sample.isPooled() ? Protocol.POOLING : Protocol.SAMPLING)); 294 302 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); … … 316 324 { 317 325 String nameOrId = parentMapper.getValue(data); 318 BioSource bioSource = findBioSource(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId); 326 ItemSubtype type = ItemSubtype.getRelatedSubtype(dc, sample, Item.BIOSOURCE, 0); 327 BioSource bioSource = findBioSource(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 319 328 if (nameOrId == null || bioSource != null) sample.setBioSource(bioSource); 320 329 } … … 336 345 { 337 346 String nameOrId = parentMapper.getValue(data); 338 Sample parent = findSample(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId); 347 ItemSubtype type = ItemSubtype.getRelatedSubtype(dc, sample, Item.SAMPLE, 0); 348 Sample parent = findSample(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 339 349 if (parent != null) 340 350 {
Note: See TracChangeset
for help on using the changeset viewer.