Revision 7188
Added by ben leinfelder almost 12 years ago
SystemMetadataFactory.java | ||
---|---|---|
628 | 628 |
} |
629 | 629 |
|
630 | 630 |
//insert the systemmetadata object or just update it as needed |
631 |
boolean exists = IdentifierManager.getInstance().systemMetadataExists(sm.getIdentifier().getValue()); |
|
632 |
if (!exists) { |
|
633 |
IdentifierManager.getInstance().insertSystemMetadata(sm); |
|
634 |
logMetacat.info("Generated SystemMetadata for " + localId); |
|
635 |
} else { |
|
636 |
IdentifierManager.getInstance().updateSystemMetadata(sm); |
|
637 |
logMetacat.info("Updated SystemMetadata for " + localId); |
|
638 |
} |
|
631 |
IdentifierManager.getInstance().insertOrUpdateSystemMetadata(sm); |
|
632 |
logMetacat.info("Generated or Updated SystemMetadata for " + localId); |
|
633 |
|
|
639 | 634 |
logMetacat.trace("METRICS:\tGENERATE_SYSTEM_METADATA:\tEND:\tLOCALID:\t" + localId); |
640 | 635 |
|
641 | 636 |
} |
Also available in: Unified diff
share the same dbConnection when inserting and then updating SystemMetadata objects in the backing store.
any errors encountered during the update will rollback the entire transaction and the SM record will not exist, even in part.