Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.epam.jsdmx.infomodel.sdmx30;

import java.util.Set;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class LazyMaintainableArtefactImpl extends MaintainableArtefactImpl {

private boolean targetArtefact;
private ArtefactReference artefactReference;
private Set<CrossReference> referencedArtefacts;

public LazyMaintainableArtefactImpl(ArtefactReference reference) {
setId(reference.getId());
setVersion(Version.createFromString(reference.getVersionString()));
setOrganizationId(reference.getOrganisationId());
this.artefactReference = reference;
}

public LazyMaintainableArtefactImpl(MaintainableArtefact maintainableArtefact) {
super(maintainableArtefact);
}

@Override
public StructureClass getStructureClass() {
return artefactReference.getStructureClass();
}

@Override
public Set<CrossReference> getReferencedArtefacts() {
return referencedArtefacts;
}

@Override
public ArtefactReference toReference() {
return this.artefactReference;
}

@Override
public MaintainableArtefact toStub() {
return this;
}

@Override
public MaintainableArtefact toCompleteStub() {
return this;
}

@Override
protected MaintainableArtefactImpl createInstance() {
return this;
}
}