Class AbstractMapperMethodGenerator
java.lang.Object
no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator<GenerationField,RecordObjectSpecification<?>>
no.sikt.graphitron.generators.abstractions.AbstractMapperMethodGenerator
- All Implemented Interfaces:
MethodGenerator
- Direct Known Subclasses:
JavaRecordMapperMethodGenerator,RecordMapperMethodGenerator,RecordValidatorMethodGenerator
public abstract class AbstractMapperMethodGenerator
extends AbstractSchemaMethodGenerator<GenerationField,RecordObjectSpecification<?>>
-
Field Summary
FieldsFields inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
dependencyMap, localObject, processedSchema -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMapperMethodGenerator(GenerationField localField, ProcessedSchema processedSchema, boolean toRecord) -
Method Summary
Modifier and TypeMethodDescriptionList<no.sikt.graphitron.javapoet.MethodSpec>no.sikt.graphitron.javapoet.MethodSpec.BuildergetDefaultSpecBuilder(String methodName, String inputName, no.sikt.graphitron.javapoet.TypeName inputType, no.sikt.graphitron.javapoet.TypeName returnType) no.sikt.graphitron.javapoet.MethodSpec.BuildergetMapperSpecBuilder(GenerationField target) protected abstract no.sikt.graphitron.javapoet.CodeBlockiterateRecords(MapperContext context) abstract booleanMethods inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
createServiceDependency, declareAllServiceClasses, declareAllServiceClasses, declareAllServiceClassesInAliasSet, generate, getDataFetcherWiring, getDefaultSpecBuilder, getDependencyMap, getLocalObject, getLocalTable, getTypeResolverWiring
-
Field Details
-
toRecord
protected final boolean toRecord
-
-
Constructor Details
-
AbstractMapperMethodGenerator
public AbstractMapperMethodGenerator(GenerationField localField, ProcessedSchema processedSchema, boolean toRecord)
-
-
Method Details
-
getLocalField
-
getDefaultSpecBuilder
-
getMapperSpecBuilder
-
generateAll
- Returns:
- List of complete javapoet
MethodSpecthat can be generated for this object.
-
mapsJavaRecord
public abstract boolean mapsJavaRecord() -
iterateRecords
- Returns:
- Code for setting the mapping data.
-