@Override public AttributeData create(ArtifactData parent, IAttributeType attributeType) throws OseeCoreException { VersionData version = objectFactory.createDefaultVersionData(); version.setBranchId(parent.getVersion().getBranchId()); ModificationType modType = RelationalConstants.DEFAULT_MODIFICATION_TYPE; Integer attributeid = RelationalConstants.DEFAULT_ITEM_ID; return objectFactory.createAttributeData( version, attributeid, attributeType, modType, parent.getLocalId()); }
@Override public RelationData introduce(IOseeBranch destination, RelationData source) { RelationData newVersion = objectFactory.createCopy(source); newVersion.setUseBackingData(true); updateDataForIntroduce(destination, newVersion); return newVersion; }
@Override public AttributeData introduce(IOseeBranch destination, AttributeData source) throws OseeCoreException { AttributeData newVersion = objectFactory.createCopy(source); newVersion.setUseBackingData(true); updateDataForIntroduce(destination, newVersion); return newVersion; }
@Override public ArtifactData copy(IOseeBranch destination, ArtifactData source) throws OseeCoreException { ArtifactData copy = objectFactory.createCopy(source); updateDataForCopy(destination, copy); copy.setGuid(idFactory.getUniqueGuid(null)); copy.setLocalId(idFactory.getNextArtifactId()); return copy; }
@Override public AttributeData copy(IOseeBranch destination, AttributeData orcsData) throws OseeCoreException { AttributeData copy = objectFactory.createCopy(orcsData); updateDataForCopy(destination, copy); copy.setLocalId(RelationalConstants.DEFAULT_ITEM_ID); return copy; }
@Override public RelationData createRelationData( IRelationType relationType, IOseeBranch branch, HasLocalId<Integer> aArt, HasLocalId<Integer> bArt, String rationale) throws OseeCoreException { VersionData version = objectFactory.createDefaultVersionData(); version.setBranchId(branch.getUuid()); ModificationType modType = RelationalConstants.DEFAULT_MODIFICATION_TYPE; Integer relationId = RelationalConstants.DEFAULT_ITEM_ID; return objectFactory.createRelationData( version, relationId, relationType, modType, aArt.getLocalId(), bArt.getLocalId(), rationale); }
@Override public ArtifactData create(IOseeBranch branch, IArtifactType token, String guid, long uuid) throws OseeCoreException { Conditions.checkNotNull(branch, "branch"); Conditions.checkExpressionFailOnTrue( artifactCache.isAbstract(token), "Cannot create an instance of abstract type [%s]", token); String guidToSet = idFactory.getUniqueGuid(guid); Conditions.checkExpressionFailOnTrue( !GUID.isValid(guidToSet), "Invalid guid [%s] during artifact creation [type: %s]", guidToSet, token); VersionData version = objectFactory.createDefaultVersionData(); version.setBranchId(branch.getUuid()); ModificationType modType = RelationalConstants.DEFAULT_MODIFICATION_TYPE; ArtifactData artifactData = objectFactory.createArtifactData(version, (int) uuid, token, modType, guidToSet); return artifactData; }
@Override public RelationData clone(RelationData source) throws OseeCoreException { return objectFactory.createCopy(source); }
@Override public AttributeData clone(AttributeData source) throws OseeCoreException { return objectFactory.createCopy(source); }
@Override public ArtifactData clone(ArtifactData source) { return objectFactory.createCopy(source); }