Class RowToElementGenerator
- java.lang.Object
-
- uk.gov.gchq.gaffer.spark.data.generator.RowToElementGenerator
-
- All Implemented Interfaces:
Function<Iterable<? extends org.apache.spark.sql.Row>,Iterable<? extends Element>>
,ElementGenerator<org.apache.spark.sql.Row>
,OneToOneElementGenerator<org.apache.spark.sql.Row>
public class RowToElementGenerator extends Object implements OneToOneElementGenerator<org.apache.spark.sql.Row>
ARowToElementGenerator
is aOneToOneElementGenerator
for converting aRow
objects into a GafferElement
. This generator requires that the Row object to be converted into an Element was originally created from an Element. It is not possible to convert an arbitrary Row object into an Element.
-
-
Constructor Summary
Constructors Constructor Description RowToElementGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Element
_apply(org.apache.spark.sql.Row row)
Iterable<? extends Element>
apply(Iterable<? extends org.apache.spark.sql.Row> rows)
-
-
-
Method Detail
-
_apply
public Element _apply(org.apache.spark.sql.Row row)
- Specified by:
_apply
in interfaceOneToOneElementGenerator<org.apache.spark.sql.Row>
- Parameters:
row
- the domain object to convert- Returns:
- the generated
Element
-
-