Skip to content

Commit

Permalink
spline #831 clean up: remove redundant OperationID type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
wajda committed Apr 6, 2021
1 parent 9f0e692 commit 15ef71e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package za.co.absa.spline.consumer.service.model

import io.swagger.annotations.{ApiModel, ApiModelProperty}
import za.co.absa.spline.consumer.service.model.LineageDetailed.OperationID

@ApiModel(description = "Attribute Node")
case class AttributeNode
Expand All @@ -29,10 +28,10 @@ case class AttributeNode
name: String,

@ApiModelProperty(value = "Operation Id in which the attribute was created")
originOpId: OperationID,
originOpId: Operation.Id,

@ApiModelProperty(value = "Operation Ids which the attribute passes through")
transOpIds: Seq[OperationID]
transOpIds: Seq[Operation.Id]

) extends Graph.Node {
def this() = this(null, null, null, null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ case class LineageDetailed(
) {
def this() = this(null, null)
}

object LineageDetailed {
type OperationID = String
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@
package za.co.absa.spline.consumer.service.model

import io.swagger.annotations.{ApiModel, ApiModelProperty}
import za.co.absa.spline.consumer.service.model.LineageDetailed.OperationID

@ApiModel(description = "Operation")
case class Operation
(
@ApiModelProperty(value = "Operation Id")
_id: OperationID,
_id: Operation.Id,
@ApiModelProperty(value = "Type of the operation", example = "Read / Transformation / Write")
`type`: String,
`type`: Operation.Type,
@ApiModelProperty(value = "Name of the operation")
name: String,
name: Option[String],
@ApiModelProperty(value = "Properties of the operation")
properties: Map[String, Any]
) extends Graph.Node {
override type Id = OperationID
override type Id = Operation.Id

def this() = this(null, null, null, null)
}

object Operation {
type Id = String
type Type = String // Read / Transformation / Write
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@
package za.co.absa.spline.consumer.service.model

import io.swagger.annotations.{ApiModel, ApiModelProperty}
import za.co.absa.spline.consumer.service.model.LineageDetailed.OperationID

@ApiModel(description="Link between operations")
case class Transition
(
@ApiModelProperty(value = "Source Operation")
source: OperationID,
source: Operation.Id,
@ApiModelProperty(value = "Target Operation")
target: OperationID
target: Operation.Id
) extends Graph.Edge {
def this() = this(null, null)

override type JointId = OperationID
override type JointId = Operation.Id
}

0 comments on commit 15ef71e

Please sign in to comment.