Class FormatCodeBlocks
java.lang.Object
no.sikt.graphitron.generators.codebuilding.FormatCodeBlocks
Class containing various helper methods for constructing code with javapoet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockaddStringIfNotEmpty(String target, String addition) static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlockapplyGlobalTransforms(String recordName, no.sikt.graphitron.javapoet.TypeName recordTypeName, TransformScope scope) static no.sikt.graphitron.javapoet.CodeBlockapplyTransform(String recordName, no.sikt.graphitron.javapoet.TypeName recordTypeName, Method transform) static no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlockasCast(no.sikt.graphitron.javapoet.TypeName type, no.sikt.graphitron.javapoet.CodeBlock code) static no.sikt.graphitron.javapoet.CodeBlockasMethodCall(String method) static no.sikt.graphitron.javapoet.CodeBlockasMethodCall(String source, String method) static no.sikt.graphitron.javapoet.CodeBlockasMethodCall(no.sikt.graphitron.javapoet.TypeName source, String method) static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockcontinueCheck(String value) static @NotNull no.sikt.graphitron.javapoet.CodeBlockcountFunction(String queryLocation, String queryMethodName, String inputList, boolean isService) static no.sikt.graphitron.javapoet.CodeBlockcreateNodeIdBlock(RecordObjectSpecification<?> obj, String targetAlias) static no.sikt.graphitron.javapoet.CodeBlockcreateNodeIdBlockForRecord(RecordObjectSpecification<?> obj, String recordVariableName) static @NotNull no.sikt.graphitron.javapoet.CodeBlockdeclarePageSize(int defaultFirst) static no.sikt.graphitron.javapoet.CodeBlockdeclareRecord(String name, RecordObjectSpecification<?> input, boolean isIterable, boolean isResolver) static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlockfetchMapping(boolean iterable) static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlockgetPrimaryKeyFieldsWithTableAliasBlock(String targetAlias) static no.sikt.graphitron.javapoet.ClassNamegetQueryClassName(String queryLocation) static no.sikt.graphitron.javapoet.CodeBlockgetSelectKeyColumn(FetchContext context) static no.sikt.graphitron.javapoet.CodeBlockgetSelectKeyColumn(org.jooq.Key<?> key, String tableName, String aliasVariableName) static no.sikt.graphitron.javapoet.CodeBlockgetSelectKeyColumnRow(FetchContext context) Returns codeblock for selecting key columns for the resolver keystatic no.sikt.graphitron.javapoet.CodeBlockgetSelectKeyColumnRow(org.jooq.Key<?> key, String tableName, String aliasVariableName) Returns the select code for the columns of a key.static @NotNull no.sikt.graphitron.javapoet.CodeBlockgetValue(String container, MethodMapping mapping) static no.sikt.graphitron.javapoet.CodeBlockhasIdBlock(no.sikt.graphitron.javapoet.CodeBlock id, RecordObjectSpecification<?> obj, String targetAlias) static no.sikt.graphitron.javapoet.CodeBlockhasIdOrIdsBlock(no.sikt.graphitron.javapoet.CodeBlock idOrRecordParamName, RecordObjectSpecification<?> obj, String targetAlias, no.sikt.graphitron.javapoet.CodeBlock mappedFkFields, boolean isMultiple) static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockindentIfMultiline(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockinline(no.sikt.graphitron.javapoet.CodeBlock code) static no.sikt.graphitron.javapoet.CodeBlockinResolverKeysBlock(String resolverKeyParamName, FetchContext context) static no.sikt.graphitron.javapoet.CodeBlockinvokeExternalMethod(no.sikt.graphitron.javapoet.CodeBlock source, String methodName, String parameters) static @NotNull no.sikt.graphitron.javapoet.CodeBlocklistedNullCheck(String variable, no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlocklistOf()static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlocklistOf(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlocklistOfIf(no.sikt.graphitron.javapoet.CodeBlock code, boolean condition) static no.sikt.graphitron.javapoet.CodeBlockmakeEnumMapBlock(String inputVariable, no.sikt.graphitron.javapoet.CodeBlock valueLists) static no.sikt.graphitron.javapoet.CodeBlockmakeEnumMapBlock(no.sikt.graphitron.javapoet.CodeBlock inputVariable, no.sikt.graphitron.javapoet.CodeBlock valueLists) static @NotNull no.sikt.graphitron.javapoet.CodeBlockmapOf()static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlockstatic no.sikt.graphitron.javapoet.CodeBlocknodeIdColumnsWithAliasBlock(String targetAlias, RecordObjectSpecification<?> obj) static @NotNull no.sikt.graphitron.javapoet.CodeBlocknullIfNullElse(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlocknullIfNullElseThis(no.sikt.graphitron.javapoet.CodeBlock code) static no.sikt.graphitron.javapoet.CodeBlockofTernary(no.sikt.graphitron.javapoet.CodeBlock ifExpr, no.sikt.graphitron.javapoet.CodeBlock thenExpr, no.sikt.graphitron.javapoet.CodeBlock elseExpr) static @NotNull no.sikt.graphitron.javapoet.CodeBlockqueryFunction(String queryLocation, String queryMethodName, String inputList, boolean hasKeyValues, boolean usesKeyValues, boolean isService) static no.sikt.graphitron.javapoet.CodeBlockreassignFromServiceBlock(String variableName, String methodName, String targetAlias, String args) static no.sikt.graphitron.javapoet.CodeBlockrecordTransformPart(String transformerName, String varName, String typeName, boolean isJava, boolean isInput) static no.sikt.graphitron.javapoet.CodeBlockreferenceNodeIdColumnsBlock(RecordObjectSpecification<?> container, RecordObjectSpecification<?> target, org.jooq.ForeignKey<?, ?> fk) static no.sikt.graphitron.javapoet.CodeBlockreferenceNodeIdColumnsBlock(RecordObjectSpecification<?> container, RecordObjectSpecification<?> target, org.jooq.ForeignKey<?, ?> fk, no.sikt.graphitron.javapoet.CodeBlock tableReference) static @NotNull no.sikt.graphitron.javapoet.CodeBlockreturnCompletedFuture(String variable) static @NotNull no.sikt.graphitron.javapoet.CodeBlockreturnCompletedFuture(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockreturnWrap(String variable) static @NotNull no.sikt.graphitron.javapoet.CodeBlockreturnWrap(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockselectionSetLookup(String path, boolean atResolver, boolean useArguments) static @NotNull no.sikt.graphitron.javapoet.CodeBlocksetOf()static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlocksetOf(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlocksetValue(String container, MethodMapping mapping, no.sikt.graphitron.javapoet.CodeBlock value) static @NotNull no.sikt.graphitron.javapoet.CodeBlocksetValue(String container, MethodMapping mapping, no.sikt.graphitron.javapoet.CodeBlock value, boolean isResolverKey) static no.sikt.graphitron.javapoet.CodeBlocktoGraphEnumConverter(String enumType, no.sikt.graphitron.javapoet.CodeBlock field, boolean toRecord, ProcessedSchema schema) static no.sikt.graphitron.javapoet.CodeBlocktoJOOQEnumConverter(String enumType, ProcessedSchema schema) static no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockval(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockwrapCoalesce(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockstatic @NotNull no.sikt.graphitron.javapoet.CodeBlockwrapForIndexed(String variable, no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockwrapNotNull(String valueToCheck, no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockwrapObjectRow(no.sikt.graphitron.javapoet.CodeBlock code) static @NotNull no.sikt.graphitron.javapoet.CodeBlockwrapRow(no.sikt.graphitron.javapoet.CodeBlock code)
-
Constructor Details
-
FormatCodeBlocks
public FormatCodeBlocks()
-
-
Method Details
-
declareRecord
public static no.sikt.graphitron.javapoet.CodeBlock declareRecord(String name, RecordObjectSpecification<?> input, boolean isIterable, boolean isResolver) - Parameters:
name- Name of a field that should be declared as a record. This will be the name of the variable.input- Input type that should be declared as a record.isIterable- Is this record wrapped in a list?isResolver- Is this declaration to be used in a resolver?- Returns:
- CodeBlock that declares a new record variable and that attaches context configuration if needed.
-
recordTransformPart
-
ifNotNull
- Returns:
- CodeBlock that contains an if statement with a null check on the provided name.
-
addToList
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock addToList(String addTarget, String addition) - Parameters:
addTarget- Name of updatable collection to add something to.addition- The name of the content that should be added.- Returns:
- CodeBlock that adds something to an updatable collection.
-
addToList
- Parameters:
addTarget- Name of updatable collection to add something to, as well as what is added. For the collection a "List" suffix is assumed.- Returns:
- CodeBlock that adds something to an updatable collection.
-
addToList
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock addToList(String addTarget, no.sikt.graphitron.javapoet.CodeBlock codeAddition) - Parameters:
addTarget- Name of updatable collection to add something to.codeAddition- The CodeBlock that provides something that should be added.- Returns:
- CodeBlock that adds something to an updatable collection.
-
listOf
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock listOf()- Returns:
- CodeBlock that creates an empty List.
-
listOf
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock listOf(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the supplied CodeBlock in a List.
-
listOf
- Returns:
- CodeBlock that wraps the supplied variable name in a List.
-
listOfIf
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock listOfIf(no.sikt.graphitron.javapoet.CodeBlock code, boolean condition) - Returns:
- CodeBlock that wraps the provided CodeBlock in a Java list provided the condition is true.
-
setOf
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock setOf()- Returns:
- CodeBlock that creates an empty Set.
-
setOf
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock setOf(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the supplied CodeBlock in a Set.
-
setOf
- Returns:
- CodeBlock that wraps the supplied variable name in a Set.
-
mapOf
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock mapOf()- Returns:
- CodeBlock that creates an empty Map.
-
asMethodCall
- Returns:
- CodeBlock that wraps this method name in a method call format.
-
asMethodCall
- Returns:
- CodeBlock that wraps this method name in a method call format after the specified source.
-
asMethodCall
public static no.sikt.graphitron.javapoet.CodeBlock asMethodCall(no.sikt.graphitron.javapoet.TypeName source, String method) - Returns:
- CodeBlock that wraps this method name in a static method call format after the specified source.
-
asCast
public static no.sikt.graphitron.javapoet.CodeBlock asCast(no.sikt.graphitron.javapoet.TypeName type, String variable) - Returns:
- CodeBlock that wraps this variable in a Java cast.
-
asCast
public static no.sikt.graphitron.javapoet.CodeBlock asCast(no.sikt.graphitron.javapoet.TypeName type, no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps this code in a Java cast.
-
collectToList
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock collectToList()- Returns:
- CodeBlock that adds a collect to List call to be used on a Stream.
-
findFirst
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock findFirst()- Returns:
- CodeBlock that adds a findFirst call to be used on a collection.
-
nullIfNullElse
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock nullIfNullElse(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock name in a simple null check.
-
nullIfNullElseThis
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock nullIfNullElseThis(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock name in a simple null check.
-
listedNullCheck
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock listedNullCheck(String variable, no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock name in a mapping null check.
-
addStringIfNotEmpty
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock addStringIfNotEmpty(String target, String addition) - Returns:
- CodeBlock that adds something to a String if it is not empty.
-
selectionSetLookup
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock selectionSetLookup(String path, boolean atResolver, boolean useArguments) - Returns:
- CodeBlock that checks whether a path is in use.
-
setValue
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock setValue(String container, MethodMapping mapping, no.sikt.graphitron.javapoet.CodeBlock value, boolean isResolverKey) - Returns:
- CodeBlock that sets a value through a mapping.
-
setValue
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock setValue(String container, MethodMapping mapping, no.sikt.graphitron.javapoet.CodeBlock value) - Returns:
- CodeBlock that sets a value through a mapping.
-
getValue
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock getValue(String container, MethodMapping mapping) - Returns:
- CodeBlock that gets a value through a mapping.
-
newDataFetcher
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock newDataFetcher()- Returns:
- CodeBlock that creates a data fetcher object.
-
newServiceDataFetcherWithTransform
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock newServiceDataFetcherWithTransform()- Returns:
- CodeBlock that creates a service data fetcher through a transform object.
-
declareTransform
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock declareTransform()- Returns:
- CodeBlock that declares a resolver transformer.
-
continueCheck
- Returns:
- CodeBlock does a null check on the variable and runs continue if it is.
-
countFunction
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock countFunction(String queryLocation, String queryMethodName, String inputList, boolean isService) - Returns:
- CodeBlock consisting of a function for a count DB call.
-
getQueryClassName
-
queryFunction
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock queryFunction(String queryLocation, String queryMethodName, String inputList, boolean hasKeyValues, boolean usesKeyValues, boolean isService) - Returns:
- CodeBlock consisting of a function for a generic DB call.
-
invokeExternalMethod
-
declarePageSize
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock declarePageSize(int defaultFirst) - Returns:
- CodeBlock consisting of a declaration of the page size variable through a method call.
-
wrapNotNull
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock wrapNotNull(String valueToCheck, no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in an if not null check.
-
wrapFor
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock wrapFor(String variable, no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in a for loop.
-
wrapForIndexed
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock wrapForIndexed(String variable, no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in an indexed for loop.
-
wrapRow
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock wrapRow(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in a jOOQ row.
-
wrapObjectRow
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock wrapObjectRow(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in a jOOQ row.
-
wrapCoalesce
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock wrapCoalesce(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in a jOOQ coalesce.
-
inline
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock inline(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in a jOOQ inline.
-
val
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock val(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps the provided CodeBlock in a jOOQ val.
-
indentIfMultiline
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock indentIfMultiline(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- Add appropriate indentation if this code has multiple lines.
-
makeEnumMapBlock
public static no.sikt.graphitron.javapoet.CodeBlock makeEnumMapBlock(no.sikt.graphitron.javapoet.CodeBlock inputVariable, no.sikt.graphitron.javapoet.CodeBlock valueLists) - Returns:
- CodeBlock that sends this variable through an enum mapping.
-
makeEnumMapBlock
public static no.sikt.graphitron.javapoet.CodeBlock makeEnumMapBlock(String inputVariable, no.sikt.graphitron.javapoet.CodeBlock valueLists) - Returns:
- CodeBlock that sends this variable through an enum mapping.
-
toJOOQEnumConverter
public static no.sikt.graphitron.javapoet.CodeBlock toJOOQEnumConverter(String enumType, ProcessedSchema schema) - Returns:
- Code block containing the enum conversion method call with anonymous function declarations.
-
toGraphEnumConverter
public static no.sikt.graphitron.javapoet.CodeBlock toGraphEnumConverter(String enumType, no.sikt.graphitron.javapoet.CodeBlock field, boolean toRecord, ProcessedSchema schema) - Returns:
- Code block containing the enum conversion method call.
-
trueCondition
public static no.sikt.graphitron.javapoet.CodeBlock trueCondition()- Returns:
- Code block of a true jOOQ condition.
-
falseCondition
public static no.sikt.graphitron.javapoet.CodeBlock falseCondition()- Returns:
- Code block of a false jOOQ condition.
-
noCondition
public static no.sikt.graphitron.javapoet.CodeBlock noCondition()- Returns:
- Code block of a jOOQ "no condition".
-
applyGlobalTransforms
public static no.sikt.graphitron.javapoet.CodeBlock applyGlobalTransforms(String recordName, no.sikt.graphitron.javapoet.TypeName recordTypeName, TransformScope scope) - Parameters:
recordName- Name of the record to transform.scope- The scope of transforms that should be applied. Currently onlyTransformScope.ALL_MUTATIONSis supported.- Returns:
- CodeBlock where all defined global transforms are applied to the record.
-
applyTransform
public static no.sikt.graphitron.javapoet.CodeBlock applyTransform(String recordName, no.sikt.graphitron.javapoet.TypeName recordTypeName, Method transform) - Parameters:
recordName- Name of the record to transform.transform- The method that should transform the record.- Returns:
- CodeBlock where the transform is applied to the record.
-
fetchMapping
public static no.sikt.graphitron.javapoet.CodeBlock fetchMapping(boolean iterable) -
returnWrap
- Returns:
- CodeBlock that returns the provided name.
-
returnWrap
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock returnWrap(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that returns the provided code.
-
returnCompletedFuture
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock returnCompletedFuture(String variable) - Returns:
- CodeBlock that wraps and returns the provided variable in a CompletableFuture.
-
returnCompletedFuture
@NotNull public static @NotNull no.sikt.graphitron.javapoet.CodeBlock returnCompletedFuture(no.sikt.graphitron.javapoet.CodeBlock code) - Returns:
- CodeBlock that wraps and returns the provided CodeBlock in a CompletableFuture.
-
inResolverKeysBlock
public static no.sikt.graphitron.javapoet.CodeBlock inResolverKeysBlock(String resolverKeyParamName, FetchContext context) -
getSelectKeyColumnRow
public static no.sikt.graphitron.javapoet.CodeBlock getSelectKeyColumnRow(org.jooq.Key<?> key, String tableName, String aliasVariableName) Returns the select code for the columns of a key.- Parameters:
key- The keyaliasVariableName- The variable name for the table alias- Returns:
- Select code for the columns in the key
-
getSelectKeyColumnRow
Returns codeblock for selecting key columns for the resolver key- Parameters:
context- The fetching context- Returns:
- Select code for the columns in the resolver key
-
getSelectKeyColumn
-
getSelectKeyColumn
-
createNodeIdBlock
public static no.sikt.graphitron.javapoet.CodeBlock createNodeIdBlock(RecordObjectSpecification<?> obj, String targetAlias) -
createNodeIdBlockForRecord
public static no.sikt.graphitron.javapoet.CodeBlock createNodeIdBlockForRecord(RecordObjectSpecification<?> obj, String recordVariableName) -
hasIdBlock
public static no.sikt.graphitron.javapoet.CodeBlock hasIdBlock(no.sikt.graphitron.javapoet.CodeBlock id, RecordObjectSpecification<?> obj, String targetAlias) -
reassignFromServiceBlock
-
hasIdOrIdsBlock
public static no.sikt.graphitron.javapoet.CodeBlock hasIdOrIdsBlock(no.sikt.graphitron.javapoet.CodeBlock idOrRecordParamName, RecordObjectSpecification<?> obj, String targetAlias, no.sikt.graphitron.javapoet.CodeBlock mappedFkFields, boolean isMultiple) -
nodeIdColumnsBlock
public static no.sikt.graphitron.javapoet.CodeBlock nodeIdColumnsBlock(RecordObjectSpecification<?> obj) -
referenceNodeIdColumnsBlock
public static no.sikt.graphitron.javapoet.CodeBlock referenceNodeIdColumnsBlock(RecordObjectSpecification<?> container, RecordObjectSpecification<?> target, org.jooq.ForeignKey<?, ?> fk) -
referenceNodeIdColumnsBlock
public static no.sikt.graphitron.javapoet.CodeBlock referenceNodeIdColumnsBlock(RecordObjectSpecification<?> container, RecordObjectSpecification<?> target, org.jooq.ForeignKey<?, ?> fk, no.sikt.graphitron.javapoet.CodeBlock tableReference) -
nodeIdColumnsWithAliasBlock
public static no.sikt.graphitron.javapoet.CodeBlock nodeIdColumnsWithAliasBlock(String targetAlias, RecordObjectSpecification<?> obj) -
getPrimaryKeyFieldsWithTableAliasBlock
public static no.sikt.graphitron.javapoet.CodeBlock getPrimaryKeyFieldsWithTableAliasBlock(String targetAlias) -
ofTernary
public static no.sikt.graphitron.javapoet.CodeBlock ofTernary(no.sikt.graphitron.javapoet.CodeBlock ifExpr, no.sikt.graphitron.javapoet.CodeBlock thenExpr, no.sikt.graphitron.javapoet.CodeBlock elseExpr)
-