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 TypeMethodDescriptiongetDefaultSpecBuilder(String methodName, String inputName, TypeName inputType, TypeName returnType) getMapperSpecBuilder(GenerationField target) protected abstract CodeBlockiterateRecords(MapperContext context) abstract booleanMethods inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
generate, getDataFetcherWiring, getDefaultSpecBuilder, getDependencyMap, getLocalObject, getLocalTable, getTypeResolverWiring, inferFieldTypeName, iterableWrapType
-
Field Details
-
toRecord
protected final boolean toRecord
-
-
Constructor Details
-
AbstractMapperMethodGenerator
public AbstractMapperMethodGenerator(GenerationField localField, ProcessedSchema processedSchema, boolean toRecord)
-
-
Method Details
-
getLocalField
-
getDefaultSpecBuilder
public MethodSpec.Builder getDefaultSpecBuilder(String methodName, String inputName, TypeName inputType, TypeName returnType) -
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.
-