Class SchemaMigration
- java.lang.Object
-
- uk.gov.gchq.gaffer.graph.hook.migrate.SchemaMigration
-
- All Implemented Interfaces:
GraphHook
public class SchemaMigration extends Object implements GraphHook
ASchemaMigration
GraphHook
allows an admin to set migration mappings that are then applied on anyOperation
with output and anOperationView
.To make use of this
SchemaMigration
the implementedStore
must have the Transform trait.NOTE: This is currently experimental and may not function perfectly.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SchemaMigration.MigrationOutputType
-
Field Summary
Fields Modifier and Type Field Description boolean
aggregateAfter
static SchemaMigration.MigrationOutputType
DEFAULT_OUTPUT_TYPE
static String
TRUE
-
Constructor Summary
Constructors Constructor Description SchemaMigration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MigrateElement>
getEdges()
List<MigrateElement>
getEntities()
SchemaMigration.MigrationOutputType
getOutputType()
boolean
isAggregateAfter()
void
preExecute(OperationChain<?> opChain, Context context)
Called fromGraph
before anOperationChain
is executed.void
setAggregateAfter(boolean aggregateAfter)
void
setEdges(List<MigrateElement> edges)
void
setEntities(List<MigrateElement> entities)
void
setOutputType(SchemaMigration.MigrationOutputType outputType)
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.gov.gchq.gaffer.graph.hook.GraphHook
onFailure, postExecute
-
-
-
-
Field Detail
-
DEFAULT_OUTPUT_TYPE
public static final SchemaMigration.MigrationOutputType DEFAULT_OUTPUT_TYPE
-
TRUE
public static final String TRUE
-
aggregateAfter
public boolean aggregateAfter
-
-
Method Detail
-
preExecute
public void preExecute(OperationChain<?> opChain, Context context)
Description copied from interface:GraphHook
Called fromGraph
before anOperationChain
is executed.- Specified by:
preExecute
in interfaceGraphHook
- Parameters:
opChain
- theOperationChain
being executed. This can be modified/optimised in any GraphHook.context
- theContext
in which the operation chain was executed. The context also holds a reference to the original operation chain.
-
getEntities
public List<MigrateElement> getEntities()
-
setEntities
public void setEntities(List<MigrateElement> entities)
-
getEdges
public List<MigrateElement> getEdges()
-
setEdges
public void setEdges(List<MigrateElement> edges)
-
getOutputType
public SchemaMigration.MigrationOutputType getOutputType()
-
setOutputType
public void setOutputType(SchemaMigration.MigrationOutputType outputType)
-
isAggregateAfter
public boolean isAggregateAfter()
-
setAggregateAfter
public void setAggregateAfter(boolean aggregateAfter)
-
-