Class SchemaMigration
- java.lang.Object
-
- uk.gov.gchq.gaffer.graph.hook.migrate.SchemaMigration
-
- All Implemented Interfaces:
GraphHook
public class SchemaMigration extends Object implements GraphHook
ASchemaMigrationGraphHookallows an admin to set migration mappings that are then applied on anyOperationwith output and anOperationView.To make use of this
SchemaMigrationthe implementedStoremust 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 classSchemaMigration.MigrationOutputType
-
Field Summary
Fields Modifier and Type Field Description booleanaggregateAfterstatic SchemaMigration.MigrationOutputTypeDEFAULT_OUTPUT_TYPEstatic StringTRUE
-
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.MigrationOutputTypegetOutputType()booleanisAggregateAfter()voidpreExecute(OperationChain<?> opChain, Context context)Called fromGraphbefore anOperationChainis executed.voidsetAggregateAfter(boolean aggregateAfter)voidsetEdges(List<MigrateElement> edges)voidsetEntities(List<MigrateElement> entities)voidsetOutputType(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:GraphHookCalled fromGraphbefore anOperationChainis executed.- Specified by:
preExecutein interfaceGraphHook- Parameters:
opChain- theOperationChainbeing executed. This can be modified/optimised in any GraphHook.context- theContextin 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)
-
-