Skip to content

Commit

Permalink
#152 Records with the same package as a data pipeline cannot be used …
Browse files Browse the repository at this point in the history
…as inbound/outbound types
  • Loading branch information
jaebchoi committed Sep 27, 2024
1 parent 3f8b12a commit 9283e96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,12 @@ public String getLowerCamelCaseName() {
}

private void addRecordImports(String importName) {
if(importName == null)
{
throw new GenerationException("Step '" + getName() + "' has outbound or inbound Record Type that have "
+ "null import name.");
}

String packageName = importName.substring(0, importName.lastIndexOf('.'));
String className = importName.substring(importName.lastIndexOf('.')+1);
Record record = metamodelRepository.getRecord(packageName, className);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
*/
public class JavaStepDataRecordType extends BaseStepDataRecordTypeDecorator {

private AIOpsModelInstanceRepostory modelRepository = ModelInstanceRepositoryManager
.getMetamodelRepository(AIOpsModelInstanceRepostory.class);

/**
* {@inheritDoc}
*/
Expand All @@ -41,7 +38,7 @@ public String getFullyQualifiedType() {
String fullyQualifiedRecordType = null;

String packageName = getPackage();
if (StringUtils.isNotBlank(packageName) && !packageName.equals(modelRepository.getBasePackage())) {
if (StringUtils.isNotBlank(packageName) ){
fullyQualifiedRecordType = packageName + "." + getName();
}

Expand Down

0 comments on commit 9283e96

Please sign in to comment.