final PhysicalTypeMetadata governorPhysicalTypeMetadata,
final String itdFilename) {
// We need to parse the annotation, which we expect to be present
final IntegrationTestAnnotationValues annotationValues = new IntegrationTestAnnotationValues(
governorPhysicalTypeMetadata);
final JavaType entity = annotationValues.getEntity();
if (!annotationValues.isAnnotationFound() || entity == null) {
return null;
}
final JavaType dataOnDemandType = getDataOnDemandType(entity);
final String dataOnDemandMetadataKey = DataOnDemandMetadata
.createIdentifier(dataOnDemandType,
typeLocationService.getTypePath(dataOnDemandType));
final DataOnDemandMetadata dataOnDemandMetadata = (DataOnDemandMetadata) metadataService
.get(dataOnDemandMetadataKey);
// We need to be informed if our dependent metadata changes
metadataDependencyRegistry.registerDependency(dataOnDemandMetadataKey,
metadataIdentificationString);
if (dataOnDemandMetadata == null || !dataOnDemandMetadata.isValid()) {
return null;
}
final JavaType identifierType = persistenceMemberLocator
.getIdentifierType(entity);
if (identifierType == null) {
return null;
}