Class KobbyKotlinDtoExtension
-
- All Implemented Interfaces:
public class KobbyKotlinDtoExtensionConfiguration of DTO classes generation
-
-
Field Summary
Fields Modifier and Type Field Description private StringpackageNameprivate Stringprefixprivate Stringpostfixprivate StringenumPrefixprivate StringenumPostfixprivate StringinputPrefixprivate StringinputPostfixprivate BooleanapplyPrimaryKeysprivate IntegermaxNumberOfFieldsForImmutableDtoClassprivate IntegermaxNumberOfFieldsForImmutableInputClass
-
Constructor Summary
Constructors Constructor Description KobbyKotlinDtoExtension()
-
Method Summary
Modifier and Type Method Description final StringgetPackageName()Package name for DTO classes. final UnitsetPackageName(String packageName)Package name for DTO classes. final StringgetPrefix()Prefix of DTO classes generated from GraphQL objects, interfaces and unions final UnitsetPrefix(String prefix)Prefix of DTO classes generated from GraphQL objects, interfaces and unions final StringgetPostfix()Postfix of DTO classes generated from GraphQL objects, interfaces and unions. final UnitsetPostfix(String postfix)Postfix of DTO classes generated from GraphQL objects, interfaces and unions. final StringgetEnumPrefix()Prefix of DTO classes generated from GraphQL enums final UnitsetEnumPrefix(String enumPrefix)Prefix of DTO classes generated from GraphQL enums final StringgetEnumPostfix()Postfix of DTO classes generated from GraphQL enums final UnitsetEnumPostfix(String enumPostfix)Postfix of DTO classes generated from GraphQL enums final StringgetInputPrefix()Prefix of DTO classes generated from GraphQL inputs final UnitsetInputPrefix(String inputPrefix)Prefix of DTO classes generated from GraphQL inputs final StringgetInputPostfix()Postfix of DTO classes generated from GraphQL inputs final UnitsetInputPostfix(String inputPostfix)Postfix of DTO classes generated from GraphQL inputs final BooleangetApplyPrimaryKeys()Kobby can generate "equals" and "hashCode" functions for entities classes based on fields marked with "@primaryKey" directive. final UnitsetApplyPrimaryKeys(Boolean applyPrimaryKeys)Kobby can generate "equals" and "hashCode" functions for entities classes based on fields marked with "@primaryKey" directive. final IntegergetMaxNumberOfFieldsForImmutableDtoClass()Generate immutable DTO class if number of GraphQL type fields <= property value. final UnitsetMaxNumberOfFieldsForImmutableDtoClass(Integer maxNumberOfFieldsForImmutableDtoClass)Generate immutable DTO class if number of GraphQL type fields <= property value. final IntegergetMaxNumberOfFieldsForImmutableInputClass()Generate immutable Input class if number of GraphQL Input type fields <= property value. final UnitsetMaxNumberOfFieldsForImmutableInputClass(Integer maxNumberOfFieldsForImmutableInputClass)Generate immutable Input class if number of GraphQL Input type fields <= property value. final Unitserialization(Action<KobbyKotlinDtoSerializationExtension> action)Configuration of Kotlinx Serialization support for DTO classes. final Unitjackson(Action<KobbyKotlinDtoJacksonExtension> action)Configuration of Jackson annotations generation for DTO classes. final Unitbuilder(Action<KobbyKotlinDtoBuilderExtension> action)Configuration of DTO builders generation final UnitgraphQL(Action<KobbyKotlinDtoGraphQLExtension> action)Configuration of helper DTO classes generation for implementing the GraphQL interaction protocol -
-
Method Detail
-
getPackageName
final String getPackageName()
Package name for DTO classes. Relative to root package name.
Default: "dto"
-
setPackageName
final Unit setPackageName(String packageName)
Package name for DTO classes. Relative to root package name.
Default: "dto"
-
getPrefix
final String getPrefix()
Prefix of DTO classes generated from GraphQL objects, interfaces and unions
-
setPrefix
final Unit setPrefix(String prefix)
Prefix of DTO classes generated from GraphQL objects, interfaces and unions
-
getPostfix
final String getPostfix()
Postfix of DTO classes generated from GraphQL objects, interfaces and unions.
Default: "Dto"
-
setPostfix
final Unit setPostfix(String postfix)
Postfix of DTO classes generated from GraphQL objects, interfaces and unions.
Default: "Dto"
-
getEnumPrefix
final String getEnumPrefix()
Prefix of DTO classes generated from GraphQL enums
-
setEnumPrefix
final Unit setEnumPrefix(String enumPrefix)
Prefix of DTO classes generated from GraphQL enums
-
getEnumPostfix
final String getEnumPostfix()
Postfix of DTO classes generated from GraphQL enums
-
setEnumPostfix
final Unit setEnumPostfix(String enumPostfix)
Postfix of DTO classes generated from GraphQL enums
-
getInputPrefix
final String getInputPrefix()
Prefix of DTO classes generated from GraphQL inputs
-
setInputPrefix
final Unit setInputPrefix(String inputPrefix)
Prefix of DTO classes generated from GraphQL inputs
-
getInputPostfix
final String getInputPostfix()
Postfix of DTO classes generated from GraphQL inputs
-
setInputPostfix
final Unit setInputPostfix(String inputPostfix)
Postfix of DTO classes generated from GraphQL inputs
-
getApplyPrimaryKeys
final Boolean getApplyPrimaryKeys()
Kobby can generate "equals" and "hashCode" functions for entities classes based on fields marked with "@primaryKey" directive. This parameter provides an ability to apply the same generation logic to DTO classes.
Default: false
-
setApplyPrimaryKeys
final Unit setApplyPrimaryKeys(Boolean applyPrimaryKeys)
Kobby can generate "equals" and "hashCode" functions for entities classes based on fields marked with "@primaryKey" directive. This parameter provides an ability to apply the same generation logic to DTO classes.
Default: false
-
getMaxNumberOfFieldsForImmutableDtoClass
final Integer getMaxNumberOfFieldsForImmutableDtoClass()
Generate immutable DTO class if number of GraphQL type fields <= property value. Otherwise, generate a mutable DTO class. Set the property value to 0 to always generate mutable DTO classes. More details
Default: 245
-
setMaxNumberOfFieldsForImmutableDtoClass
final Unit setMaxNumberOfFieldsForImmutableDtoClass(Integer maxNumberOfFieldsForImmutableDtoClass)
Generate immutable DTO class if number of GraphQL type fields <= property value. Otherwise, generate a mutable DTO class. Set the property value to 0 to always generate mutable DTO classes. More details
Default: 245
-
getMaxNumberOfFieldsForImmutableInputClass
final Integer getMaxNumberOfFieldsForImmutableInputClass()
Generate immutable Input class if number of GraphQL Input type fields <= property value. Otherwise, generate a mutable Input class. Set the property value to 0 to always generate mutable Input classes. More details
Default: 245
-
setMaxNumberOfFieldsForImmutableInputClass
final Unit setMaxNumberOfFieldsForImmutableInputClass(Integer maxNumberOfFieldsForImmutableInputClass)
Generate immutable Input class if number of GraphQL Input type fields <= property value. Otherwise, generate a mutable Input class. Set the property value to 0 to always generate mutable Input classes. More details
Default: 245
-
serialization
final Unit serialization(Action<KobbyKotlinDtoSerializationExtension> action)
Configuration of Kotlinx Serialization support for DTO classes.
Note that Kotlinx serialization and Jackson serialization are not supported simultaneously.
-
jackson
final Unit jackson(Action<KobbyKotlinDtoJacksonExtension> action)
Configuration of Jackson annotations generation for DTO classes.
Note that Kotlinx serialization and Jackson serialization are not supported simultaneously.
-
builder
final Unit builder(Action<KobbyKotlinDtoBuilderExtension> action)
Configuration of DTO builders generation
-
graphQL
final Unit graphQL(Action<KobbyKotlinDtoGraphQLExtension> action)
Configuration of helper DTO classes generation for implementing the GraphQL interaction protocol
-
-
-
-