From dbe1215453a328bf1176b7c1faf376bfcce620a8 Mon Sep 17 00:00:00 2001 From: "xiaoheng.xxh" Date: Tue, 18 Jun 2024 11:42:08 +0800 Subject: [PATCH] Add COREF for java language extractor source code. --- language/java/extractor/README.md | 9 + language/java/extractor/README_cn.md | 9 + language/java/extractor/pom.xml | 258 +++ .../com/alipay/codequery/Configuration.java | 87 + .../java/com/alipay/codequery/Extractor.java | 245 +++ .../coref/core/CorefDepExtractor.java | 207 +++ .../codequery/coref/core/CorefExtractor.java | 1610 +++++++++++++++++ .../alipay/codequery/coref/core/CorefURI.java | 41 + .../alipay/codequery/coref/core/Runner.java | 345 ++++ .../codequery/coref/core/SharedManager.java | 45 + .../coref/core/SignatureGenerator.java | 128 ++ .../codequery/coref/model/Annotation.java | 72 + .../alipay/codequery/coref/model/Class.java | 79 + .../alipay/codequery/coref/model/Comment.java | 78 + .../codequery/coref/model/Constructor.java | 13 + .../codequery/coref/model/Containers.java | 8 + .../codequery/coref/model/Expression.java | 408 +++++ .../alipay/codequery/coref/model/Field.java | 19 + .../alipay/codequery/coref/model/File.java | 21 + .../alipay/codequery/coref/model/Folder.java | 15 + .../codequery/coref/model/Identifier.java | 16 + .../alipay/codequery/coref/model/Literal.java | 18 + .../codequery/coref/model/LocalVariable.java | 13 + .../codequery/coref/model/Location.java | 59 + .../alipay/codequery/coref/model/Method.java | 24 + .../codequery/coref/model/Modifier.java | 42 + .../alipay/codequery/coref/model/Module.java | 12 + .../alipay/codequery/coref/model/Node.java | 24 + .../alipay/codequery/coref/model/NpClass.java | 14 + .../alipay/codequery/coref/model/NpFile.java | 16 + .../codequery/coref/model/NpInterface.java | 15 + .../codequery/coref/model/NpMethod.java | 15 + .../codequery/coref/model/NpProject.java | 14 + .../alipay/codequery/coref/model/Package.java | 10 + .../codequery/coref/model/Parameter.java | 14 + .../codequery/coref/model/ParameterList.java | 34 + .../alipay/codequery/coref/model/Parent.java | 21 + .../codequery/coref/model/Primitive.java | 25 + .../alipay/codequery/coref/model/Program.java | 22 + .../codequery/coref/model/Statement.java | 402 ++++ .../alipay/codequery/coref/model/Type.java | 85 + .../codequery/coref/model/Variable.java | 19 + .../codequery/coref/storage/Commit.java | 63 + .../coref/storage/CorefASTDumpStorage.java | 866 +++++++++ .../codequery/coref/storage/CorefCache.java | 19 + .../coref/storage/FileScopeCorefObject.java | 12 + .../codequery/coref/storage/IStorage.java | 277 +++ .../coref/storage/LocalCorefCache.java | 100 + .../coref/storage/OssCorefCache.java | 255 +++ .../coref/storage/RemoteCacheType.java | 5 + .../coref/storage/SqliteStorage2.java | 830 +++++++++ .../codequery/coref/storage/SqliteUtil.java | 214 +++ .../alipay/codequery/coref/util/CmdUtils.java | 32 + .../codequery/coref/util/ConvertCodeUtil.java | 63 + .../alipay/codequery/coref/util/HashUtil.java | 143 ++ .../coref/util/JudgeFileCharset.java | 34 + .../codequery/coref/util/ReadStream.java | 34 + .../dal/mybatis/domain/AnnotatedRelation.java | 87 + .../AnnotationAccessArgumentWithName.java | 172 ++ .../AnnotationAccessArgumentWithoutName.java | 155 ++ .../domain/AnnotationArrayInitializer.java | 121 ++ .../domain/AnnotationCanNotResolved.java | 138 ++ .../mybatis/domain/AnnotationCanResolved.java | 155 ++ .../mybatis/domain/AnnotationDeclaration.java | 87 + .../AnnotationDeclarationParameter.java | 155 ++ ...ationDeclarationParameterDefaultValue.java | 87 + .../dal/mybatis/domain/AnonymousClass.java | 138 ++ .../codequery/dal/mybatis/domain/Array.java | 87 + .../mybatis/domain/ArrayAccessExpression.java | 104 ++ .../domain/ArrayCreationExpression.java | 104 ++ .../domain/ArrayInitializerExpression.java | 87 + .../dal/mybatis/domain/AssertStatement.java | 104 ++ .../mybatis/domain/AssignmentExpression.java | 121 ++ .../dal/mybatis/domain/BinaryExpression.java | 121 ++ .../dal/mybatis/domain/BlockStatement.java | 87 + .../dal/mybatis/domain/BooleanLiteral.java | 87 + .../dal/mybatis/domain/BreakStatement.java | 87 + .../dal/mybatis/domain/CallableBinding.java | 87 + .../domain/CallableEnclosingExpression.java | 87 + .../domain/CallableEnclosingStatement.java | 87 + .../dal/mybatis/domain/CatchSection.java | 172 ++ .../dal/mybatis/domain/CharacterLiteral.java | 87 + .../dal/mybatis/domain/ClassHierarchy.java | 87 + .../mybatis/domain/ClassImplementList.java | 87 + .../dal/mybatis/domain/ClassInitializer.java | 121 ++ .../dal/mybatis/domain/CodeBlock.java | 155 ++ .../codequery/dal/mybatis/domain/Comment.java | 138 ++ .../mybatis/domain/ConditionalExpression.java | 121 ++ .../dal/mybatis/domain/Constructor.java | 155 ++ .../mybatis/domain/ConstructorInvocation.java | 87 + .../dal/mybatis/domain/ContainerParent.java | 87 + .../dal/mybatis/domain/ContinueStatement.java | 87 + .../dal/mybatis/domain/Cupackage.java | 87 + .../mybatis/domain/DeclarationElement.java | 104 ++ .../dal/mybatis/domain/DoWhileStatement.java | 121 ++ .../dal/mybatis/domain/DoubleLiteral.java | 87 + .../codequery/dal/mybatis/domain/Element.java | 121 ++ .../domain/EmptyReferenceParameterList.java | 121 ++ .../dal/mybatis/domain/EmptyStatement.java | 70 + .../dal/mybatis/domain/EnumConstant.java | 138 ++ .../dal/mybatis/domain/Exception.java | 121 ++ .../dal/mybatis/domain/Expression.java | 155 ++ .../dal/mybatis/domain/ExpressionList.java | 138 ++ .../ExpressionListExpressionRelation.java | 104 ++ .../mybatis/domain/ExpressionStatement.java | 87 + .../codequery/dal/mybatis/domain/Field.java | 138 ++ .../codequery/dal/mybatis/domain/File.java | 138 ++ .../dal/mybatis/domain/FileMd5Sum.java | 87 + .../dal/mybatis/domain/FileSha256Sum.java | 87 + .../mybatis/domain/FloatingPointLiteral.java | 87 + .../codequery/dal/mybatis/domain/Folder.java | 121 ++ .../dal/mybatis/domain/ForStatement.java | 138 ++ .../dal/mybatis/domain/ForeachStatement.java | 121 ++ .../dal/mybatis/domain/Identifier.java | 121 ++ .../mybatis/domain/IfStatementWithElse.java | 121 ++ .../domain/IfStatementWithoutElse.java | 104 ++ .../dal/mybatis/domain/ImportInfo.java | 155 ++ .../domain/ImportStaticReferenceElement.java | 121 ++ .../mybatis/domain/ImportStaticStatement.java | 138 ++ .../mybatis/domain/InstanceofExpression.java | 121 ++ .../dal/mybatis/domain/IntegerLiteral.java | 87 + .../dal/mybatis/domain/InterfaceInfo.java | 138 ++ .../dal/mybatis/domain/JavadocComment.java | 138 ++ .../dal/mybatis/domain/JavadocDataToken.java | 138 ++ .../dal/mybatis/domain/JavadocTag.java | 155 ++ .../dal/mybatis/domain/JavadocTagValue.java | 121 ++ .../dal/mybatis/domain/LabeledStatement.java | 104 ++ .../dal/mybatis/domain/LambdaExpression.java | 138 ++ .../dal/mybatis/domain/LocalClass.java | 138 ++ .../dal/mybatis/domain/LocalVariable.java | 155 ++ .../dal/mybatis/domain/Location.java | 155 ++ .../dal/mybatis/domain/LongLiteral.java | 87 + .../dal/mybatis/domain/Metainfo.java | 121 ++ .../codequery/dal/mybatis/domain/Method.java | 172 ++ .../MethodAccessExpressionWithType.java | 121 ++ .../MethodAccessExpressionWithoutType.java | 104 ++ .../domain/MethodReferenceExpression.java | 87 + .../dal/mybatis/domain/Modifier.java | 121 ++ .../dal/mybatis/domain/ModifierList.java | 104 ++ .../codequery/dal/mybatis/domain/Module.java | 87 + .../dal/mybatis/domain/NameString.java | 104 ++ .../dal/mybatis/domain/NewExpression.java | 104 ++ .../codequery/dal/mybatis/domain/NpClass.java | 121 ++ .../codequery/dal/mybatis/domain/NpFile.java | 121 ++ .../dal/mybatis/domain/NpInterface.java | 121 ++ .../dal/mybatis/domain/NpMethod.java | 138 ++ .../dal/mybatis/domain/NpProject.java | 104 ++ .../dal/mybatis/domain/NullLiteral.java | 87 + .../dal/mybatis/domain/NumberOfLines.java | 121 ++ .../dal/mybatis/domain/PackageStatement.java | 138 ++ .../dal/mybatis/domain/Parameter.java | 172 ++ .../codequery/dal/mybatis/domain/Parent.java | 87 + .../mybatis/domain/PolyadicExpression.java | 104 ++ .../dal/mybatis/domain/Primitive.java | 87 + .../codequery/dal/mybatis/domain/Program.java | 87 + .../dal/mybatis/domain/ReferenceElement.java | 121 ++ .../mybatis/domain/ReferenceExpression.java | 70 + .../dal/mybatis/domain/ReferenceList.java | 138 ++ .../domain/ReferenceParameterList.java | 155 ++ .../dal/mybatis/domain/ReferenceRelation.java | 87 + .../dal/mybatis/domain/ReferenceType.java | 104 ++ .../dal/mybatis/domain/ResourceList.java | 121 ++ .../dal/mybatis/domain/ReturnStatement.java | 87 + .../dal/mybatis/domain/Statement.java | 155 ++ .../domain/StatementEnclosingExpression.java | 87 + .../dal/mybatis/domain/StringLiteral.java | 87 + .../mybatis/domain/SuperAccessExpression.java | 70 + .../domain/SuperConstructorInvocation.java | 70 + .../dal/mybatis/domain/SuperExpression.java | 70 + .../domain/SuperExpressionWithQualifier.java | 87 + .../mybatis/domain/SwitchLabelStatement.java | 121 ++ .../dal/mybatis/domain/SwitchStatement.java | 104 ++ .../mybatis/domain/SynchronizedStatement.java | 104 ++ .../mybatis/domain/ThisAccessExpression.java | 70 + .../domain/ThisExpressionWithQualifier.java | 87 + .../dal/mybatis/domain/ThrowStatement.java | 104 ++ .../codequery/dal/mybatis/domain/Token.java | 121 ++ .../domain/TryStatementWithFinally.java | 104 ++ .../domain/TryStatementWithoutFinally.java | 87 + .../mybatis/domain/TypeCastExpression.java | 87 + .../dal/mybatis/domain/TypeElement.java | 138 ++ .../dal/mybatis/domain/TypeLiteral.java | 104 ++ .../dal/mybatis/domain/TypeParameter.java | 172 ++ .../dal/mybatis/domain/UnaryExpression.java | 121 ++ .../dal/mybatis/domain/WhileStatement.java | 104 ++ .../dal/mybatis/domain/YieldStatement.java | 104 ++ .../codequery/dal/mybatis/domain/clazz.java | 138 ++ .../AnnotatedRelationDynamicSqlSupport.java | 28 + .../mapper/AnnotatedRelationMapper.java | 139 ++ ...cessArgumentWithNameDynamicSqlSupport.java | 53 + ...nnotationAccessArgumentWithNameMapper.java | 174 ++ ...sArgumentWithoutNameDynamicSqlSupport.java | 48 + ...tationAccessArgumentWithoutNameMapper.java | 167 ++ ...tionArrayInitializerDynamicSqlSupport.java | 38 + .../AnnotationArrayInitializerMapper.java | 153 ++ ...tationCanNotResolvedDynamicSqlSupport.java | 43 + .../AnnotationCanNotResolvedMapper.java | 197 ++ ...nnotationCanResolvedDynamicSqlSupport.java | 48 + .../mapper/AnnotationCanResolvedMapper.java | 167 ++ ...nnotationDeclarationDynamicSqlSupport.java | 28 + .../mapper/AnnotationDeclarationMapper.java | 139 ++ ...arameterDefaultValueDynamicSqlSupport.java | 28 + ...eclarationParameterDefaultValueMapper.java | 139 ++ ...DeclarationParameterDynamicSqlSupport.java | 48 + .../AnnotationDeclarationParameterMapper.java | 167 ++ .../AnonymousClassDynamicSqlSupport.java | 43 + .../mybatis/mapper/AnonymousClassMapper.java | 160 ++ ...rrayAccessExpressionDynamicSqlSupport.java | 33 + .../mapper/ArrayAccessExpressionMapper.java | 146 ++ ...ayCreationExpressionDynamicSqlSupport.java | 33 + .../mapper/ArrayCreationExpressionMapper.java | 146 ++ .../mapper/ArrayDynamicSqlSupport.java | 28 + ...nitializerExpressionDynamicSqlSupport.java | 28 + .../ArrayInitializerExpressionMapper.java | 139 ++ .../dal/mybatis/mapper/ArrayMapper.java | 139 ++ .../AssertStatementDynamicSqlSupport.java | 33 + .../mybatis/mapper/AssertStatementMapper.java | 146 ++ ...AssignmentExpressionDynamicSqlSupport.java | 38 + .../mapper/AssignmentExpressionMapper.java | 153 ++ .../BinaryExpressionDynamicSqlSupport.java | 38 + .../mapper/BinaryExpressionMapper.java | 153 ++ .../BlockStatementDynamicSqlSupport.java | 28 + .../mybatis/mapper/BlockStatementMapper.java | 139 ++ .../BooleanLiteralDynamicSqlSupport.java | 28 + .../mybatis/mapper/BooleanLiteralMapper.java | 139 ++ .../BreakStatementDynamicSqlSupport.java | 28 + .../mybatis/mapper/BreakStatementMapper.java | 139 ++ .../CallableBindingDynamicSqlSupport.java | 28 + .../mybatis/mapper/CallableBindingMapper.java | 139 ++ ...eEnclosingExpressionDynamicSqlSupport.java | 28 + .../CallableEnclosingExpressionMapper.java | 139 ++ ...leEnclosingStatementDynamicSqlSupport.java | 28 + .../CallableEnclosingStatementMapper.java | 139 ++ .../mapper/CatchSectionDynamicSqlSupport.java | 53 + .../mybatis/mapper/CatchSectionMapper.java | 174 ++ .../CharacterLiteralDynamicSqlSupport.java | 28 + .../mapper/CharacterLiteralMapper.java | 139 ++ .../ClassHierarchyDynamicSqlSupport.java | 28 + .../mybatis/mapper/ClassHierarchyMapper.java | 139 ++ .../ClassImplementListDynamicSqlSupport.java | 28 + .../mapper/ClassImplementListMapper.java | 139 ++ .../ClassInitializerDynamicSqlSupport.java | 38 + .../mapper/ClassInitializerMapper.java | 153 ++ .../mapper/CodeBlockDynamicSqlSupport.java | 48 + .../dal/mybatis/mapper/CodeBlockMapper.java | 167 ++ .../mapper/CommentDynamicSqlSupport.java | 43 + .../dal/mybatis/mapper/CommentMapper.java | 160 ++ ...onditionalExpressionDynamicSqlSupport.java | 38 + .../mapper/ConditionalExpressionMapper.java | 153 ++ .../mapper/ConstructorDynamicSqlSupport.java | 48 + ...onstructorInvocationDynamicSqlSupport.java | 28 + .../mapper/ConstructorInvocationMapper.java | 139 ++ .../dal/mybatis/mapper/ConstructorMapper.java | 167 ++ .../ContainerParentDynamicSqlSupport.java | 28 + .../mybatis/mapper/ContainerParentMapper.java | 139 ++ .../ContinueStatementDynamicSqlSupport.java | 28 + .../mapper/ContinueStatementMapper.java | 139 ++ .../mapper/CupackageDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/CupackageMapper.java | 139 ++ .../DeclarationElementDynamicSqlSupport.java | 33 + .../mapper/DeclarationElementMapper.java | 146 ++ .../DoWhileStatementDynamicSqlSupport.java | 38 + .../mapper/DoWhileStatementMapper.java | 153 ++ .../DoubleLiteralDynamicSqlSupport.java | 28 + .../mybatis/mapper/DoubleLiteralMapper.java | 139 ++ .../mapper/ElementDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/ElementMapper.java | 188 ++ ...ferenceParameterListDynamicSqlSupport.java | 38 + .../EmptyReferenceParameterListMapper.java | 153 ++ .../EmptyStatementDynamicSqlSupport.java | 23 + .../mybatis/mapper/EmptyStatementMapper.java | 132 ++ .../mapper/EnumConstantDynamicSqlSupport.java | 43 + .../mybatis/mapper/EnumConstantMapper.java | 160 ++ .../mapper/ExceptionDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/ExceptionMapper.java | 153 ++ .../mapper/ExpressionDynamicSqlSupport.java | 48 + .../ExpressionListDynamicSqlSupport.java | 43 + ...stExpressionRelationDynamicSqlSupport.java | 33 + ...xpressionListExpressionRelationMapper.java | 146 ++ .../mybatis/mapper/ExpressionListMapper.java | 160 ++ .../dal/mybatis/mapper/ExpressionMapper.java | 167 ++ .../ExpressionStatementDynamicSqlSupport.java | 28 + .../mapper/ExpressionStatementMapper.java | 139 ++ .../mapper/FieldDynamicSqlSupport.java | 43 + .../dal/mybatis/mapper/FieldMapper.java | 160 ++ .../mybatis/mapper/FileDynamicSqlSupport.java | 43 + .../dal/mybatis/mapper/FileMapper.java | 160 ++ .../mapper/FileMd5SumDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/FileMd5SumMapper.java | 139 ++ .../FileSha256SumDynamicSqlSupport.java | 28 + .../mybatis/mapper/FileSha256SumMapper.java | 139 ++ ...FloatingPointLiteralDynamicSqlSupport.java | 28 + .../mapper/FloatingPointLiteralMapper.java | 139 ++ .../mapper/FolderDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/FolderMapper.java | 153 ++ .../mapper/ForStatementDynamicSqlSupport.java | 43 + .../mybatis/mapper/ForStatementMapper.java | 160 ++ .../ForeachStatementDynamicSqlSupport.java | 38 + .../mapper/ForeachStatementMapper.java | 153 ++ .../mapper/IdentifierDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/IdentifierMapper.java | 153 ++ .../IfStatementWithElseDynamicSqlSupport.java | 38 + .../mapper/IfStatementWithElseMapper.java | 153 ++ ...StatementWithoutElseDynamicSqlSupport.java | 33 + .../mapper/IfStatementWithoutElseMapper.java | 146 ++ .../mapper/ImportInfoDynamicSqlSupport.java | 48 + .../dal/mybatis/mapper/ImportInfoMapper.java | 167 ++ ...aticReferenceElementDynamicSqlSupport.java | 38 + .../ImportStaticReferenceElementMapper.java | 153 ++ ...mportStaticStatementDynamicSqlSupport.java | 43 + .../mapper/ImportStaticStatementMapper.java | 160 ++ ...InstanceofExpressionDynamicSqlSupport.java | 38 + .../mapper/InstanceofExpressionMapper.java | 153 ++ .../IntegerLiteralDynamicSqlSupport.java | 28 + .../mybatis/mapper/IntegerLiteralMapper.java | 139 ++ .../InterfaceInfoDynamicSqlSupport.java | 43 + .../mybatis/mapper/InterfaceInfoMapper.java | 160 ++ .../JavadocCommentDynamicSqlSupport.java | 43 + .../mybatis/mapper/JavadocCommentMapper.java | 160 ++ .../JavadocDataTokenDynamicSqlSupport.java | 43 + .../mapper/JavadocDataTokenMapper.java | 160 ++ .../mapper/JavadocTagDynamicSqlSupport.java | 48 + .../dal/mybatis/mapper/JavadocTagMapper.java | 167 ++ .../JavadocTagValueDynamicSqlSupport.java | 38 + .../mybatis/mapper/JavadocTagValueMapper.java | 153 ++ .../LabeledStatementDynamicSqlSupport.java | 33 + .../mapper/LabeledStatementMapper.java | 146 ++ .../LambdaExpressionDynamicSqlSupport.java | 43 + .../mapper/LambdaExpressionMapper.java | 160 ++ .../mapper/LocalClassDynamicSqlSupport.java | 43 + .../dal/mybatis/mapper/LocalClassMapper.java | 160 ++ .../LocalVariableDynamicSqlSupport.java | 48 + .../mybatis/mapper/LocalVariableMapper.java | 167 ++ .../mapper/LocationDynamicSqlSupport.java | 48 + .../dal/mybatis/mapper/LocationMapper.java | 167 ++ .../mapper/LongLiteralDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/LongLiteralMapper.java | 139 ++ .../mapper/MetainfoDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/MetainfoMapper.java | 153 ++ ...ssExpressionWithTypeDynamicSqlSupport.java | 38 + .../MethodAccessExpressionWithTypeMapper.java | 153 ++ ...xpressionWithoutTypeDynamicSqlSupport.java | 33 + ...thodAccessExpressionWithoutTypeMapper.java | 146 ++ .../mapper/MethodDynamicSqlSupport.java | 53 + .../dal/mybatis/mapper/MethodMapper.java | 215 +++ ...dReferenceExpressionDynamicSqlSupport.java | 28 + .../MethodReferenceExpressionMapper.java | 170 ++ .../mapper/ModifierDynamicSqlSupport.java | 38 + .../mapper/ModifierListDynamicSqlSupport.java | 33 + .../mybatis/mapper/ModifierListMapper.java | 146 ++ .../dal/mybatis/mapper/ModifierMapper.java | 153 ++ .../mapper/ModuleDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/ModuleMapper.java | 139 ++ .../mapper/NameStringDynamicSqlSupport.java | 33 + .../dal/mybatis/mapper/NameStringMapper.java | 146 ++ .../NewExpressionDynamicSqlSupport.java | 33 + .../mybatis/mapper/NewExpressionMapper.java | 146 ++ .../mapper/NpClassDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/NpClassMapper.java | 153 ++ .../mapper/NpFileDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/NpFileMapper.java | 153 ++ .../mapper/NpInterfaceDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/NpInterfaceMapper.java | 153 ++ .../mapper/NpMethodDynamicSqlSupport.java | 43 + .../dal/mybatis/mapper/NpMethodMapper.java | 197 ++ .../mapper/NpProjectDynamicSqlSupport.java | 33 + .../dal/mybatis/mapper/NpProjectMapper.java | 146 ++ .../mapper/NullLiteralDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/NullLiteralMapper.java | 139 ++ .../NumberOfLinesDynamicSqlSupport.java | 38 + .../mybatis/mapper/NumberOfLinesMapper.java | 153 ++ .../PackageStatementDynamicSqlSupport.java | 43 + .../mapper/PackageStatementMapper.java | 160 ++ .../mapper/ParameterDynamicSqlSupport.java | 53 + .../dal/mybatis/mapper/ParameterMapper.java | 174 ++ .../mapper/ParentDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/ParentMapper.java | 139 ++ .../PolyadicExpressionDynamicSqlSupport.java | 33 + .../mapper/PolyadicExpressionMapper.java | 146 ++ .../mapper/PrimitiveDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/PrimitiveMapper.java | 139 ++ .../mapper/ProgramDynamicSqlSupport.java | 28 + .../dal/mybatis/mapper/ProgramMapper.java | 139 ++ .../ReferenceElementDynamicSqlSupport.java | 38 + .../mapper/ReferenceElementMapper.java | 153 ++ .../ReferenceExpressionDynamicSqlSupport.java | 23 + .../mapper/ReferenceExpressionMapper.java | 132 ++ .../ReferenceListDynamicSqlSupport.java | 43 + .../mybatis/mapper/ReferenceListMapper.java | 160 ++ ...ferenceParameterListDynamicSqlSupport.java | 48 + .../mapper/ReferenceParameterListMapper.java | 167 ++ .../ReferenceRelationDynamicSqlSupport.java | 28 + .../mapper/ReferenceRelationMapper.java | 139 ++ .../ReferenceTypeDynamicSqlSupport.java | 33 + .../mybatis/mapper/ReferenceTypeMapper.java | 146 ++ .../mapper/ResourceListDynamicSqlSupport.java | 38 + .../mybatis/mapper/ResourceListMapper.java | 153 ++ .../ReturnStatementDynamicSqlSupport.java | 28 + .../mybatis/mapper/ReturnStatementMapper.java | 139 ++ .../mapper/StatementDynamicSqlSupport.java | 48 + ...tEnclosingExpressionDynamicSqlSupport.java | 28 + .../StatementEnclosingExpressionMapper.java | 139 ++ .../dal/mybatis/mapper/StatementMapper.java | 167 ++ .../StringLiteralDynamicSqlSupport.java | 28 + .../mybatis/mapper/StringLiteralMapper.java | 139 ++ ...uperAccessExpressionDynamicSqlSupport.java | 23 + .../mapper/SuperAccessExpressionMapper.java | 132 ++ ...onstructorInvocationDynamicSqlSupport.java | 23 + .../SuperConstructorInvocationMapper.java | 132 ++ .../SuperExpressionDynamicSqlSupport.java | 23 + .../mybatis/mapper/SuperExpressionMapper.java | 132 ++ ...ressionWithQualifierDynamicSqlSupport.java | 28 + .../SuperExpressionWithQualifierMapper.java | 139 ++ ...SwitchLabelStatementDynamicSqlSupport.java | 38 + .../mapper/SwitchLabelStatementMapper.java | 153 ++ .../SwitchStatementDynamicSqlSupport.java | 33 + .../mybatis/mapper/SwitchStatementMapper.java | 146 ++ ...ynchronizedStatementDynamicSqlSupport.java | 33 + .../mapper/SynchronizedStatementMapper.java | 146 ++ ...ThisAccessExpressionDynamicSqlSupport.java | 23 + .../mapper/ThisAccessExpressionMapper.java | 132 ++ ...ressionWithQualifierDynamicSqlSupport.java | 28 + .../ThisExpressionWithQualifierMapper.java | 139 ++ .../ThrowStatementDynamicSqlSupport.java | 33 + .../mybatis/mapper/ThrowStatementMapper.java | 146 ++ .../mapper/TokenDynamicSqlSupport.java | 38 + .../dal/mybatis/mapper/TokenMapper.java | 153 ++ ...StatementWithFinallyDynamicSqlSupport.java | 33 + .../mapper/TryStatementWithFinallyMapper.java | 146 ++ ...tementWithoutFinallyDynamicSqlSupport.java | 28 + .../TryStatementWithoutFinallyMapper.java | 139 ++ .../TypeCastExpressionDynamicSqlSupport.java | 28 + .../mapper/TypeCastExpressionMapper.java | 139 ++ .../mapper/TypeElementDynamicSqlSupport.java | 43 + .../dal/mybatis/mapper/TypeElementMapper.java | 160 ++ .../mapper/TypeLiteralDynamicSqlSupport.java | 33 + .../dal/mybatis/mapper/TypeLiteralMapper.java | 146 ++ .../TypeParameterDynamicSqlSupport.java | 53 + .../mybatis/mapper/TypeParameterMapper.java | 174 ++ .../UnaryExpressionDynamicSqlSupport.java | 38 + .../mybatis/mapper/UnaryExpressionMapper.java | 153 ++ .../WhileStatementDynamicSqlSupport.java | 33 + .../mybatis/mapper/WhileStatementMapper.java | 146 ++ .../YieldStatementDynamicSqlSupport.java | 33 + .../mybatis/mapper/YieldStatementMapper.java | 146 ++ .../mapper/clazzDynamicSqlSupport.java | 43 + .../dal/mybatis/mapper/clazzMapper.java | 160 ++ .../codequery/project/ProjectBuilder.java | 166 ++ .../alipay/codequery/project/ProjectUtil.java | 58 + .../alipay/codequery/project/PsiProject.java | 192 ++ .../com/alipay/codequery/util/LoggerUtil.java | 38 + .../com/alipay/codequery/util/PathUtil.java | 89 + .../com/alipay/codequery/util/PsiUtil.java | 452 +++++ .../src/main/resources/coref_db_ddl.sql | 739 ++++++++ .../src/main/resources/coref_java_src.db | Bin 0 -> 565248 bytes .../src/main/resources/generatorConfig.xml | 823 +++++++++ 456 files changed, 49145 insertions(+) create mode 100644 language/java/extractor/README.md create mode 100644 language/java/extractor/README_cn.md create mode 100644 language/java/extractor/pom.xml create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/Configuration.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/Extractor.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefDepExtractor.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefExtractor.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefURI.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/core/Runner.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SharedManager.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SignatureGenerator.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Annotation.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Class.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Comment.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Constructor.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Containers.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Expression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Field.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/File.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Folder.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Identifier.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Literal.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/LocalVariable.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Location.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Method.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Modifier.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Module.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Node.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpClass.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpFile.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpInterface.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpMethod.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpProject.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Package.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parameter.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/ParameterList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parent.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Primitive.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Program.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Statement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Type.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Variable.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/Commit.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefASTDumpStorage.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefCache.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/FileScopeCorefObject.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/IStorage.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/LocalCorefCache.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/OssCorefCache.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/RemoteCacheType.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteStorage2.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteUtil.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/util/CmdUtils.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ConvertCodeUtil.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/util/HashUtil.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/util/JudgeFileCharset.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ReadStream.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotatedRelation.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithName.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithoutName.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationArrayInitializer.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanNotResolved.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanResolved.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclaration.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameter.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameterDefaultValue.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnonymousClass.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Array.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayAccessExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayCreationExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayInitializerExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssertStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssignmentExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BinaryExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BlockStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BooleanLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BreakStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableBinding.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CatchSection.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CharacterLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassHierarchy.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassImplementList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassInitializer.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CodeBlock.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Comment.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConditionalExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Constructor.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConstructorInvocation.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContainerParent.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContinueStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Cupackage.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DeclarationElement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoWhileStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoubleLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Element.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyReferenceParameterList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EnumConstant.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Exception.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Expression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionListExpressionRelation.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Field.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/File.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileMd5Sum.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileSha256Sum.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FloatingPointLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Folder.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForeachStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Identifier.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithElse.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithoutElse.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportInfo.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticReferenceElement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InstanceofExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IntegerLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InterfaceInfo.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocComment.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocDataToken.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTag.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTagValue.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LabeledStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LambdaExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalClass.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalVariable.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Location.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LongLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Metainfo.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Method.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithType.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithoutType.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodReferenceExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Modifier.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ModifierList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Module.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NameString.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NewExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpClass.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpFile.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpInterface.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpMethod.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpProject.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NullLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NumberOfLines.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PackageStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parameter.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parent.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PolyadicExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Primitive.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Program.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceElement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceParameterList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceRelation.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceType.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ResourceList.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReturnStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Statement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StatementEnclosingExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StringLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperAccessExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperConstructorInvocation.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpressionWithQualifier.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchLabelStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SynchronizedStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisAccessExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisExpressionWithQualifier.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThrowStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Token.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithFinally.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithoutFinally.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeCastExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeElement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeLiteral.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeParameter.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/UnaryExpression.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/WhileStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/YieldStatement.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/clazz.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzDynamicSqlSupport.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzMapper.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectBuilder.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectUtil.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/project/PsiProject.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/util/LoggerUtil.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/util/PathUtil.java create mode 100644 language/java/extractor/src/main/java/com/alipay/codequery/util/PsiUtil.java create mode 100644 language/java/extractor/src/main/resources/coref_db_ddl.sql create mode 100644 language/java/extractor/src/main/resources/coref_java_src.db create mode 100644 language/java/extractor/src/main/resources/generatorConfig.xml diff --git a/language/java/extractor/README.md b/language/java/extractor/README.md new file mode 100644 index 00000000..859d8070 --- /dev/null +++ b/language/java/extractor/README.md @@ -0,0 +1,9 @@ +# Introduction +The codefuse-query java extractor transforms the source code of Java projects into standardized coref-java data, which is utilized for further analysis by codefuse-query. + +# Quick Start +1. Set `JAVA_HOME`. Execute `echo $JAVA_HOME` to display its current setting. If it displays as empty, then it has not been configured yet. +2. Build. Execute `mvn clean install`. +3. Run. Execute `java -jar target/java-extractor-1.0-SNAPSHOT-jar-with-dependencies.jar ${YOUR_JAVA_REPO} ./db`. + +After execution, a file named coref_java_src.db will be generated in the ./db directory. diff --git a/language/java/extractor/README_cn.md b/language/java/extractor/README_cn.md new file mode 100644 index 00000000..ee3b09e9 --- /dev/null +++ b/language/java/extractor/README_cn.md @@ -0,0 +1,9 @@ +# 介绍 +codefuse-query java extractor 将 java 项目的源码转化为 coref-java 标准化数据,用于codefuse-query的进一步分析。 + +# 快速开始 +1. 设置 JAVA_HOME。`echo $JAVA_HOME` 如果显示为空,则还没有设置好。 +2. 构建。 `mvn clean install`。 +3. 运行。 `java -jar target/java-extractor-1.0-SNAPSHOT-jar-with-dependencies.jar ${YOUR_JAVA_REPO} ./db` + +执行完成后,会在 ./db 目录下生成 coref_java_src.db 文件。 diff --git a/language/java/extractor/pom.xml b/language/java/extractor/pom.xml new file mode 100644 index 00000000..ae558719 --- /dev/null +++ b/language/java/extractor/pom.xml @@ -0,0 +1,258 @@ + + 4.0.0 + + com.alipay.tool + java-extractor + 0.2.0 + + jar + + coref-java-src-extractor + http://maven.apache.org + + + UTF-8 + 1.5.21 + + + + org.mybatis + mybatis + 3.5.7 + + + javax.annotation + javax.annotation-api + 1.3.2 + + + org.mybatis.dynamic-sql + mybatis-dynamic-sql + 1.3.0 + + + commons-codec + commons-codec + 1.15 + + + com.ibm.icu + icu4j + 59.1 + + + + org.apache.commons + commons-lang3 + 3.12.0 + + + + org.projectlombok + lombok + 1.18.20 + provided + + + me.tongfei + progressbar + 0.9.2 + + + + org.jetbrains + annotations + 22.0.0 + + + uk.com.robust-it + cloning + 1.9.12 + + + + com.google.code.gson + gson + 2.8.8 + + + com.google.guava + guava + 30.1.1-jre + + + org.hamcrest + hamcrest-all + 1.3 + + + com.google.re2j + re2j + 1.6 + + + org.jetbrains.kotlin + kotlin-compiler-embeddable + ${kotlin.version.coref} + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version.coref} + + + org.jetbrains.kotlin + kotlin-script-runtime + ${kotlin.version.coref} + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version.coref} + + + + net.java.dev.jna + jna + 4.1.0 + + + + org.xerial + sqlite-jdbc + 3.36.0.2 + + + + tk.mybatis + mapper + 4.1.5 + + + org.junit.jupiter + junit-jupiter + 5.9.1 + test + + + info.picocli + picocli + 4.6.1 + + + org.apache.logging.log4j + log4j-core + 2.14.1 + + + org.apache.logging.log4j + log4j-api + 2.14.1 + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.14.1 + + + + commons-io + commons-io + 2.8.0 + + + commons-collections + commons-collections + 3.2.2 + + + com.aliyun.oss + aliyun-sdk-oss + 3.10.2 + + + org.apache.commons + commons-compress + 1.18 + + + com.alibaba + fastjson + 1.2.72_noneautotype + + + org.ini4j + ini4j + 0.5.4 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 8 + 8 + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.4.0 + + false + true + + + + org.xerial + sqlite-jdbc + 3.36.0.1 + + + tk.mybatis + mapper + 4.1.5 + + + + + Generate MyBatis Artifacts + + generate + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + + com.alipay.codequery.Extractor + + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + + + diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/Configuration.java b/language/java/extractor/src/main/java/com/alipay/codequery/Configuration.java new file mode 100644 index 00000000..37fd069c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/Configuration.java @@ -0,0 +1,87 @@ +package com.alipay.codequery; + +import com.alipay.codequery.project.ProjectUtil; +import com.alipay.codequery.util.PathUtil; +import lombok.Getter; +import org.jetbrains.annotations.NotNull; + +import java.io.File; +import java.util.*; + + +public class Configuration implements Cloneable { + + public final String commitId = "init"; + public final String repository = "Not Specified"; + public List sourcepath = new ArrayList<>(); + public String javaHome = null; + public List classpath = new ArrayList<>(); + + @Getter + private final @NotNull Collection kotlinFiles = new HashSet<>(); + @Getter + private final @NotNull Collection javaFiles = new HashSet<>(); + @Getter + private final @NotNull Set javaDirs = new HashSet<>(); + @Getter + private final List classFiles = new ArrayList<>(); + + /** + * MENTION: we allow multiple source paths exist but we ONLY use the first one as root + */ + public String getSourcePath() { + return sourcepath.get(0); + } + + public void prepareFile() { + clearExistedFiles(); + + // jar class path + ProjectUtil.getClassPaths(this.classpath).stream().map(File::new).forEach(classFiles::add); + + // source file path + for (String sourceRoot : sourcepath) { + File file = new File(sourceRoot).getAbsoluteFile(); + withJavaSrc(file); + withKotlinSrc(file); + } + } + + public void withKotlinSrc(File root) { + ArrayList results = new ArrayList<>(); + + PathUtil.TraverseBuilder traversal = new PathUtil.TraverseBuilder() + .withSymbol(false) + .withDirInResult(false) + .withSuffix(".kt"); + traversal.traverse(root, results); + + kotlinFiles.addAll(results); + } + + + public void withJavaSrc(File root) { + ArrayList results = new ArrayList<>(); + PathUtil.TraverseBuilder traversal = new PathUtil.TraverseBuilder() + .withSymbol(false) + .withDirInResult(true) + .withSuffix(".java"); + traversal.traverse(root, results); + + for (File file : results) { + if (file.isDirectory()) { + javaDirs.add(file); + } else { + javaFiles.add(file); + } + } + } + + private void clearExistedFiles() { + javaFiles.clear(); + javaDirs.clear(); + kotlinFiles.clear(); + classFiles.clear(); + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/Extractor.java b/language/java/extractor/src/main/java/com/alipay/codequery/Extractor.java new file mode 100644 index 00000000..9f9ed712 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/Extractor.java @@ -0,0 +1,245 @@ +package com.alipay.codequery; + +import com.alipay.codequery.coref.storage.CorefCache; +import com.alipay.codequery.coref.storage.LocalCorefCache; +import com.alipay.codequery.coref.storage.OssCorefCache; +import com.alipay.codequery.coref.storage.RemoteCacheType; +import com.alipay.codequery.coref.util.ConvertCodeUtil; +import com.alipay.codequery.project.PsiProject; +import com.alipay.codequery.project.ProjectBuilder; +import com.alipay.codequery.util.LoggerUtil; +import com.alipay.codequery.coref.core.Runner; +import com.alipay.codequery.coref.core.SharedManager; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.kotlin.com.intellij.openapi.util.io.FileUtil; +import picocli.CommandLine; +import picocli.CommandLine.Command; +import picocli.CommandLine.Parameters; + +import java.io.*; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.Callable; +import java.util.stream.Collectors; + +@Command(name = "extract", mixinStandardHelpOptions = true, version = "extract 1.0", + description = "extract COREF-Java db from a src directory.") +@Slf4j +public class Extractor implements Callable { + private static final Logger logger = LogManager.getLogger(Extractor.class); + + public static final int DEFAULT_WORKER_COUNT = Integer.min(Runtime.getRuntime().availableProcessors(), 8); + + public static Configuration configuration = new Configuration(); + + // Arguments and Options + @Parameters(index = "0", description = "The source directory to extract.") + private File srcRootDir; + + @Parameters(index = "1", description = "The output directory for the DB file.") + private File dbDir; + + @CommandLine.Option(names = {"-w", "--white-list"}, description = "The white list to extract.", required = false) + private File whiteList; + + @CommandLine.Option(names = {"-p", "--parallel"}, description = "Set run in parallel (threads)") + public boolean parallelRequested = false; + + @CommandLine.Option(names = {"--commit"}, description = "current repo's commit") + public String commitId; + + @CommandLine.Option(names = {"--incremental"}, description = "enable incremental extract") + public boolean incremental = false; + + @CommandLine.Option(names = {"--cache-dir"}, description = "cache dir") + public String cacheDir; + + @CommandLine.Option(names = {"--remote-cache-type"}, description = "remote cache type. eg. oss") + public String remoteCacheTypeName; + + @CommandLine.Option(names = {"--oss-bucket"}, description = "oss bucket") + public String ossBucket; + + @CommandLine.Option(names = {"--oss-config-file"}, description = "oss config file") + public File ossConfigFile; + + @CommandLine.Option(names = {"--oss-path-prefix"}, description = "oss path prefix, should end with '/'.") + public String ossPathPrefix; + + @CommandLine.Option(names = {"--verbose"}, description = "Set run with verbose") + public boolean verbose = false; + + @CommandLine.Option(names = {"-j", "--workers"}, description = "Set run worker limit") + public int workerCount = DEFAULT_WORKER_COUNT; + + @CommandLine.Option(names = {"--java-home"}, description = "JDK Home") + public String javaHome = System.getenv("JAVA_HOME"); + + @CommandLine.Option(names = {"-cp", "--classpath"}, description = "PSI class path") + public String classPath; + + @CommandLine.Option(names = {"--dump-coref-ast-path"}, description = "The path of dumped coref ast") + public String corefASTPath; + + @Override + public Integer call() throws Exception { // your business logic goes here... + long start = System.currentTimeMillis(); + if (verbose) { + LoggerUtil.initLogger(Level.DEBUG); + } else { + LoggerUtil.initLogger(Level.INFO); + } + + // Exit if JAVA_HOME is not set + if (javaHome == null) { + logger.error("Missing JAVA_HOME!"); + return 3; + } + + log.info("start extracting with root: {}", srcRootDir.getAbsolutePath()); + log.info("java home: {}", javaHome); + + // Why set configuration here but use configuration.sourcePath later? + configuration.sourcepath = Collections.singletonList(srcRootDir.getAbsolutePath()); + configuration.javaHome = javaHome; + configuration.classpath = parseClassPath(classPath); + // must do this prepare + configuration.prepareFile(); + + // Regular the file codec + configuration.getJavaFiles().forEach(file -> { + try { + ConvertCodeUtil.normCodecToUTF8ForFile(file); + } catch (IOException e) { + e.printStackTrace(); + } + }); + + // Make a builder + // The inner will scan and include all Java Src files and so on + ProjectBuilder projectBuilder = ProjectBuilder.getInstance(configuration, false); + projectBuilder.shouldBuildResolveInfo(true); + + // Build the project + PsiProject basicProject = projectBuilder.createProject(); + SharedManager.clear(); + + List whiteFiles = null; + if (whiteList != null) { + whiteFiles = getWhiteList(whiteList).stream() + .map(file -> Paths.get(file).toFile()).collect(Collectors.toList()); + } + + // Create dbDir if it not exists + if (this.corefASTPath == null){ + FileUtil.createDirectory(dbDir); + } + + // Run to analyse + try { + if (this.corefASTPath != null){ + // corefASTPath抽取只使用sequenceAnalyse,其他的分析方式不支持 + Runner runner = new Runner(configuration, basicProject, whiteFiles, srcRootDir); + runner.sequenceDumpCorefAST(this.corefASTPath); + } + else if (whiteFiles != null ) { + Runner runner = new Runner(configuration, basicProject, whiteFiles, srcRootDir); + runner.sequenceAnalyse(dbDir.toString(), "coref_java_src.db"); + } else { + List allFiles = basicProject.allJavaPaths().collect(Collectors.toList()); + Runner runner = new Runner(configuration, basicProject, allFiles, srcRootDir); + if (incremental) { + if (StringUtils.isBlank(cacheDir) || "null".equals(cacheDir)) { + throw new IllegalArgumentException("please specify cacheDir when incremental analyse."); + } + if (StringUtils.isBlank(commitId) || "null".equals(commitId)) { + throw new IllegalArgumentException("please specify commitId when incremental analyse."); + } + File cacheDirFile = new File(cacheDir); + if (!cacheDirFile.exists()) { + cacheDirFile.mkdirs(); + } + CorefCache remoteCorefCache = null; + if (RemoteCacheType.oss.name().equals(remoteCacheTypeName)) { + remoteCorefCache = new OssCorefCache(ossPathPrefix, cacheDirFile, ossBucket, ossConfigFile); + } + CorefCache corefCache = new LocalCorefCache(cacheDirFile, remoteCorefCache); + runner.incrementalAnalyse(dbDir.toString(), "coref_java_src.db", corefCache, commitId); + } else if (parallelRequested) { + String uuid = UUID.randomUUID().toString(); + Path pathPrefix = Paths.get(dbDir.getAbsolutePath(), uuid).toAbsolutePath(); + FileUtil.createDirectory(pathPrefix.toFile()); + runner.parallelAnalyse(pathPrefix.toString(), workerCount, dbDir.toString(), "coref_java_src.db"); + } else { + runner.sequenceAnalyse(dbDir.toString(), "coref_java_src.db"); + } + } + } catch (Exception e) { + log.error("extracting get error!", e); + return 1; + } + + + log.info("Time to completion (TTC): {}", (System.currentTimeMillis() - start)/1000 + "s"); + return 0; + } + + public static void main(String... args) { + int exitCode = new CommandLine(new Extractor()).execute(args); + System.exit(exitCode); + } + + // Get the white list from the #2 command parameter + private static List getWhiteList(@NotNull File whiteList) { + List whiteListFiles = new ArrayList<>(); + + try { + // Read the input file. + FileInputStream inputStream = new FileInputStream(whiteList); + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); + + String relativePath = null; + + // Read the file line by line and insert it into the list. + while ((relativePath = bufferedReader.readLine()) != null) { + whiteListFiles.add(relativePath); + } + // Close inputStream and bufferedReader. + inputStream.close(); + bufferedReader.close(); + + } catch (IOException e) { + System.err.println(e); + } + // Return the white list. + return whiteListFiles; + } + + + private List parseClassPath(String classPath) { + List classPathList = new ArrayList<>(); + if (classPath == null || classPath.isEmpty()) { + return classPathList; + } + String[] classPathArr = classPath.split(":"); + for (String singleClassPath: classPathArr) { + if (singleClassPath.isEmpty()) { + continue; + } + if (!(new File(singleClassPath)).exists()) { + continue; + } + classPathList.add(singleClassPath); + } + return classPathList; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefDepExtractor.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefDepExtractor.java new file mode 100644 index 00000000..b650b996 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefDepExtractor.java @@ -0,0 +1,207 @@ +package com.alipay.codequery.coref.core; + +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.coref.storage.IStorage; +import com.alipay.codequery.coref.util.HashUtil; +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.util.PsiUtil; +import com.alipay.codequery.coref.model.*; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.kotlin.com.intellij.psi.*; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class CorefDepExtractor { + private static final ConcurrentHashMap NP_PROJECT_ID_MAP = new ConcurrentHashMap<>(); + // ATTENTION: PSI resolve dependencies in different thread independently + // so multi psi objects may represent same element + // we should create two cache for each category psi object + // the first cache save psi object and its hash id + // the second cache save hash id present or not + private static final ConcurrentHashMap PSI_FILE_NP_FILE_ID_MAP = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap NP_FILE_ID_MAP = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap PSI_CLASS_NP_CLASS_ID_MAP = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap NP_CLASS_ID_MAP = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap PSI_METHOD_NP_METHOD_ID_MAP = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap NP_METHOD_ID_MAP = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap PARENT_MAP = new ConcurrentHashMap<>(); + + /* + string: com/google/code/gson/gson/2.10/gson-2.10.jar!/com/google/gson/Gson.class + matching result: gson-2.10.jar + the regular expression match string with pattern: + 1. start with a '/' char, not included, just match position (零宽正回顾后发断言) + 2. followed by char sequence, contains at least one char, the char can't be '/' + 3. end with a '!' char, not included, just match position (零宽正向先行断言) + */ + private static final Pattern DEP_NAME_PATTERN = Pattern.compile("(?<=/)[^/]+?(?=!)"); + + public static Long extractNpProject(IStorage storage, String project) { + return NP_PROJECT_ID_MAP.computeIfAbsent(project, (k) -> { + String corefURI = CorefURI.generate("depedency", "java", project); + Long hashId = HashUtil.hashString(corefURI); + NpProject npProject = new NpProject(hashId); + npProject.name = project; + int dotPos = project.lastIndexOf('.'); + if (dotPos != -1 && (dotPos + 1) < project.length()) { + npProject.extension = project.substring(dotPos + 1); + } else { + npProject.extension = "default"; + } + storage.storeNpProject(npProject); + return hashId; + }); + } + + public static Long extractNpFile(IStorage storage, PsiFile file) { + return PSI_FILE_NP_FILE_ID_MAP.computeIfAbsent(file, (k) -> { + Long hashId = getHashId(file); + AtomicBoolean contains = new AtomicBoolean(true); + NP_FILE_ID_MAP.computeIfAbsent(hashId, (id) -> { + contains.set(false); + return Boolean.TRUE; + }); + if (!contains.get()) { + NpFile npFile = new NpFile(hashId); + npFile.name = file.getName(); + String[] depNameAndFilePath = getDepNameAndFilePath(file); + if (depNameAndFilePath != null) { + npFile.qualifiedName = depNameAndFilePath[1]; + int slashPos = npFile.qualifiedName.lastIndexOf('/'); + if (slashPos != -1 && (slashPos + 1) < npFile.qualifiedName.length()) { + npFile.name = npFile.qualifiedName.substring(slashPos + 1); + } else { + npFile.name = npFile.qualifiedName; + } + + npFile.projectId = extractNpProject(storage, depNameAndFilePath[0]); + } else { + npFile.qualifiedName = "default"; + npFile.name = "default"; + npFile.projectId = (long) -1; + } + storage.storeNpFile(npFile); + } + return hashId; + }); + } + + public static Long extractNpClass(IStorage storage, PsiClass clazz) { + return PSI_CLASS_NP_CLASS_ID_MAP.computeIfAbsent(clazz, (k) -> { + Long hashId = getHashId(clazz); + AtomicBoolean contains = new AtomicBoolean(true); + NP_CLASS_ID_MAP.computeIfAbsent(hashId, (id) -> { + contains.set(false); + return Boolean.TRUE; + }); + if (!contains.get()) { + extractNpElement(storage, clazz.getParent()); + if (clazz.isInterface()) { + NpInterface npInterface = new NpInterface(hashId); + npInterface.name = clazz.getName(); + npInterface.qualifiedName = clazz.getQualifiedName(); + npInterface.parent = getParent(clazz); + storage.storeNpInterface(npInterface); + } else { + NpClass npClass = new NpClass(hashId); + npClass.name = clazz.getName(); + npClass.qualifiedName = clazz.getQualifiedName(); + npClass.parent = getParent(clazz); + storage.storeNpClass(npClass); + } + } + return hashId; + }); + } + + public static Long extractNpMethod(IStorage storage, PsiMethod method) { + return PSI_METHOD_NP_METHOD_ID_MAP.computeIfAbsent(method, (k) -> { + Long hashId = getHashId(k); + AtomicBoolean contains = new AtomicBoolean(true); + NP_METHOD_ID_MAP.computeIfAbsent(hashId, (id) -> { + contains.set(false); + return Boolean.TRUE; + }); + // hash id does not exist + if (!contains.get()) { + extractNpElement(storage, method.getParent()); + NpMethod npMethod = new NpMethod(hashId); + npMethod.name = method.getName(); + npMethod.signature = PsiUtil.mangleMethodName(method); + npMethod.returnType = SharedManager.getType(storage, method.getReturnType()); + npMethod.parent = getParent(method); + storage.storeNpMethod(npMethod); + } + return hashId; + }); + } + + public static Long extractNpElement(IStorage storage, PsiElement element) { + if (element instanceof PsiFile) { + return extractNpFile(storage, (PsiFile) element); + } else if (element instanceof PsiClass) { + return extractNpClass(storage, (PsiClass) element); + } else if (element instanceof PsiMethod) { + return extractNpMethod(storage, (PsiMethod) element); + } + assert false: "Element's type: " + element.getClass().toString(); + return Long.valueOf(-1); + } + + /** + * Get dependency name and psi file path. + * psi virtual file path: "com/google/code/gson/gson/2.10/gson-2.10.jar!/com/google/gson/Gson.class" + * return value: ["gson-2.10.jar", "/com/google/gson/Gson.class"] + * @param psiFile + * @return null or an array with 2 elements [dependency name, psi file path] + */ + private static String[] getDepNameAndFilePath(@NotNull PsiFile psiFile) { + assert psiFile != null; + String[] depNameAndFilePath = null; + if (psiFile != null && psiFile.getVirtualFile() != null) { + String virtualPath = psiFile.getVirtualFile().getPath(); + Matcher matcher = DEP_NAME_PATTERN.matcher(virtualPath); + if (matcher.find() && (matcher.end(0) + 1) < virtualPath.length()) { + depNameAndFilePath = new String[2]; + depNameAndFilePath[0] = matcher.group(); + depNameAndFilePath[1] = virtualPath.substring(matcher.end(0) + 1); + } + } + return depNameAndFilePath; + } + + private static Long getHashId(PsiElement element) { + if (element == null) { + return Long.valueOf(-1); + } + String signature = SignatureGenerator.generate(element); + String repo = "default"; + String path = "default"; + PsiFile psiFile = element.getContainingFile(); + String[] depNameAndFilePath = getDepNameAndFilePath(psiFile); + if (depNameAndFilePath != null) { + repo = depNameAndFilePath[0]; + path = depNameAndFilePath[1]; + } + String corefURIString = CorefURI.generate(repo, path, signature); + return HashUtil.hashString(corefURIString); + } + + private static Parent getParent(PsiElement element) { + return PARENT_MAP.computeIfAbsent(element, (k) -> { + PsiElement psiParent = PsiUtil.getPsiParent(element); + Parent parent = new Parent(getHashId(psiParent)); + if (psiParent != null) { + String temp = psiParent.toString(); + temp = temp.startsWith("Psi") ? temp.substring(3) : temp; + parent.parentType = temp.contains(":") ? temp.substring(0, temp.indexOf(":")) : temp; + } else { + parent.parentType = ""; + } + return parent; + }); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefExtractor.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefExtractor.java new file mode 100644 index 00000000..1b8ecc75 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefExtractor.java @@ -0,0 +1,1610 @@ +package com.alipay.codequery.coref.core; + +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.coref.model.Class; +import com.alipay.codequery.coref.model.Comment; +import com.alipay.codequery.coref.model.Expression; +import com.alipay.codequery.coref.model.Identifier; +import com.alipay.codequery.coref.model.Location; +import com.alipay.codequery.coref.model.Method; +import com.alipay.codequery.coref.model.Modifier; +import com.alipay.codequery.coref.model.Package; +import com.alipay.codequery.coref.model.Parameter; +import com.alipay.codequery.coref.model.Statement; +import com.alipay.codequery.coref.storage.IStorage; +import com.alipay.codequery.coref.util.HashUtil; +import com.alipay.codequery.dal.mybatis.domain.*; +import com.alipay.codequery.project.PsiProject; +import com.alipay.codequery.util.PathUtil; +import com.alipay.codequery.util.PsiUtil; +import com.alipay.codequery.coref.model.Annotation; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.kotlin.com.intellij.openapi.editor.Document; +import org.jetbrains.kotlin.com.intellij.openapi.util.TextRange; +import org.jetbrains.kotlin.com.intellij.openapi.util.text.StringUtil; +import org.jetbrains.kotlin.com.intellij.psi.*; +import org.jetbrains.kotlin.com.intellij.psi.impl.source.PsiClassReferenceType; +import org.jetbrains.kotlin.com.intellij.psi.javadoc.*; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CorefExtractor extends JavaRecursiveElementVisitor { + private static final Logger logger = LogManager.getLogger(CorefExtractor.class); + + // TODO hold PSI File may cause high memory usage + private final PsiFile file; + private final Document document; + private final String repoDir; + private final PsiProject project; + private final com.alipay.codequery.coref.model.Program program; + private final IStorage corefStorage; + public String fileMD5cached; + public String fileSHA256cached; + final Map locationMap = new HashMap<>(); + final Map parentMap = new HashMap<>(); + final HashMap lineTag = new HashMap<>(); + private CorefURI corefURI; + + public CorefExtractor(PsiProject project, String repoDir, PsiFile file, IStorage corefStorage, com.alipay.codequery.coref.model.Program program, CorefURI corefURI) { + this.project = project; + this.repoDir = repoDir; + this.file = file; + this.document = project.documentOf(file); + this.corefStorage = corefStorage; + this.program = program; + fileSHA256cached = HashUtil.getFileSHA1(file.getVirtualFile().getCanonicalPath()); + fileMD5cached = HashUtil.getFileMD5(file.getVirtualFile().getCanonicalPath()); + classifyJavaLines(file); + this.corefURI = corefURI; + String relativePath = PathUtil.getRelPath(repoDir, file.getVirtualFile().getPath()); + this.corefURI.setPath(relativePath); + } + + public void classifyJavaLines(PsiFile file) { + BufferedReader reader = null; + FileReader fileReader = null; + try { + fileReader = new FileReader(file.getVirtualFile().getCanonicalPath()); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + reader = new BufferedReader(fileReader); + String line = null; + int count = 1; + try { + while ((line = reader.readLine()) != null) { + line = line.trim(); + if (line.isEmpty()) { + lineTag.put(count, "Empty"); + } else if (line.startsWith("//") || (line.startsWith("/*")) || (line.startsWith("*")) || (line.endsWith("*/"))) { + lineTag.put(count, "Comment"); + } + count++; + } + if (file.getText().endsWith("")) { + lineTag.put(count, "Empty"); + } + reader.close(); + fileReader.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void getValidJavaLines(Location.LocalLocation location, long id) { + int startLineNumber = location.startLineNumber; + int endLineNumber = location.endLineNumber; + int numberOfEmptyLines = 0; + int numberOfCommentLines = 0; + int totalLines = endLineNumber - startLineNumber + 1; + for (int i = startLineNumber; i <= endLineNumber; i++) { + if (lineTag.containsKey(i)) { + if (lineTag.get(i).equals("Empty")) { + numberOfEmptyLines++; + } else if (lineTag.get(i).equals("Comment")) { + numberOfCommentLines++; + } + } + } + Location.NumberOfLines numberOfLines = new Location.NumberOfLines(id); + numberOfLines.numberOfLines = totalLines; + numberOfLines.numberOfCodeLines = totalLines - numberOfEmptyLines - numberOfCommentLines; + numberOfLines.numberOfCommentLines = numberOfCommentLines; + corefStorage.storeNumberOfLines(numberOfLines); + } + + public Long getHashId(PsiElement element) { + if( element != null) { + String signature = SignatureGenerator.generate(element); + String path = corefURI.getPath(); + + //when a resolved element is from another file, needs to use its real file path. + if(element.getContainingFile() != null && element.getContainingFile().getVirtualFile() != null) { + if(!(element.getContainingFile().equals(file))){ + path = PathUtil.getRelPath(repoDir, element.getContainingFile().getVirtualFile().getPath()); + } + } + + String corefURIString = CorefURI.generate(corefURI.getRepository(), path, signature); + return HashUtil.hashString(corefURIString); + } else { + return Long.valueOf(-1); + } + } + + //subclass of reference expression. + @Override + public void visitMethodReferenceExpression(PsiMethodReferenceExpression expression) { + super.visitMethodReferenceExpression(expression); + com.alipay.codequery.coref.model.Expression.MethodCallExpression methodReferenceExpression = new com.alipay.codequery.coref.model.Expression.MethodCallExpression(getHashId(expression)); + + PsiElement resolvedMethod = expression.getPotentiallyApplicableMember(); + Long calleeId = null; + if(isPhysicalValidElement(resolvedMethod)) { + calleeId = getHashId(resolvedMethod); + } + // else if (resolvedMethod != null) { + // calleeId = CorefDepExtractor.extractNpElement(corefStorage, resolvedMethod); + // } + if (calleeId != null) { + CallableBinding callableBinding = new CallableBinding(methodReferenceExpression.hashId, calleeId); + corefStorage.storeCallableBinding(callableBinding); + } + + methodReferenceExpression.isConstructor = expression.isConstructor() ? 1 : 0; + corefStorage.storeMethodReferenceExpression(methodReferenceExpression); + } + + public Location.LocalLocation calculateLocalLocation(Document document, PsiElement element) { + TextRange textRange = element.getTextRange(); + int startOffset = textRange.getStartOffset(); + int startLineNumber = document.getLineNumber(startOffset); + int startColumnNumber = startOffset - document.getLineStartOffset(startLineNumber); + if (element instanceof PsiClass && ((PsiClass) element).getNameIdentifier() != null) { + TextRange textRange1 = ((PsiClass) element).getNameIdentifier().getTextRange(); + startOffset = textRange1.getStartOffset(); + startLineNumber = document.getLineNumber(startOffset); + } + int endOffset = textRange.getEndOffset(); + int endLineNumber = document.getLineNumber(endOffset); + int endColumnNumber = endOffset - document.getLineStartOffset(endLineNumber); + return new Location.LocalLocation(startLineNumber + 1, startColumnNumber + 1, endLineNumber + 1, endColumnNumber + 1); + } + + public Location calculateLocation(Document document, PsiElement element) { + if (element instanceof PsiFile) { + return null; + } else { + // If the Location has been calculated before, return it directly. + if (locationMap.containsKey(element.getTextRange())) { + return new Location(locationMap.get(element.getTextRange())); + } else { + PsiFile containingFile = element.getContainingFile(); + com.alipay.codequery.coref.model.File file1 = new com.alipay.codequery.coref.model.File(getHashId(containingFile)); + + // Generate the element's location hash id if not exists. + Long hashId = getLocationHashId(element); + locationMap.put(element.getTextRange(), hashId); + + // If the element is resolved, the document should be generated again. + if (!(element.getContainingFile().equals(file))) { + document = project.documentOf(containingFile); + } + Location.LocalLocation localLocation = calculateLocalLocation(document, element); + getValidJavaLines(localLocation, hashId); + Location location = new Location(hashId, file1, localLocation); + corefStorage.storeLocation(location); + return location; + } + } + } + + // Generate location hash id. + public Long getLocationHashId(PsiElement element) { + return CorefURI.generateHashId(corefURI.getRepository(), corefURI.getPath(), SignatureGenerator.generate(element)); + } + + @Override + public void visitInstanceOfExpression(PsiInstanceOfExpression expression) { + super.visitInstanceOfExpression(expression); + com.alipay.codequery.coref.model.Expression.InstanceOfExpression instanceOfExpression = new com.alipay.codequery.coref.model.Expression.InstanceOfExpression(getHashId(expression)); + //type element + instanceOfExpression.checkType = expression.getCheckType() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(expression.getCheckType())) : new com.alipay.codequery.coref.model.Expression((long) -1); + //expression + instanceOfExpression.operand = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getOperand())); + //typetestpattern, parent of checktype + instanceOfExpression.pattern = expression.getPattern() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(expression.getPattern())) : new com.alipay.codequery.coref.model.Expression((long) -1); + instanceOfExpression.location = calculateLocation(document, expression); + corefStorage.storeInstanceOfExpression(instanceOfExpression); + } + + @Override + public void visitAnnotationArrayInitializer(PsiArrayInitializerMemberValue initializer) { + super.visitAnnotationArrayInitializer(initializer); + com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression aExpression = new com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression(getHashId(initializer)); + aExpression.debug_message = initializer.getText(); + aExpression.parent = getParent(initializer); //PsiArrayInitializerMemberValue element. + aExpression.location = calculateLocation(document, initializer); + corefStorage.storeAnnotationArrayInitializer(aExpression); + } + + //PsiImportStaticStatement extends PsiImportStatementBase extends PsiElement + @Override + public void visitImportStaticStatement(PsiImportStaticStatement statement) { + super.visitImportStaticStatement(statement); + com.alipay.codequery.coref.model.Statement.ImportStatement importStatement = new com.alipay.codequery.coref.model.Statement.ImportStatement(getHashId(statement)); + importStatement.reference = new com.alipay.codequery.coref.model.Statement(getHashId(statement.getImportReference())); + importStatement.debug_message = statement.getText(); + importStatement.parent = getParent(statement); + importStatement.location = calculateLocation(document, statement); + corefStorage.storeImportStaticStatement(importStatement); + } + + @Override + public void visitImportStaticReferenceElement(PsiImportStaticReferenceElement reference) { + super.visitImportStaticReferenceElement(reference); + com.alipay.codequery.coref.model.Expression importReference = new com.alipay.codequery.coref.model.Expression(getHashId(reference)); + importReference.debug_message = reference.getQualifiedName(); + importReference.parent = getParent(reference); + importReference.location = calculateLocation(document, reference); + corefStorage.storeImportStaticReferenceElement(importReference); + if (isPhysicalValidElement(reference.resolve())) { + PsiElement definition = reference.resolve(); + ReferenceRelation referenceRelation = new ReferenceRelation(getHashId(reference), getHashId(definition)); + corefStorage.storeReferenceRelation(referenceRelation); + } + } + + @Override + public void visitAnnotation(PsiAnnotation annotation) { + super.visitAnnotation(annotation); + Annotation.AnnotationModel annotations = new Annotation.AnnotationModel(getHashId(annotation)); + annotations.name = new com.alipay.codequery.coref.model.Identifier(annotation.getNameReferenceElement().getText(), getHashId(annotation.getNameReferenceElement())); + annotations.qualifiedName = annotation.getQualifiedName() != null ? annotation.getQualifiedName() : "-1"; + annotations.location = calculateLocation(document, annotation); + annotations.parent = getParent(annotation); + annotations.debug_message = annotation.getText(); + + if (isPhysicalValidElement(annotation.resolveAnnotationType())) { + annotations.resolveAnnotationType = new Node(getHashId(annotation.resolveAnnotationType())); + corefStorage.storeAnnotationCanResolved(annotations); + } else { + corefStorage.storeAnnotationCanNotResolved(annotations); + } + + if (annotation.getParent() instanceof PsiModifierList) { + AnnotatedRelation annoRelation = new AnnotatedRelation(); + annoRelation.setAnnotationHashId(annotations.hashId); + annoRelation.setAnnotatedItemHashId(getHashId(annotation.getParent().getParent())); + corefStorage.storeAnnotatedRelation(annoRelation); + } + + } + + @Deprecated + private void processAnnotationType(PsiClass annotationType) { + boolean shouldVisit = false; + synchronized (SharedManager.RESOLVED_ANNOTATION_SET) { + @Nullable String name = annotationType.getQualifiedName(); + if (SharedManager.RESOLVED_ANNOTATION_SET.contains(name)) { + shouldVisit = false; + } else { + SharedManager.RESOLVED_ANNOTATION_SET.add(name); + shouldVisit = true; + } + } + if (shouldVisit) { + visitAnnotationDeclaration(annotationType); + } + } + + @Override + public void visitAnnotationMethod(PsiAnnotationMethod method) { + super.visitAnnotationMethod(method); + Annotation.AnnotationParameter parameter = new Annotation.AnnotationParameter(getHashId(method)); + parameter.debug_message = method.getText(); + parameter.location = calculateLocation(document, method); + parameter.type = getType(method.getReturnType()); + parameter.parent = getParent(method); + parameter.name = new com.alipay.codequery.coref.model.Identifier(method.getName(), getHashId(method.getNameIdentifier())); + corefStorage.storeAnnotationDeclarationParameter(parameter); + + if (method.getDefaultValue() != null) { + AnnotationDeclarationParameterDefaultValue parameterDefaultValue = new AnnotationDeclarationParameterDefaultValue(); + parameterDefaultValue.setDefaultValue(method.getDefaultValue().getText()); + parameterDefaultValue.setElementHashId(parameter.hashId); + corefStorage.storeAnnotationDeclarationParameterDefaultValue(parameterDefaultValue); + } + } + + public void generateFileCache(com.alipay.codequery.coref.model.File file) { + FileMd5Sum fileMd5 = new FileMd5Sum(); + fileMd5.setFileHashId(file.hashId); + fileMd5.setValue(fileMD5cached); + corefStorage.storeFileMd5Sum(fileMd5); + + FileSha256Sum fileSha256Sum = new FileSha256Sum(); + fileSha256Sum.setFileHashId(file.hashId); + fileSha256Sum.setValue(fileSHA256cached); + corefStorage.storeFileSHA256Sum(fileSha256Sum); + } + + @Override + public void visitReferenceParameterList(PsiReferenceParameterList list) { + super.visitReferenceParameterList(list); + if (!(list.getText().isEmpty())) { + ParameterList.ReferenceParameterList referenceParameterList = new ParameterList.ReferenceParameterList(getHashId(list)); + referenceParameterList.parent = getParent(list); + referenceParameterList.location = calculateLocation(document, list); + referenceParameterList.debug_message = list.getText(); + + if(referenceParameterList.debug_message.equals("<>")){ + // The list is "<>". + corefStorage.storeEmptyReferenceParameterlist(referenceParameterList); + } else { + referenceParameterList.types = new Type[list.getTypeParameterElements().length]; + for (int i = 0; i < list.getTypeParameterElements().length; i++) { + referenceParameterList.types[i] = new Type(getHashId(list.getTypeParameterElements()[i])); + corefStorage.storeReferenceParameterlist(referenceParameterList, i); + } + } + } + } + + @Override + public void visitFile(@NotNull PsiFile file) { + super.visitFile(file); + String absolutePath = file.getVirtualFile().getCanonicalPath(); + com.alipay.codequery.coref.model.File files = new com.alipay.codequery.coref.model.File(getHashId(file)); + generateFileCache(files); + char head = repoDir.charAt(0); + String relativePath; + switch (head) { + case '/': + relativePath = absolutePath.substring(repoDir.length() + 1); + break; + case '.': + relativePath = absolutePath.substring(absolutePath.indexOf(repoDir) + 2); + break; + default: + relativePath = absolutePath.substring(absolutePath.indexOf(repoDir)); + } + files.qualifiedName = relativePath; + files.name = file.getName(); + files.extension = file.getLanguage().getDisplayName(); + files.program = program; + files.numberOfLines = new Location.NumberOfLines(getLocationHashId(file)); + getValidJavaLines(calculateLocalLocation(document, file), files.numberOfLines.hashId); + if (SharedManager.FILE_MAP.containsKey(absolutePath)) { + ContainerParent containerParent = new ContainerParent(files.hashId, SharedManager.FILE_MAP.get(absolutePath)); + corefStorage.storeContainerParent(containerParent); + } + corefStorage.storeFile(files); + } + + //PsiPackageStatement extends PsiElement, not a statement, actually. + @Override + public void visitPackageStatement(PsiPackageStatement statement) { + super.visitPackageStatement(statement); + com.alipay.codequery.coref.model.Statement.PackageStatement packages = new com.alipay.codequery.coref.model.Statement.PackageStatement(getHashId(statement)); + packages.debug_message = statement.getPackageName(); + packages.location = calculateLocation(document, statement); + packages.parent = getParent(statement); + + @Nullable PsiElement resolved; + resolved = statement.getPackageReference().resolve(); + + if (resolved != null) { + packages.referencePackage = new Package(getHashId(resolved)); + } else { + packages.referencePackage = new Package((long) -1); + } + Cupackage cupackage = new Cupackage(); + cupackage.setFileHashId(getHashId(file)); + cupackage.setPackageHashId(packages.referencePackage.hashId); + corefStorage.storeCuPackage(cupackage); + corefStorage.storePackageStatement(packages); + } + + public String mangleFieldName(PsiField field) { + PsiClass parent = field.getContainingClass(); + PsiIdentifier ident = field.getNameIdentifier(); + PsiType type = field.getType(); + String typedString = null; + if (type instanceof PsiPrimitiveType) { + typedString = type.getPresentableText(); + } + if (type instanceof PsiClassReferenceType) { + PsiClassReferenceType psiClassReferenceType = (PsiClassReferenceType) type; + typedString = psiClassReferenceType.getPresentableText(); + } + if (parent.getQualifiedName() != null) { + return parent.getQualifiedName() + "." + ident.getText() + ":" + typedString; + } + if (parent.getNameIdentifier() != null) { + return parent.getNameIdentifier().getText() + "." + ident.getText() + ":" + typedString; + } + return ident.getText() + ":" + typedString; + } + + private Type getType(PsiType type) { + return SharedManager.getType(corefStorage, type); + } + + @Deprecated + public void generateCallableEnclosingElement(PsiElement element, Node node) { + Long elementId; + if (!(element instanceof PsiJavaToken) && !(element instanceof PsiWhiteSpace)) { + for (PsiElement e : element.getChildren()) { + if (!(e instanceof PsiMethod)) { + elementId = getHashId(e); + if (e instanceof PsiExpression) { + CallableEnclosingExpression callableEnclosingExpression = new CallableEnclosingExpression(elementId, node.hashId); + corefStorage.storeCallableEnclosingExpression(callableEnclosingExpression); + } else if (e instanceof PsiStatement) { + com.alipay.codequery.coref.model.Statement s = new com.alipay.codequery.coref.model.Statement(getHashId(e)); + CallableEnclosingStatement callableEnclosingStatement = new CallableEnclosingStatement(elementId, node.hashId); + corefStorage.storeCallableEnclosingStatement(callableEnclosingStatement); + generateStatementEnclosingExpression(e, s); + } + generateCallableEnclosingElement(e, node); + } + } + } + } + + @Deprecated + public void generateStatementEnclosingExpressionLegacy(PsiElement element, Node node) { + if (element instanceof PsiJavaToken || element instanceof PsiWhiteSpace) { + return; + } else { + for (PsiElement e : element.getChildren()) { + if (e instanceof PsiStatement) { + continue; + } + if (e instanceof PsiExpression) { + StatementEnclosingExpression statementEnclosingExpression = new StatementEnclosingExpression(node.hashId, getHashId(element)); + corefStorage.storeStatementEnclosingExpression(statementEnclosingExpression); + } + generateStatementEnclosingExpressionLegacy(e, node); + } + } + } + // Iterates to find any expression in a statement element. + public void generateStatementEnclosingExpression(PsiElement element, Node node) { + ArrayList pending = new ArrayList<>(); + List children = new ArrayList<>(); + + // ready to expand the element (from current) + pending.add(element); + + // loop to expand + while (!pending.isEmpty()) { + // get and remove + PsiElement item = pending.get(0); + pending.remove(0); + + // ignore them + if (item instanceof PsiJavaToken || item instanceof PsiWhiteSpace) { + continue; + } else { + for (PsiElement child : item.getChildren()) { + if (child instanceof PsiStatement) { + continue; + } + if (child instanceof PsiExpression) { + children.add(child); + } + // continue to expand the element + pending.add(child); + } + } + } + + for (PsiElement child : children) { + StatementEnclosingExpression statementEnclosingExpression = new StatementEnclosingExpression(getHashId(child), node.hashId); + corefStorage.storeStatementEnclosingExpression(statementEnclosingExpression); + } + } + + // Iterates to find any statements or expressions in a callable element. + public void generateCallableEnclosingNode(PsiElement element, Node node) { + ArrayList pending = new ArrayList<>(); + List statementChildren = new ArrayList<>(); + List expressionChildren = new ArrayList<>(); + + // ready to expand the element (from current) + pending.add(element); + + // loop to expand + while (!pending.isEmpty()) { + // get and remove + PsiElement item = pending.get(0); + pending.remove(0); + + // ignore them + if (item instanceof PsiJavaToken || item instanceof PsiWhiteSpace) { + continue; + } else { + for (PsiElement child : item.getChildren()) { + if(child instanceof PsiMethod) { + continue; + } + if (child instanceof PsiStatement) { + statementChildren.add(child); + } + if (child instanceof PsiExpression) { + expressionChildren.add(child); + } + // continue to expand the element + pending.add(child); + } + } + } + + for (PsiElement child : statementChildren) { + CallableEnclosingStatement callableEnclosingStatement = new CallableEnclosingStatement(getHashId(child), node.hashId); + corefStorage.storeCallableEnclosingStatement(callableEnclosingStatement); + } + + for (PsiElement child : expressionChildren) { + CallableEnclosingExpression callableEnclosingExpression = new CallableEnclosingExpression(getHashId(child), node.hashId); + corefStorage.storeCallableEnclosingExpression(callableEnclosingExpression); + } + } + + @Override + public void visitTypeElement(PsiTypeElement type) { + super.visitTypeElement(type); + if(!type.getText().isEmpty()){ + Type typeElement = new Type(getHashId(type)); + typeElement.debug_message = type.getText(); + typeElement.type = getType(type.getType()); + typeElement.parent = getParent(type); + typeElement.location = calculateLocation(document, type); + corefStorage.storeTypeElement(typeElement); + } + } + + @Override + public void visitSuperExpression(PsiSuperExpression expression) { + super.visitSuperExpression(expression); + com.alipay.codequery.coref.model.Expression.SuperExpression superExpression = new com.alipay.codequery.coref.model.Expression.SuperExpression(getHashId(expression)); + + //qualifier always is null + if(expression.getQualifier() != null) { + superExpression.qualifier = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getQualifier())); + corefStorage.storeSuperExpressionWithQualifier(superExpression); + } + + corefStorage.storeSuperExpression(superExpression); + } + + @Override + // PsiTypeParameter extends PsiClass + public void visitTypeParameter(PsiTypeParameter classParameter) { + super.visitTypeParameter(classParameter); + Type.TypeParameter parameter = new Type.TypeParameter(getHashId(classParameter)); + parameter.index = classParameter.getIndex(); + parameter.owner = classParameter.getOwner() != null ? + new Node(getHashId(classParameter.getOwner())) : new Node((long) -1); + parameter.parent = getParent(classParameter); + parameter.location = calculateLocation(document, classParameter); + parameter.debug_message = classParameter.getText(); + //extendsList is a reference list. + parameter.extendsList = new Node(getHashId(classParameter.getExtendsList())); + corefStorage.storeTypeParameter(parameter); + } + + // store implements relation. + private void generateImplementsRelation(Long oid, PsiClass psiClass) { + for (PsiType t : psiClass.getImplementsListTypes()) { + ClassImplementList list = new ClassImplementList(oid, getType(t).hashId); + corefStorage.storeImplementlist(list); + } + } + + // store extends relation (class hierarchy). + private void generateExtendsRelation(Long oid, PsiClass psiClass) { + for (PsiClass c : psiClass.getSupers()) { + // TODO: when JAVA_HOME is specified, PSI can resolve extends relation from java.lang package. But extractor couldn't resolve other relevant info from jar currently, so excludes this kind of relation from class hierarchy temporally. + if(c.getQualifiedName() != null ){ + if (!(StringUtil.startsWith(c.getQualifiedName(), "java.lang."))) { + com.alipay.codequery.coref.model.Class.ClassHierarchy classHierarchy = new com.alipay.codequery.coref.model.Class.ClassHierarchy(oid, getHashId(c)); + corefStorage.storeClassHierarchy(classHierarchy); + } + } + } + } + + @Override + public void visitClass(PsiClass aClass) { + super.visitClass(aClass); + + // class extracting, firstly exclude anonymous class and type parameter elements. + if( !(aClass instanceof PsiTypeParameter) && !(aClass instanceof PsiAnonymousClass)) { + com.alipay.codequery.coref.model.Class.ClassDefinition class1 = new com.alipay.codequery.coref.model.Class.ClassDefinition(getHashId(aClass)); + class1.parent = getParent(aClass); + class1.identifier = new com.alipay.codequery.coref.model.Identifier(aClass.getName(), getHashId(aClass.getNameIdentifier())); + class1.location = calculateLocation(document, aClass); + class1.qualifiedName = aClass.getQualifiedName() != null ? aClass.getQualifiedName() : aClass.getName(); + + if(aClass.getQualifiedName() == null) { + class1.debug_message = aClass.getText(); + // store null qualified name local class in local class declaration table. + corefStorage.storeLocalClass(class1); + + } else if(aClass.isInterface()){ + // store interface into interface table. + corefStorage.storeInterface(class1); + + // if the class is annotation class, also save it in the annotation declaration table. + if (aClass.isAnnotationType()) { + visitAnnotationDeclaration(aClass); + } + + } else { + generateImplementsRelation(class1.hashId, aClass); + + // store normal class. + corefStorage.storeClass(class1); + } + generateExtendsRelation(class1.hashId, aClass); + } + + } + + @Override + public void visitAnnotationParameterList(PsiAnnotationParameterList list) { + super.visitAnnotationParameterList(list); + int index = 0; + for (PsiNameValuePair var : list.getAttributes()) { + Annotation.AnnotationArgument annoParam = new Annotation.AnnotationArgument(getHashId(var)); + annoParam.value = var.getDetachedValue() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(var.getDetachedValue())) : new com.alipay.codequery.coref.model.Expression((long) -1); + annoParam.location = calculateLocation(document, var); + annoParam.parent = getParent(var); //ignore PsiAnnotationParameterList element. + annoParam.debug_message = var.getText(); + annoParam.index = index; + index++; + //If the parameter has no name, the default name is "value". + if(var.getNameIdentifier() != null) { + annoParam.kind = new com.alipay.codequery.coref.model.Expression(getHashId(var.getNameIdentifier())); + corefStorage.storeAnnotationArgumentWithName(annoParam); + } else { + corefStorage.storeAnnotationArgumentWithoutName(annoParam); + } + } + } + + public void visitAnnotationDeclaration(PsiClass aclass) { + Annotation.AnnotationModel annotationDeclaration = new Annotation.AnnotationModel(getHashId(aclass)); + annotationDeclaration.qualifiedName = aclass.getQualifiedName(); + corefStorage.storeAnnotationDeclaration(annotationDeclaration); + } + + public void visitProgram() { + corefStorage.storeProgram(program); + } + + @Override + public void visitWhileStatement(PsiWhileStatement statement) { + super.visitWhileStatement(statement); + com.alipay.codequery.coref.model.Statement.WhileStatement whileStatement = new com.alipay.codequery.coref.model.Statement.WhileStatement(getHashId(statement)); + whileStatement.condition = statement.getCondition() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getCondition())) : new com.alipay.codequery.coref.model.Expression((long) -1); + whileStatement.body = statement.getBody() != null ? + new com.alipay.codequery.coref.model.Statement(getHashId(statement.getBody())) : new com.alipay.codequery.coref.model.Statement((long) -1); + corefStorage.storeWhileStatement(whileStatement); + } + + @Override + public void visitDoWhileStatement(PsiDoWhileStatement statement) { + super.visitDoWhileStatement(statement); + com.alipay.codequery.coref.model.Statement.DoWhileStatement doWhileStatement = new com.alipay.codequery.coref.model.Statement.DoWhileStatement(getHashId(statement)); + doWhileStatement.condition = statement.getCondition() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getCondition())) : new com.alipay.codequery.coref.model.Expression((long) -1); + doWhileStatement.keyword = statement.getWhileKeyword().getText(); + doWhileStatement.body = statement.getBody() != null ? + new com.alipay.codequery.coref.model.Statement(getHashId(statement.getBody())) : new com.alipay.codequery.coref.model.Statement((long) -1); + corefStorage.storeDoWhileStatement(doWhileStatement); + } + + @Override + public void visitBlockStatement(PsiBlockStatement statement) { + super.visitBlockStatement(statement); + com.alipay.codequery.coref.model.Statement.BlockStatement blockStatement = new com.alipay.codequery.coref.model.Statement.BlockStatement(getHashId(statement)); + blockStatement.codeBlock = new com.alipay.codequery.coref.model.Statement.CodeBlock(getHashId(statement.getCodeBlock())); + corefStorage.storeBlockStatement(blockStatement); + } + //PsiCodeBlock extends PsiElement, not a statement. + @Override + public void visitCodeBlock(PsiCodeBlock block) { + super.visitCodeBlock(block); + com.alipay.codequery.coref.model.Statement.CodeBlock codeBlock = new com.alipay.codequery.coref.model.Statement.CodeBlock(getHashId(block)); + codeBlock.count = block.getStatementCount(); + codeBlock.isEmpty = block.isEmpty() ? 1 : 0; + codeBlock.parent = getParent(block); + codeBlock.location = calculateLocation(document, block); + codeBlock.debug_message = block.getText(); + corefStorage.storeCodeBlock(codeBlock); + } + //PsiModifierList extends PsiAnnotationOwner + @Override + public void visitModifierList(PsiModifierList list) { + super.visitModifierList(list); + if (!(list.getText().isEmpty())) { + com.alipay.codequery.coref.model.Modifier modifierlist = new com.alipay.codequery.coref.model.Modifier(getHashId(list)); + modifierlist.parent = getParent(list); + modifierlist.location = calculateLocation(document, list); + corefStorage.storeModifierList(modifierlist); + } + } + // TODO: filter the resolved element not in the source code, including the following condition, the design may be reviewed later. + // 1. if the resolved element is null. + // 2. if the resolved element is not physical, like "DummyMethod" will be generated during psi parsing. + // 3. if the resolved element belongs to a virtual file's extension is class. + // 4. if the resolved element belongs to a virtual file's path not starts with the repo dir, aka the absolute path of the src root. + private boolean isPhysicalValidElement(PsiElement element) { + if (element == null) { + return false; + } else if (!element.isPhysical()) { + return false; + } else { + PsiFile file = element.getContainingFile(); + if (file == null || file.getVirtualFile().getExtension().equals("class")) { + return false; + } else if (!file.getVirtualFile().getPath().startsWith(repoDir)) { + return false; + } + return true; + } + } + + @Override + public void visitMethodCallExpression(PsiMethodCallExpression expression) { + super.visitMethodCallExpression(expression); + com.alipay.codequery.coref.model.Expression.MethodCallExpression methodCallExpression = new com.alipay.codequery.coref.model.Expression.MethodCallExpression(getHashId(expression)); + methodCallExpression.reference = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getMethodExpression())); + methodCallExpression.argumentList = new com.alipay.codequery.coref.model.Expression.ReferenceList(getHashId(expression.getArgumentList())); + //add try/catch protection for resolveMethod() in case cannot resolve it. + try { + PsiMethod psiMethod = expression.resolveMethod(); + Long calleeId = null; + if (isPhysicalValidElement(psiMethod)) { + calleeId = getHashId(psiMethod); + methodCallExpression.callee = new com.alipay.codequery.coref.model.Expression(calleeId); + } + // else if (psiMethod != null) { + // calleeId = CorefDepExtractor.extractNpMethod(corefStorage, psiMethod); + // } + if (calleeId != null) { + CallableBinding callableBinding = new CallableBinding(methodCallExpression.hashId, calleeId); + corefStorage.storeCallableBinding(callableBinding); + } + + methodCallExpression.type = expression.getType() != null ? getType(expression.getType()) : new Type((long) -1); + + } catch (IllegalArgumentException illegalArgumentException) { + // avoid too many Missing extension point exception stacktrace + if (illegalArgumentException.getMessage().contains("Missing extension point")) { + methodCallExpression.type = new Type((long) -1); + logger.error("error message: {}, element text: {}", illegalArgumentException.getMessage(), expression.getText()); + } else { + logger.error("error message: {}, element text: {}", illegalArgumentException.getMessage(), expression.getText(), illegalArgumentException); + } + } catch (Throwable e) { + PsiFile psiFile = expression.getContainingFile(); + if (psiFile != null) { + logger.error("unknown error, file: {}, element text: {}", psiFile.getVirtualFile().getCanonicalPath(), expression.getText(), e); + } else { + logger.error("unknown error, element text: {}", expression.getText(), e); + } + } + + String name = expression.getMethodExpression().getText(); + if (name.contains("super")) { + if (name.equals("super")) { + corefStorage.storeSuperConstructorInvocation(methodCallExpression); + } else { + corefStorage.storeSuperAccessExpression(methodCallExpression); + } + } else if(methodCallExpression.type.hashId != -1) { + corefStorage.storeMethodAccessExpressionWithType(methodCallExpression); + } else { + corefStorage.storeMethodAccessExpressionWithoutType(methodCallExpression); + } + } + + @Override + public void visitCallExpression(PsiCallExpression callExpression) { + super.visitCallExpression(callExpression); + } + + @Override + public void visitConditionalExpression(PsiConditionalExpression expression) { + super.visitConditionalExpression(expression); + com.alipay.codequery.coref.model.Expression.ConditionalExpression conditionalExpression = new com.alipay.codequery.coref.model.Expression.ConditionalExpression(getHashId(expression)); + conditionalExpression.condition = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getCondition())); + conditionalExpression.thenExpression = expression.getThenExpression() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(expression.getThenExpression())) : new com.alipay.codequery.coref.model.Expression((long) -1); + conditionalExpression.elseExpression = expression.getElseExpression() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(expression.getElseExpression())) : new com.alipay.codequery.coref.model.Expression((long) -1); + corefStorage.storeConditionalExpression(conditionalExpression); + } + + @Override + public void visitContinueStatement(PsiContinueStatement statement) { + super.visitContinueStatement(statement); + com.alipay.codequery.coref.model.Statement.ContinueStatement continueStatement = new com.alipay.codequery.coref.model.Statement.ContinueStatement(getHashId(statement)); + continueStatement.continuedStatement = statement.findContinuedStatement() != null ? + new com.alipay.codequery.coref.model.Statement(getHashId(statement.findContinuedStatement())) : new com.alipay.codequery.coref.model.Statement((long) -1); + if (statement.getLabelIdentifier() != null) { + continueStatement.discriminant = new com.alipay.codequery.coref.model.Identifier(statement.getLabelIdentifier().getText(), getHashId(statement.getLabelIdentifier())); + NameString nameString = new NameString(continueStatement.hashId, continueStatement.discriminant.hashId, continueStatement.continuedStatement.hashId); + corefStorage.storeNameStrings(nameString); + } + corefStorage.storeContinueStatement(continueStatement); + } + + @Override + public void visitArrayInitializerExpression(PsiArrayInitializerExpression expression) { + super.visitArrayInitializerExpression(expression); + com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression aExpression = new com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression(getHashId(expression)); + aExpression.type = getType(expression.getType()); + corefStorage.storeArrayInitializerExpression(aExpression); + } + + //PsiClassInitializer extends PsiMember + @Override + public void visitClassInitializer(PsiClassInitializer initializer) { + super.visitClassInitializer(initializer); + com.alipay.codequery.coref.model.Expression classInitializer = new com.alipay.codequery.coref.model.Expression(getHashId(initializer)); + classInitializer.debug_message = initializer.getText(); + classInitializer.parent = getParent(initializer); + classInitializer.location = calculateLocation(document, initializer); + corefStorage.storeClassInitializer(classInitializer); + } + + @Override + public void visitBreakStatement(PsiBreakStatement statement) { + super.visitBreakStatement(statement); + com.alipay.codequery.coref.model.Statement.BreakStatement breakStatement = new com.alipay.codequery.coref.model.Statement.BreakStatement(getHashId(statement)); + breakStatement.exitedStatemnt = statement.findExitedStatement() != null ? + new com.alipay.codequery.coref.model.Statement(getHashId(statement.findExitedStatement())) : new com.alipay.codequery.coref.model.Statement((long) -1); + if (statement.getLabelIdentifier() != null) { + breakStatement.discriminant = new com.alipay.codequery.coref.model.Identifier(statement.getLabelIdentifier().getText(), getHashId(statement.getLabelIdentifier())); + NameString nameString = new NameString(breakStatement.hashId, breakStatement.discriminant.hashId, breakStatement.exitedStatemnt.hashId); + corefStorage.storeNameStrings(nameString); + } + corefStorage.storeBreakStatement(breakStatement); + } + + @Override + public void visitNewExpression(PsiNewExpression expression) { + super.visitNewExpression(expression); + com.alipay.codequery.coref.model.Expression.NewExpression newExpression = new com.alipay.codequery.coref.model.Expression.NewExpression(getHashId(expression)); + newExpression.type = getType(expression.getType()); + + if (expression.isArrayCreation()) { + newExpression.dimension = expression.getArrayDimensions().length; + corefStorage.storeArrayCreationExpression(newExpression); + } else { + newExpression.reference = expression.getClassReference() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(expression.getClassReference())) : new com.alipay.codequery.coref.model.Expression(getHashId(expression.getAnonymousClass())); + + if (newExpression.type.hashId != -1 && !(newExpression.type.qualifiedName.startsWith("java"))) { + corefStorage.storeConstructorInvocation(newExpression); + + try { + PsiMethod psiMethod = expression.resolveConstructor(); + Long calleeId = null; + if(isPhysicalValidElement(psiMethod)) { + calleeId = getHashId(psiMethod); + } + // else if (psiMethod != null) { + // calleeId = CorefDepExtractor.extractNpMethod(corefStorage, psiMethod); + // } + if (calleeId != null) { + CallableBinding callableBinding = new CallableBinding(newExpression.hashId, calleeId); + corefStorage.storeCallableBinding(callableBinding); + } + } catch (Throwable e) { + logger.error("{} {}", this.project, e); + } + + } else { + corefStorage.storeNewExpression(newExpression); + } + } + } + + @Override + public void visitDeclarationStatement(PsiDeclarationStatement statement) { + super.visitDeclarationStatement(statement); + int i = 0; + // s is a local variable or a local class. + for (PsiElement s : statement.getDeclaredElements()) { + com.alipay.codequery.coref.model.Statement.DeclarationStatement declarationStatement = new com.alipay.codequery.coref.model.Statement.DeclarationStatement(getHashId(s)); + declarationStatement.index = i; + declarationStatement.parent = getParent(s); + corefStorage.storeDeclarationElement(declarationStatement); + i++; + } + } + + @Override + public void visitExpressionList(PsiExpressionList list) { + super.visitExpressionList(list); + if (!(list.getText().isEmpty())) { + com.alipay.codequery.coref.model.Expression.ExpressionList expressionList = new com.alipay.codequery.coref.model.Expression.ExpressionList(getHashId(list)); + expressionList.location = calculateLocation(document, list); + expressionList.parent = getParent(list); + expressionList.debug_message = list.getText(); + expressionList.size = list.getExpressionCount(); + corefStorage.storeExpressionList(expressionList); + for (int i = 0; i < list.getExpressionCount(); i++) { + PsiExpression expression = list.getExpressions()[i]; + Long expressionHashId = getHashId(expression); + ExpressionListExpressionRelation expressionListRelation = new ExpressionListExpressionRelation(expressionList.hashId, expressionHashId, i); + corefStorage.storeExpressionListExpressionRelation(expressionListRelation); + } + } + } + + @Override + public void visitExpressionStatement(PsiExpressionStatement statement) { + super.visitExpressionStatement(statement); + com.alipay.codequery.coref.model.Statement.ExpressionStatement expressionStatement = new com.alipay.codequery.coref.model.Statement.ExpressionStatement(getHashId(statement)); + expressionStatement.expr = new com.alipay.codequery.coref.model.Expression(getHashId(statement.getExpression())); + corefStorage.storeExpressionStatement(expressionStatement); + } + + //not a statement, actually. + @Override + public void visitImportStatement(PsiImportStatement statement) { + // TODO: we have no need to call super + super.visitImportStatement(statement); + + com.alipay.codequery.coref.model.Statement.ImportStatement importStatement = new com.alipay.codequery.coref.model.Statement.ImportStatement(getHashId(statement)); + importStatement.reference = new com.alipay.codequery.coref.model.Statement(getHashId(statement.getImportReference())); + importStatement.debug_message = statement.getText();//statement.getQualifiedName(); + importStatement.parent = getParent(statement); //skip import list + importStatement.location = calculateLocation(document, statement); + importStatement.isForeignImport = statement.isForeignFileImport() ? 1 : 0; + + corefStorage.storeImport(importStatement); + } + + @Override + public void visitTypeCastExpression(PsiTypeCastExpression expression) { + super.visitTypeCastExpression(expression); + com.alipay.codequery.coref.model.Expression.CastExpression castExpression = new com.alipay.codequery.coref.model.Expression.CastExpression(getHashId(expression)); + castExpression.operand = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getOperand())); + corefStorage.storeCastExpression(castExpression); + } + + public HashMap elementIndex = new HashMap<>(); + + public void getIndex(PsiElement element) { + int i = 0; + for (PsiElement e : element.getChildren()) { + if (!(e instanceof PsiWhiteSpace) && !(e instanceof PsiJavaToken) && !(e instanceof PsiComment)) { + elementIndex.put(e, i); + i++; + } + } + } + + public com.alipay.codequery.coref.model.Parent getParent(PsiElement element) { + PsiElement psiParent = PsiUtil.getPsiParent(element); + if (element instanceof PsiStatement || element instanceof PsiExpression || element instanceof PsiVariable || element instanceof PsiCatchSection) { + if (!(elementIndex.containsKey(element))) { + getIndex(psiParent); + } + } + com.alipay.codequery.coref.model.Parent parent = new com.alipay.codequery.coref.model.Parent(getHashId(psiParent)); + + if (parentMap.containsKey(psiParent)) { + return parentMap.get(psiParent); + } else { + parentMap.put(psiParent, parent); + String temp = psiParent.toString(); + parent.parentType = temp.contains(":") ? temp.substring(3, temp.indexOf(":")) : temp.substring(3); + // Save parent info usually for debug usage. + //corefStorage.storeParent(parent); + return parent; + } + } + + @Override + public void visitStatement(PsiStatement statement) { + super.visitStatement(statement); + com.alipay.codequery.coref.model.Statement corefStatement = new com.alipay.codequery.coref.model.Statement(getHashId(statement)); + + corefStatement.parent = getParent(statement); + corefStatement.index = elementIndex.get(statement); + + corefStatement.debug_message = statement.getText(); + corefStatement.location = calculateLocation(document, statement); + String temp = statement.toString(); + corefStatement.baseName = temp.contains(":") ? temp.substring(3, temp.indexOf(":")) : temp.substring(3); + corefStorage.storeStatement(corefStatement); + //generateCallableEnclosingStatement(statement.getParent(), corefStatement); + generateStatementEnclosingExpression(statement, corefStatement); + } + + @Override + public void visitExpression(PsiExpression expression) { + super.visitExpression(expression); + com.alipay.codequery.coref.model.Expression corefExpression = new com.alipay.codequery.coref.model.Expression(getHashId(expression)); + corefExpression.debug_message = expression.getText(); + + corefExpression.parent = getParent(expression); + corefExpression.index = elementIndex.get(expression); + + corefExpression.location = calculateLocation(document, expression); + + String temp = expression.toString(); + corefExpression.baseName = temp.contains(":") ? temp.substring(3, temp.indexOf(":")) : temp.substring(3); + corefStorage.storeExpression(corefExpression); + } + + @Override + public void visitSwitchStatement(PsiSwitchStatement statement) { + super.visitSwitchStatement(statement); + com.alipay.codequery.coref.model.Statement.SwitchStatement switchStatement = new com.alipay.codequery.coref.model.Statement.SwitchStatement(getHashId(statement)); + switchStatement.discriminant = new com.alipay.codequery.coref.model.Expression(getHashId(statement.getExpression())); + switchStatement.body = new com.alipay.codequery.coref.model.Statement.BlockStatement(getHashId(statement.getBody())); + corefStorage.storeSwitchStatement(switchStatement); + } + + @Override + public void visitSwitchLabelStatement(PsiSwitchLabelStatement statement) { + super.visitSwitchLabelStatement(statement); + com.alipay.codequery.coref.model.Statement.SwitchLabelStatement labelStatement = new com.alipay.codequery.coref.model.Statement.SwitchLabelStatement(getHashId(statement)); + labelStatement.caseValue = statement.getCaseValues() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getCaseValues())) : new com.alipay.codequery.coref.model.Expression((long) -1); + labelStatement.enclosingSwitchBlock = new com.alipay.codequery.coref.model.Statement.BlockStatement(getHashId(statement.getEnclosingSwitchBlock())); + PsiElement sibling = statement.getNextSibling(); + while (sibling != null) { + if (sibling instanceof PsiSwitchLabelStatement) { + labelStatement.nextSwitchCashHashId = getHashId(sibling); + break; + } else { + sibling = sibling.getNextSibling(); + } + } + // labelStatement.isDefaultValue = statement.isDefaultCase() ? 1 : 0; + corefStorage.storeSwitchLabelStatement(labelStatement); + } + + @Override + public void visitClassObjectAccessExpression(PsiClassObjectAccessExpression expression) { + super.visitClassObjectAccessExpression(expression); + try { + Type.TypeLiteral literal = new Type.TypeLiteral(getHashId(expression)); + literal.type = getType(expression.getType()); + literal.typeElement = new Type(getHashId(expression.getOperand())); + corefStorage.storeTypeLiteral(literal); + } catch (Throwable e) { + logger.error("{} {}", this.project, e); + } + } + + @Override + public void visitSynchronizedStatement(PsiSynchronizedStatement statement) { + super.visitSynchronizedStatement(statement); + com.alipay.codequery.coref.model.Statement.SynchronizedStatement synchronizedStatement = new com.alipay.codequery.coref.model.Statement.SynchronizedStatement(getHashId(statement)); + synchronizedStatement.lockExpression = statement.getLockExpression() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getLockExpression())) : new com.alipay.codequery.coref.model.Expression((long) -1); + synchronizedStatement.body = statement.getBody() != null ? + new com.alipay.codequery.coref.model.Statement(getHashId(statement.getBody())) : new com.alipay.codequery.coref.model.Statement((long) -1); + corefStorage.storeSynchronizedStatement(synchronizedStatement); + } + + @Override + public void visitTryStatement(PsiTryStatement statement) { + super.visitTryStatement(statement); + com.alipay.codequery.coref.model.Statement.TryStatement tryStatement = new com.alipay.codequery.coref.model.Statement.TryStatement(getHashId(statement)); + tryStatement.tryBlock = statement.getTryBlock() != null ? + new com.alipay.codequery.coref.model.Statement.CodeBlock(getHashId(statement.getTryBlock())) : new com.alipay.codequery.coref.model.Statement.CodeBlock((long) -1); + if(statement.getFinallyBlock() != null) { + tryStatement.finallyBlock = new com.alipay.codequery.coref.model.Statement.CodeBlock(getHashId(statement.getFinallyBlock())); + corefStorage.storeTryStatementWithFinally(tryStatement); + } else { + corefStorage.storeTryStatementWithoutFinally(tryStatement); + } + } + //PsiCatchSection extends PsiElement, not an expression. + @Override + public void visitCatchSection(PsiCatchSection section) { + super.visitCatchSection(section); + com.alipay.codequery.coref.model.Statement.CatchClause clauseStatement = new com.alipay.codequery.coref.model.Statement.CatchClause(getHashId(section)); + clauseStatement.param = new com.alipay.codequery.coref.model.Expression(getHashId(section.getParameter())); + clauseStatement.tryStatement = new com.alipay.codequery.coref.model.Statement.TryStatement(getHashId(section.getTryStatement())); + clauseStatement.debug_message = section.getText(); + clauseStatement.type = getType(section.getCatchType()); + clauseStatement.parent = getParent(section); + clauseStatement.location = calculateLocation(document, section); + clauseStatement.index = elementIndex.get(section); + corefStorage.storeCatchClauseStatement(clauseStatement); + } + + @Override + public void visitThrowStatement(PsiThrowStatement statement) { + super.visitThrowStatement(statement); + com.alipay.codequery.coref.model.Statement.ThrowStatement throwStatement = new com.alipay.codequery.coref.model.Statement.ThrowStatement(getHashId(statement)); + throwStatement.exception = new com.alipay.codequery.coref.model.Expression(getHashId(statement.getException())); + throwStatement.body = new com.alipay.codequery.coref.model.Statement.CodeBlock(getHashId(statement.getContext())); + corefStorage.storeThrowStatement(throwStatement); + } + + @Override + public void visitThisExpression(PsiThisExpression expression) { + super.visitThisExpression(expression); + com.alipay.codequery.coref.model.Expression.ThisExpression thisExpression = new com.alipay.codequery.coref.model.Expression.ThisExpression(getHashId(expression)); + //qualifier info is always null. + if(expression.getQualifier() != null) { + thisExpression.qualifier = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getQualifier())); + corefStorage.storeThisExpressionWithQualifier(thisExpression); + } + corefStorage.storeThisExpression(thisExpression); + } + + @Override + public void visitEmptyStatement(PsiEmptyStatement statement) { + super.visitEmptyStatement(statement); + com.alipay.codequery.coref.model.Statement.EmptyStatement emptyStatement = new com.alipay.codequery.coref.model.Statement.EmptyStatement(getHashId(statement)); + corefStorage.storeEmptyStatement(emptyStatement); + } + + @Override + public void visitLabeledStatement(PsiLabeledStatement statement) { + super.visitLabeledStatement(statement); + com.alipay.codequery.coref.model.Statement.LabeledStatement labeledStatement = new com.alipay.codequery.coref.model.Statement.LabeledStatement(getHashId(statement)); + labeledStatement.identifier = new com.alipay.codequery.coref.model.Identifier(statement.getLabelIdentifier().getText(), getHashId(statement.getLabelIdentifier())); + labeledStatement.statement = statement.getStatement() != null ? new com.alipay.codequery.coref.model.Statement(getHashId(statement.getStatement())) : new com.alipay.codequery.coref.model.Statement((long) -1); + if (statement.getStatement() != null) { + NameString nameString = new NameString(labeledStatement.hashId, labeledStatement.identifier.hashId, labeledStatement.hashId); + corefStorage.storeNameStrings(nameString); + } + corefStorage.storeLabeledStatement(labeledStatement); + } + + @Override + public void visitLambdaExpression(PsiLambdaExpression expression) { + super.visitLambdaExpression(expression); + com.alipay.codequery.coref.model.Expression.LambdaExpression lExpression = new com.alipay.codequery.coref.model.Expression.LambdaExpression(getHashId(expression)); + lExpression.body = new com.alipay.codequery.coref.model.Statement(getHashId(expression.getBody())); + lExpression.paramterList = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getParameterList())); + try { + lExpression.isValueCompatible = expression.isValueCompatible() ? 1 : 0; + } catch (IllegalArgumentException e) { + lExpression.isValueCompatible = 0 ; + } + lExpression.isVoidCompatible = expression.isVoidCompatible() ? 1 : 0; + corefStorage.storeLambdaExpression(lExpression); + } + + @Override + public void visitAssertStatement(PsiAssertStatement statement) { + super.visitAssertStatement(statement); + com.alipay.codequery.coref.model.Statement.AssertStatement assertStatement = new com.alipay.codequery.coref.model.Statement.AssertStatement(getHashId(statement)); + assertStatement.condition = statement.getAssertCondition() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getAssertCondition())) : new com.alipay.codequery.coref.model.Expression((long) -1); + assertStatement.description = statement.getAssertDescription() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getAssertDescription())) : new com.alipay.codequery.coref.model.Expression((long) -1); + corefStorage.storeAssertStatement(assertStatement); + } + + @Override + public void visitReturnStatement(PsiReturnStatement statement) { + super.visitReturnStatement(statement); + com.alipay.codequery.coref.model.Statement.ReturnStatement returnStatement = new com.alipay.codequery.coref.model.Statement.ReturnStatement(getHashId(statement)); + returnStatement.returnExpression = statement.getReturnValue() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getReturnValue())) : new com.alipay.codequery.coref.model.Expression(getHashId(statement)); + corefStorage.storeReturnStatement(returnStatement); + } + + @Override + public void visitYieldStatement(PsiYieldStatement statement) { + super.visitYieldStatement(statement); + com.alipay.codequery.coref.model.Statement.YieldStatement yieldStatement = new com.alipay.codequery.coref.model.Statement.YieldStatement(getHashId(statement)); + yieldStatement.expression = statement.getExpression() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getExpression())) : new com.alipay.codequery.coref.model.Expression((long) -1); + yieldStatement.enclosingExpression = statement.findEnclosingExpression() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.findEnclosingExpression())) : new com.alipay.codequery.coref.model.Expression((long) -1); + corefStorage.storeYieldStatement(yieldStatement); + } + + @Override + public void visitParameter(PsiParameter parameter) { + super.visitParameter(parameter); + // parameter in a foreach statement + if (!(parameter.getParent() instanceof PsiParameterList)) { + com.alipay.codequery.coref.model.Parameter param = new com.alipay.codequery.coref.model.Parameter(getHashId(parameter)); + param.name = parameter.getName(); + param.location = calculateLocation(document, parameter); + param.parent = getParent(parameter); + param.debug_message = parameter.getText(); + param.index = 0; + // If the parameter has no type element, set its type id with -1. + param.type = parameter.getTypeElement() != null ? getType(parameter.getType()) : new Type((long) -1); + corefStorage.storeParameter(param); + } + } + + //parent of resource expression and variable + @Override + public void visitResourceList(PsiResourceList resourceList) { + super.visitResourceList(resourceList); + Node list = new Node(getHashId(resourceList)); + ResourceList rlist = new ResourceList(); + rlist.setDebugMessage(resourceList.getText()); + rlist.setElementHashId(list.hashId); + rlist.setParentHashId(getParent(resourceList).hashId); + rlist.setLocationHashId(calculateLocation(document, resourceList).hashId); + corefStorage.storeResourceList(rlist); + } + + @Override + public void visitParameterList(PsiParameterList list) { + super.visitParameterList(list); + int i = 0; + for (PsiParameter param : list.getParameters()) { + com.alipay.codequery.coref.model.Parameter parameter = new com.alipay.codequery.coref.model.Parameter(getHashId(param)); + parameter.name = param.getName(); + parameter.location = calculateLocation(document, param); + parameter.parent = getParent(param); //skip parameter list + parameter.debug_message = param.getText(); + parameter.index = i; + i++; + // If the parameter has no type element, set its type id with -1. + parameter.type = param.getTypeElement() != null ? getType(param.getType()) : new Type((long) -1); + corefStorage.storeParameter(parameter); + } + } + + //extract reference element and reference expression. + @Override + public void visitReferenceElement(PsiJavaCodeReferenceElement reference) { + super.visitReferenceElement(reference); + com.alipay.codequery.coref.model.Expression referenceElement = new com.alipay.codequery.coref.model.Expression(getHashId(reference)); + try { + if (reference instanceof PsiReferenceExpression) { + corefStorage.storeReferenceExpression(referenceElement); + } else { + referenceElement.debug_message = reference.getText(); + referenceElement.parent = getParent(reference); + referenceElement.location = calculateLocation(document, reference); + corefStorage.storeReferenceElement(referenceElement); + } + + // store the def-use relation between reference element and self-defined element + @Nullable PsiElement definition = reference.resolve(); + if (isPhysicalValidElement(definition)) { + if (definition instanceof PsiMethod || definition instanceof PsiClass || definition instanceof PsiVariable) { + ReferenceRelation referenceRelation = new ReferenceRelation(getHashId(reference), getHashId(definition)); + corefStorage.storeReferenceRelation(referenceRelation); + } + } + } catch (IllegalArgumentException illegalArgumentException) { + // avoid too many Missing extension point exception stacktrace + if (illegalArgumentException.getMessage().contains("Missing extension point")) { + logger.error("error message: {}, element text: {}", illegalArgumentException.getMessage(), reference.getText()); + } else { + logger.error("error message: {}, element text: {}", illegalArgumentException.getMessage(), reference.getText(), illegalArgumentException); + } + } catch (Throwable e) { + PsiFile psiFile = reference.getContainingFile(); + if (psiFile != null) { + logger.error("unknown error, file: {}, element text: {}", psiFile.getVirtualFile().getCanonicalPath(), reference.getText(), e); + } else { + logger.error("unknown error, element text: {}", reference.getText(), e); + } + } + } + + @Override + public void visitField(PsiField field) { + com.alipay.codequery.coref.model.Field field1 = new com.alipay.codequery.coref.model.Field(getHashId(field)); + field1.location = calculateLocation(document, field); + field1.name = field.getName(); + field1.parent = getParent(field); + field1.debug_message = field.getText(); + if (field instanceof PsiEnumConstant) { + corefStorage.storeEnumConstant(field1); + } else { + //String name = mangleFieldName(field); + corefStorage.storeField(field1); + } + super.visitField(field); + } + + @Override + public void visitUnaryExpression(PsiUnaryExpression expression) { + super.visitUnaryExpression(expression); + com.alipay.codequery.coref.model.Expression.UnaryExpression unaryExpression = new com.alipay.codequery.coref.model.Expression.UnaryExpression(getHashId(expression)); + unaryExpression.operand = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getOperand())); + unaryExpression.opcode = expression.getOperationTokenType().toString(); + if (expression instanceof PsiPostfixExpression) { + unaryExpression.isPostfix = 1; + } else { + unaryExpression.isPostfix = 0; + } + corefStorage.storeUnaryExpression(unaryExpression); + } + + @Override + public void visitArrayAccessExpression(PsiArrayAccessExpression expression) { + super.visitArrayAccessExpression(expression); + com.alipay.codequery.coref.model.Expression.ArrayAccessExpression accessExpression = new com.alipay.codequery.coref.model.Expression.ArrayAccessExpression(getHashId(expression)); + accessExpression.arrayExpression = new com.alipay.codequery.coref.model.Expression.ArrayExpression(getHashId(expression.getArrayExpression())); + accessExpression.indexExpression = expression.getIndexExpression() != null ? new com.alipay.codequery.coref.model.Expression.ArrayExpression(getHashId(expression.getIndexExpression())) : new com.alipay.codequery.coref.model.Expression((long) -1); + corefStorage.storeArrayAccessExpression(accessExpression); + } + + @Override + public void visitLocalVariable(PsiLocalVariable variable) { + super.visitLocalVariable(variable); + com.alipay.codequery.coref.model.LocalVariable localVariable = new com.alipay.codequery.coref.model.LocalVariable(getHashId(variable)); + localVariable.name = variable.getName(); + localVariable.debug_message = variable.getText(); + localVariable.location = calculateLocation(document, variable); + localVariable.parent = getParent(variable); + localVariable.index = elementIndex.get(variable); + corefStorage.storeLocalVariable(localVariable); + } + + @Override + public void visitVariable(PsiVariable variable) { + super.visitVariable(variable); + // Check whether the variable has type element or not firstly, otherwise may cause illegal argument exception. + if (variable.getTypeElement() != null && variable.getType() instanceof PsiArrayType) { + Variable array = new Variable(getHashId(variable)); + array.name = variable.getName(); + corefStorage.storeArray(array); + } + } + + @Override + public void visitMethod(PsiMethod psiMethod) { + com.alipay.codequery.coref.model.Method method = new Method(getHashId(psiMethod)); + method.parent = getParent(psiMethod); + method.identifier = new com.alipay.codequery.coref.model.Identifier(psiMethod.getName(), getHashId(psiMethod.getNameIdentifier())); + method.returnType = psiMethod.getReturnType() != null ? getType(psiMethod.getReturnType()) : new Type( (long) -1); + method.location = calculateLocation(document, psiMethod); + // 若method有注释,则方法定义部分能需要取到psiMethod下modifier的起始位置 + int definitionStartOffset = psiMethod.getModifierList().getTextRange().getStartOffset(); + int definitionEndOffset = psiMethod.getTextRange().getEndOffset(); + method.definitionBody = document.getText().substring(definitionStartOffset, definitionEndOffset); + if (psiMethod.isConstructor()) { + method.signature = psiMethod.getContainingClass().getQualifiedName() != null ? PsiUtil.mangleMethodName(psiMethod) : psiMethod.getContainingClass().getName(); + corefStorage.storeConstructor(method); + } else { + method.signature = PsiUtil.mangleMethodName(psiMethod); + corefStorage.storeMethod(method); + } + + generateCallableEnclosingNode(psiMethod, method); + super.visitMethod(psiMethod); + } + + @Override + public void visitForStatement(PsiForStatement statement) { + super.visitForStatement(statement); + com.alipay.codequery.coref.model.Statement.ForStatement stmt = new com.alipay.codequery.coref.model.Statement.ForStatement(getHashId(statement)); + stmt.init = statement.getInitialization() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getInitialization())) : new com.alipay.codequery.coref.model.Expression((long) -1); + stmt.update = statement.getUpdate() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getUpdate())) : new com.alipay.codequery.coref.model.Expression((long) -1); + stmt.condition = statement.getCondition() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getCondition())) : new com.alipay.codequery.coref.model.Expression((long) -1); + stmt.body = new com.alipay.codequery.coref.model.Statement(getHashId(statement.getBody())); + corefStorage.storeForStatement(stmt); + } + + @Override + public void visitAnonymousClass(PsiAnonymousClass aClass) { + super.visitAnonymousClass(aClass); + com.alipay.codequery.coref.model.Class.AnonymousClass anonymousClass = new com.alipay.codequery.coref.model.Class.AnonymousClass(getHashId(aClass)); + anonymousClass.location = calculateLocation(document, aClass); + anonymousClass.parent = getParent(aClass); + anonymousClass.baseType = getType(aClass.getBaseClassType()); + //BaseClassReference may resolve to null. + anonymousClass.baseClass = new Class.ClassDefinition(getHashId(aClass.getBaseClassReference())); + corefStorage.storeAnonymousClass(anonymousClass); + } + + @Override + public void visitForeachStatement(PsiForeachStatement statement) { + super.visitForeachStatement(statement); + com.alipay.codequery.coref.model.Statement.ForeachStatement stmt = new com.alipay.codequery.coref.model.Statement.ForeachStatement(getHashId(statement)); + stmt.iterationParameter = new Parameter(getHashId(statement.getIterationParameter())); + stmt.iteratedValue = new com.alipay.codequery.coref.model.Expression(getHashId(statement.getIteratedValue())); + stmt.body = new com.alipay.codequery.coref.model.Statement(getHashId(statement.getBody())); + corefStorage.storeForeachStatement(stmt); + } + + @Override + public void visitAssignmentExpression(PsiAssignmentExpression expression) { + super.visitAssignmentExpression(expression); + com.alipay.codequery.coref.model.Expression.AssignmentExpression assignmentExpression = new com.alipay.codequery.coref.model.Expression.AssignmentExpression(getHashId(expression)); + assignmentExpression.lhs = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getLExpression())); + assignmentExpression.rhs = new com.alipay.codequery.coref.model.Expression(getHashId(expression.getRExpression())); + assignmentExpression.opcode = expression.getOperationSign().getText(); + corefStorage.storeAssignmentExpression(assignmentExpression); + } + + @Override + public void visitKeyword(PsiKeyword keyword) { + super.visitKeyword(keyword); + com.alipay.codequery.coref.model.Modifier modifier = new Modifier(getHashId(keyword)); + modifier.name = keyword.getText(); + modifier.parent = getParent(keyword); + modifier.location = calculateLocation(document, keyword); + corefStorage.storeModifier(modifier); + } + + @Override + public void visitIdentifier(PsiIdentifier identifier) { + super.visitIdentifier(identifier); + com.alipay.codequery.coref.model.Identifier identifiers = new Identifier(identifier.getText(), getHashId(identifier)); + identifiers.parent = getParent(identifier); + identifiers.location = calculateLocation(document, identifier); + corefStorage.storeIdentifier(identifiers); + } + + @Override + public void visitPolyadicExpression(PsiPolyadicExpression expression) { + super.visitPolyadicExpression(expression); + try { + if (expression instanceof PsiBinaryExpression) { + com.alipay.codequery.coref.model.Expression.BinaryExpression binaryExpression = new com.alipay.codequery.coref.model.Expression.BinaryExpression(getHashId(expression)); + binaryExpression.lhs = new com.alipay.codequery.coref.model.Expression(getHashId(((PsiBinaryExpression) expression).getLOperand())); + binaryExpression.rhs = new com.alipay.codequery.coref.model.Expression(getHashId(((PsiBinaryExpression) expression).getROperand())); + binaryExpression.opcode = ((PsiBinaryExpression) expression).getOperationSign().getText(); + corefStorage.storeBinaryExpression(binaryExpression); + } else { + com.alipay.codequery.coref.model.Expression.PolyadicExpression polyadicExpression = new com.alipay.codequery.coref.model.Expression.PolyadicExpression(getHashId(expression)); + polyadicExpression.size = expression.getOperands().length; + polyadicExpression.opcode = expression.getOperationTokenType().toString(); + corefStorage.storePolyadicExpression(polyadicExpression); + } + } catch (NullPointerException e) { + logger.error("error message: {}, element text: {}", e.getMessage(), expression.getText()); + } + } + + @Override + public void visitIfStatement(PsiIfStatement statement) { + super.visitIfStatement(statement); + com.alipay.codequery.coref.model.Statement.IfStatement ifStatement = new com.alipay.codequery.coref.model.Statement.IfStatement(getHashId(statement)); + ifStatement.condition = statement.getCondition() != null ? + new com.alipay.codequery.coref.model.Expression(getHashId(statement.getCondition())) : new com.alipay.codequery.coref.model.Expression((long) -1); + ifStatement.thenBranch = statement.getThenBranch() != null ? + new com.alipay.codequery.coref.model.Statement(getHashId(statement.getThenBranch())) : new com.alipay.codequery.coref.model.Statement((long) -1); + if(statement.getElseBranch() != null) { + ifStatement.elseBranch = new Statement(getHashId(statement.getElseBranch())); + corefStorage.storeIfStatementWithElse(ifStatement); + } else { + corefStorage.storeIfStatementWithoutElse(ifStatement); + } + + } + + @Override + public void visitDocTag(PsiDocTag tag) { + super.visitDocTag(tag); + com.alipay.codequery.coref.model.Comment.JavaDocTag javaDocTag = new com.alipay.codequery.coref.model.Comment.JavaDocTag(getHashId(tag)); + javaDocTag.value = tag.getValueElement() != null ? tag.getValueElement().getText() : "-1"; + javaDocTag.name = tag.getName(); + int i = 0; + for (PsiDocTag t : tag.getContainingComment().getTags()) { + if (t == tag) { + javaDocTag.index = i; + } + i++; + } + javaDocTag.location = calculateLocation(document, tag); + javaDocTag.containedComment = new com.alipay.codequery.coref.model.Comment(getHashId(tag.getContainingComment())); + corefStorage.storeJavaDocTag(javaDocTag); + } + + /** + * This method extracts PsiComment element info, including java doc comment and normal coment. + */ + @Override + public void visitComment(@NotNull PsiComment comment) { + super.visitComment(comment); + if (comment instanceof PsiDocComment) { + com.alipay.codequery.coref.model.Comment.JavaDocComment javaDocComments = new com.alipay.codequery.coref.model.Comment.JavaDocComment(getHashId(comment)); + javaDocComments.text = comment.getText(); + javaDocComments.documentedItem = ((PsiDocComment) comment).getOwner() != null ? + new Node(getHashId(((PsiDocComment) comment).getOwner())) : new Node((long) -1); + javaDocComments.location = calculateLocation(document, comment); + javaDocComments.parent = getParent(comment); + corefStorage.storeJavaDocComment(javaDocComments); + } else { + com.alipay.codequery.coref.model.Comment comments = new com.alipay.codequery.coref.model.Comment(getHashId(comment)); + comments.text = comment.getText(); + comments.parent = getParent(comment); + comments.location = calculateLocation(document, comment); + // Add one attribute to normal comment, to record the comment type, which may be end_of_line_comment or c_style_comment. + comments.commentType = comment.getTokenType().toString(); + corefStorage.storeComment(comments); + } + } + + /** + * This method extract the info about PsiDocToken with Data type. + */ + @Override + public void visitDocToken(PsiDocToken token) { + super.visitDocToken(token); + if(token.getTokenType().toString().equals("DOC_COMMENT_DATA") && !(StringUtil.isEmptyOrSpaces(token.getText()))) { + com.alipay.codequery.coref.model.Comment.JavaDocDataToken javaDocDataToken = new com.alipay.codequery.coref.model.Comment.JavaDocDataToken(getHashId(token)); + javaDocDataToken.value = token.getText(); + int i = 0; + for (PsiElement t : token.getParent().getChildren()) { + if (t instanceof PsiDocToken && t.isEquivalentTo(token)) { + javaDocDataToken.index = i; + } + i++; + } + javaDocDataToken.parent = getParent(token); + javaDocDataToken.location = calculateLocation(document, token); + corefStorage.storeJavaDocDataToken(javaDocDataToken); + } + } + + /** + * This method extract the info about PsiDocTagValue element. + */ + @Override + public void visitDocTagValue(PsiDocTagValue value) { + super.visitDocTagValue(value); + com.alipay.codequery.coref.model.Comment.JavaDocTagValue javaDocTagValue = new Comment.JavaDocTagValue(getHashId(value)); + javaDocTagValue.value = value.getText(); + javaDocTagValue.parent = getParent(value); + javaDocTagValue.location = calculateLocation(document, value); + corefStorage.storeJavaDocTagValue(javaDocTagValue); + } + + @Override + public void visitLiteralExpression(PsiLiteralExpression expression) { + super.visitLiteralExpression(expression); + Literal literal = new Literal(getHashId(expression)); + literal.type = expression.getType().getPresentableText(); + literal.value = expression.getText(); + corefStorage.handleLiteral(literal); + } + + @Override +// PsiReferenceList is ReferenceElement's parent, get exception information. + public void visitReferenceList(PsiReferenceList list) { + super.visitReferenceList(list); + if (!(list.getText().isEmpty())) { + com.alipay.codequery.coref.model.Expression.ReferenceList referenceList = new Expression.ReferenceList(getHashId(list)); + referenceList.parent = getParent(list); + referenceList.location = calculateLocation(document, list); + referenceList.role = list.getRole().name(); + referenceList.debug_message = list.getText(); + corefStorage.storeReferencelist(referenceList); + } + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefURI.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefURI.java new file mode 100644 index 00000000..9cfeab32 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/CorefURI.java @@ -0,0 +1,41 @@ +package com.alipay.codequery.coref.core; + +import com.alipay.codequery.coref.util.HashUtil; +import lombok.Getter; +import lombok.Setter; +import org.apache.commons.lang3.StringUtils; + +@Setter +@Getter +public class CorefURI { + + private static String URI_TEMPLATE = "coref://%s?path=%s#%s"; + + private String signature; + private String repository; + private String path; + + + public CorefURI(String repository) { + this.repository = repository; + } + + public String toString() { + return generate(repository, path, signature); + } + + public static String generate(String repository, String path, String signature) { + if(StringUtils.isBlank(repository) + ||StringUtils.isBlank(path) + || StringUtils.isBlank(signature)) { + throw new RuntimeException("blank repository or path or signature"); + } + + return String.format(URI_TEMPLATE, repository, path, signature); + } + + public static Long generateHashId(String repository, String path, String signature) { + return HashUtil.hashString(generate(repository, path, signature)); + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/Runner.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/Runner.java new file mode 100644 index 00000000..9e515a99 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/Runner.java @@ -0,0 +1,345 @@ +package com.alipay.codequery.coref.core; + + +import com.alipay.codequery.Configuration; +import com.alipay.codequery.coref.model.Folder; +import com.alipay.codequery.coref.model.Node; +import com.alipay.codequery.coref.model.Program; +import com.alipay.codequery.coref.storage.*; +import com.alipay.codequery.coref.util.HashUtil; +import com.alipay.codequery.project.PsiProject; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; +import lombok.extern.slf4j.Slf4j; +import me.tongfei.progressbar.ProgressBar; +import me.tongfei.progressbar.ProgressBarBuilder; +import me.tongfei.progressbar.ProgressBarStyle; +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.kotlin.com.intellij.psi.PsiJavaFile; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Paths; +import java.time.Duration; +import java.time.Instant; +import java.util.*; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ForkJoinPool; +import java.util.stream.Collectors; + +@Slf4j +public class Runner { + public static final int DEFAULT_BATCH_SIZE = 100; + public static final int DEFAULT_PARALLEL_BATCH_SIZE = 100; + + public final Configuration configuration; + public final PsiProject basicProject; + public final List javaFiles; + private final File srcRootDir; + private Program program; + + public Runner(Configuration configuration, + PsiProject basicProject, + List javaFiles, + File srcRootDir) { + this.configuration = configuration; + this.basicProject = basicProject; + this.javaFiles = javaFiles; + this.srcRootDir = srcRootDir; + } + + + private static void analyseFile(Configuration configuration, PsiProject project, IStorage sliceCorefStorage, Program program, File javaPath) { + String srcRootPath = configuration.getSourcePath(); + + // corresponding the java path to a psi java file into the project + @Nullable PsiJavaFile psiJavaFile = project.getPsiJavaFileFromFile(javaPath); + assert psiJavaFile != null; + String fileName = psiJavaFile.getContainingFile().getVirtualFile().getCanonicalPath(); + try { + CorefExtractor corefExtractor = new CorefExtractor(project, srcRootPath, psiJavaFile, sliceCorefStorage, program, new CorefURI(configuration.repository)); + psiJavaFile.accept(corefExtractor); + + } catch (Throwable e) { + log.error("extracting error for: {}", fileName, e); + } + } + + // 填充基本信息 + // 1. Coref 根节点 —— Program节点 + // 2. 文件目录信息 + private void fillCommonInfo(File srcRootDir, IStorage storage) { + Program program = createProgramNode(javaFiles, srcRootDir.getAbsolutePath(), storage); + this.program = program; + visitDirectory(srcRootDir.getAbsolutePath(), program, storage); + storage.commit(); + } + + // Create coref root (aka. program) node of the input source. + private Program createProgramNode(List allJavaFiles, String repoDir, IStorage corefStorage) { + Program program = new Program(HashUtil.getStringSHA256(this.configuration.sourcepath.toString())); + if (allJavaFiles.size() > 0) { + if (repoDir.startsWith("/")) { + program.prefix = repoDir; + } else { + String absolutePath = allJavaFiles.get(0).getAbsolutePath(); + program.prefix = absolutePath.substring(0, absolutePath.indexOf(repoDir)); + } + } + corefStorage.storeProgram(program); + return program; + } + + // Create folder nodes from the input source root dir. + public void visitDirectory(String repoDir, Node parent, IStorage corefStorage) { + String[] blackFilePath = {"node_modules", ".git", ".idea"}; + if (StringUtils.containsAnyIgnoreCase(repoDir, blackFilePath)) { + log.info("ignore dir: {}", repoDir); + return; + } + + File file = new File(repoDir); + + // Ignore the folder starts with "." + if (file.isDirectory() && !(file.getName().startsWith("."))) { + String absolutePath = file.getAbsolutePath(); + + Folder parentFolder = new Folder(HashUtil.getStringSHA256(absolutePath)); + parentFolder.name = file.getName(); + parentFolder.parent = parent; + + // Calculate the relative path of the folder. + if (absolutePath.endsWith(srcRootDir.getAbsolutePath())) { + parentFolder.qualifiedName = "ROOT"; + } else { + char head = repoDir.charAt(0); + switch (head) { + case '/': + parentFolder.qualifiedName = absolutePath.substring(srcRootDir.getAbsolutePath().length() + 1); + break; + case '.': + parentFolder.qualifiedName = absolutePath.substring(absolutePath.indexOf(repoDir) + 2); + break; + default: + parentFolder.qualifiedName = absolutePath.substring(absolutePath.indexOf(repoDir)); + } + } + corefStorage.storeFolder(parentFolder); + + // Recursively visit the sub folders. + for (File f : file.listFiles()) { + if (f.isDirectory()) { + visitDirectory(f.getAbsolutePath(), parentFolder, corefStorage); + } else if (f.getName().endsWith(".java")) { + SharedManager.FILE_MAP.put(f.getAbsolutePath(), parentFolder.hashId); + } + } + } + } + + /** + * 生成coref ast + */ + public void sequenceDumpCorefAST(String corefASTPath){ + log.info("Dump Coref AST with {} java files.", javaFiles.size()); + ProgressBarBuilder pbb = new ProgressBarBuilder() + .setInitialMax(javaFiles.size()) + .setTaskName("Dump COREF-Java AST ") + .setStyle(ProgressBarStyle.ASCII); + for (File javaFile : ProgressBar.wrap(javaFiles, pbb)) { + try { + CorefASTDumpStorage storage = new CorefASTDumpStorage(corefASTPath, this.srcRootDir.toString(), javaFile, this.basicProject, configuration.repository); + analyseFile(configuration, basicProject, storage, program, javaFile); + storage.commit(); + } catch (Throwable e) { + log.error("Error when extracting: " + javaFile.getAbsolutePath(), e); + } + } + } + /** + * run analysis in file sequence (with specific files) + */ + public void sequenceAnalyse(String dbDir, String dbFileName) { + log.info("Analyse project with {} java files.", javaFiles.size()); + + IStorage storage = new SqliteStorage2(dbDir, dbFileName); + fillCommonInfo(this.srcRootDir, storage); + + ProgressBarBuilder pbb = new ProgressBarBuilder() + .setInitialMax(javaFiles.size()) + .setTaskName("Extracting COREF-Java") + .setStyle(ProgressBarStyle.ASCII); + for (File javaFile : ProgressBar.wrap(javaFiles, pbb)) { + try { + analyseFile(configuration, basicProject, storage, program, javaFile); + storage.commit(); + } catch (Throwable e) { + log.error("Error when extracting: " + javaFile.getAbsolutePath(), e); + } + } + } + + public void parallelAnalyse(String pathPrefix, int workerCount, String dbDir, String dbFileName) throws InterruptedException, IOException { + ExecutorService psiExecutePool = new ForkJoinPool(workerCount); + + // 注册关闭hook函数,优雅退出 + Runtime.getRuntime().addShutdownHook(new Thread() { + @Override + public void run() { + log.info("calling shutdown hook."); + psiExecutePool.shutdown(); + } + }); + + List allJavaPaths = basicProject.allJavaPaths().collect(Collectors.toList()); + log.info("Analyse project with {} java files.", javaFiles.size()); + ThreadLocal threadLocal = new ThreadLocal<>(); + List> partedList = Lists.partition(allJavaPaths, DEFAULT_PARALLEL_BATCH_SIZE); + log.info("Parallel Extraction Mode, Worker Count: {}, Batch Size: {}, Batch Count: {}", workerCount, DEFAULT_PARALLEL_BATCH_SIZE, partedList.size()); + CountDownLatch latch = new CountDownLatch(partedList.size()); + IStorage mergedStorage = new SqliteStorage2(dbDir, dbFileName); + fillCommonInfo(srcRootDir, mergedStorage); + + ProgressBar parallelProgressBar = new ProgressBarBuilder() + .setInitialMax(javaFiles.size()) + .setTaskName("Parallel Extracting COREF-Java") + .setStyle(ProgressBarStyle.ASCII) + .build(); + for (int i = 0; i < partedList.size(); i++) { + int idx = i; + List part = partedList.get(i); + psiExecutePool.submit(() -> { + String sqliteFileDir = Paths.get(pathPrefix).toAbsolutePath().toString(); + IStorage storage = new SqliteStorage2(sqliteFileDir, String.valueOf(idx)); + + part.stream() + .parallel() + .forEach(javaPath -> { + PsiProject threadProject; + threadProject = threadLocal.get(); + if (threadProject == null) { + threadProject = PsiProject.buildProject(configuration); + threadLocal.set(threadProject); + } + analyseFile(configuration, threadProject, storage, program, javaPath); + }); + + // end of batch analysis, begin to storage + storage.commit(); + latch.countDown(); + parallelProgressBar.stepBy(part.size()); + }); + } + + latch.await(); + psiExecutePool.shutdown(); + + String mergedDBFileName = dbDir + File.separator + dbFileName; + SqliteUtil.importSqlite( + pathPrefix, + mergedDBFileName + ); + + // 合并完成后,删除分片 + log.info("after merge. Will delete batch file dir: {}", pathPrefix); + FileUtils.deleteDirectory(Paths.get(pathPrefix).toFile()); + } + + + public void incrementalAnalyse(String dbDir, String dbFileName, CorefCache corefCache, String commitId) throws InterruptedException { + log.info("start inc analyse"); + + IStorage storage = new SqliteStorage2(dbDir, dbFileName); + fillCommonInfo(this.srcRootDir, storage); + + Set cachedFileIds = corefCache.getAllObjectIds(); + log.info("end of get all objects"); + // 计算所有源文件的hash信息,存储在内存中 + Map currentFileObjectMap = new HashMap<>(); + for (File javaFile : javaFiles) { + FileScopeCorefObject fileObject = new FileScopeCorefObject(); + String currentFileId = HashUtil.getFileSha1Hash(javaFile); + fileObject.setHashId(currentFileId); + fileObject.setSourceFile(javaFile); + fileObject.setCacheFile(new File(corefCache.getLocalObjectDir().getAbsolutePath() + "/" + currentFileId)); + currentFileObjectMap.put(currentFileId, fileObject); + } + + // 找出当前文件集中存在,且缓存中不存在的。就是待分析的文件集 + Set diffSet = Sets.difference(currentFileObjectMap.keySet(), cachedFileIds).immutableCopy(); + Set toBeAnalyzedFileObject = new HashSet<>(); + for (Map.Entry fileObjectEntry : currentFileObjectMap.entrySet()) { + if (diffSet.contains(fileObjectEntry.getKey())) { + toBeAnalyzedFileObject.add(fileObjectEntry.getValue()); + } + } + log.info("total file: {}, to be analyzed file: {}", javaFiles.size(), toBeAnalyzedFileObject.size()); + + // 下载文件 + Set sameSet = Sets.intersection(currentFileObjectMap.keySet(), cachedFileIds).immutableCopy(); + corefCache.getObjectByIds(sameSet); + log.info("get intersection objects ends."); + + // 开始抽取 + ProgressBar pb = new ProgressBarBuilder() + .setInitialMax(toBeAnalyzedFileObject.size()) + .setTaskName("Incremental Extracting COREF-Java") + .setStyle(ProgressBarStyle.ASCII).build(); + + // 并行抽取 + CountDownLatch latch = new CountDownLatch(toBeAnalyzedFileObject.size()); + List> partedList = Lists.partition(Lists.newArrayList(toBeAnalyzedFileObject), DEFAULT_PARALLEL_BATCH_SIZE); + ExecutorService psiExecutePool = new ForkJoinPool(8); + ThreadLocal threadLocal = new ThreadLocal<>(); + for (List part : partedList) { + psiExecutePool.submit(() -> { + try { + part.stream() + .parallel() + .forEach(fileObject -> { + IStorage fileStorage = new SqliteStorage2(corefCache.getLocalObjectDir().getAbsolutePath(), fileObject.getHashId()); + PsiProject threadProject; + threadProject = threadLocal.get(); + if (threadProject == null) { + threadProject = PsiProject.buildProject(configuration); + threadLocal.set(threadProject); + } + + analyseFile(configuration, threadProject, fileStorage, program, fileObject.getSourceFile()); + fileStorage.commit(); + latch.countDown(); + pb.stepBy(1); + }); + } catch (Throwable e) { + log.error("Error when extracting: ", e); + } + }); + } + + latch.await(); + psiExecutePool.shutdown(); + log.info("end extracting."); + + log.info("analyze done. Will adding {} files to cache. ", toBeAnalyzedFileObject.size()); + corefCache.putObjects(toBeAnalyzedFileObject); + log.info("put to cache objects ends."); + Commit commit = new Commit(commitId, currentFileObjectMap.values(), srcRootDir); + corefCache.putCommit(commit); + log.info("put to cache refs ends."); + + // 合并成一个大DB,用于查询 + Instant beforeMerge = Instant.now(); + Set currentFileCorefData = currentFileObjectMap.values().stream() + .map(FileScopeCorefObject::getCacheFile) + .collect(Collectors.toSet()); + SqliteUtil.importSqlite( + currentFileCorefData, + dbDir + "/" + dbFileName + ); + long timeCost = Duration.between(beforeMerge, Instant.now()).getSeconds(); + log.info("time cost of merge db: {}s", timeCost); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SharedManager.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SharedManager.java new file mode 100644 index 00000000..84382b03 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SharedManager.java @@ -0,0 +1,45 @@ +package com.alipay.codequery.coref.core; + +import com.alipay.codequery.coref.model.Type; +import com.alipay.codequery.coref.storage.IStorage; +import com.alipay.codequery.util.PsiUtil; +import com.alipay.codequery.coref.util.HashUtil; +import org.jetbrains.kotlin.com.intellij.psi.*; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + + +public class SharedManager { + + public static final Set RESOLVED_ANNOTATION_SET = Collections.synchronizedSet(new HashSet<>()); + public static final Map FILE_MAP = new ConcurrentHashMap<>(); + private static final Map TYPE_MAP = new ConcurrentHashMap<>(); + + public static void clear() { + RESOLVED_ANNOTATION_SET.clear(); + FILE_MAP.clear(); + TYPE_MAP.clear(); + } + + public static Type getType(IStorage storage, PsiType type) { + String qualifiedName = PsiUtil.getQualifiedNameIfPossible(type); + if (type instanceof PsiPrimitiveType) { + for (Type.PrimitiveType primitiveType : Type.PrimitiveType.values()) { + if (primitiveType.name.equals(qualifiedName)) { + return new Type((long) primitiveType.index); + } + } + } else if (type instanceof PsiMethodReferenceType || type instanceof PsiArrayType || type instanceof PsiClassType) { + return TYPE_MAP.computeIfAbsent(qualifiedName, (k) -> { + Long hashId = HashUtil.hashString(k); + Type elementType = new Type(hashId); + elementType.qualifiedName = k; + elementType.name = PsiUtil.getNameIfPossible(type); + storage.storeReferenceType(elementType); + return elementType; + }); + } + return new Type((long) -1); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SignatureGenerator.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SignatureGenerator.java new file mode 100644 index 00000000..73a468b3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/core/SignatureGenerator.java @@ -0,0 +1,128 @@ +package com.alipay.codequery.coref.core; + +import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jetbrains.kotlin.com.intellij.openapi.util.TextRange; +import org.jetbrains.kotlin.com.intellij.psi.*; + +import java.util.ArrayList; +import java.util.List; + +public class SignatureGenerator { + private static final Logger LOGGER = LogManager.getLogger(SignatureGenerator.class); + + public static String generate(PsiElement element) { + String signature; + if (element instanceof PsiClass) { + signature = SignatureGenerator.generateClassSignature((PsiClass) element); + } else if (element instanceof PsiMethod) { + signature = SignatureGenerator.generateMethodSignature((PsiMethod) element); + } else if (element instanceof PsiField) { + signature = SignatureGenerator.generateFieldSignature((PsiField) element); + } else { + signature = SignatureGenerator.generateCommonElementSignature(element); + } + + return signature; + } + + private static String generateClassSignature(PsiClass psiClass) { + // for generate signature of method whose class is null + if(psiClass == null) { + return "CorefDummyClass"; + } + // if a class is an anonymous class or it is a local class inside a method. + if (psiClass instanceof PsiAnonymousClass || psiClass.getQualifiedName() == null) { + return generateCommonElementSignature(psiClass); + } + if (psiClass instanceof PsiTypeParameter) { + return generateCommonElementSignature(psiClass); + } + if (psiClass.getQualifiedName() != null) { + return psiClass.getQualifiedName(); + } + + // may be method's inner class. + // 普通inner class的parent是PsiClass,可以正常获取到qualified name + // method scope的inner class,psi中算作变量声明,因此我们当成普通变量来处理 + if (psiClass.getParent() instanceof PsiDeclarationStatement) { + return generateCommonElementSignature(psiClass); + } + throw new RuntimeException("cannot generate signature for PsiClass: " + psiClass); + } + + private static String generateMethodSignature(PsiMethod psiMethod) { + // return CorefExtractor.mangleMethodName(psiMethod); + StringBuilder paramListSignature = new StringBuilder(); + PsiParameter[] params = psiMethod.getParameterList().getParameters(); + paramListSignature.append("("); + for (int i = 0; i < params.length; ++i) { + PsiType paramType = params[i].getType(); + paramListSignature.append(paramType.getCanonicalText()); + if (i != params.length - 1) { + paramListSignature.append(","); + } + } + paramListSignature.append(")"); + + // Fixed: if the method exists type parameter, add it at the end of the method signature to guarantee the signature uniques. + // TODO: the current design may not be the best choice, needs to review it later. + // StringBuilder typeParameterSignature = new StringBuilder(); + String typeParameterListSignature = ""; + PsiTypeParameterList typeParameterList = psiMethod.getTypeParameterList(); + try { + // typeParameterList.getText() may throws NPE + if(typeParameterList != null && !(typeParameterList.getText().isEmpty())) { + List typeParameterSignature = new ArrayList<>(); + for (PsiTypeParameter t : typeParameterList.getTypeParameters()) { + typeParameterSignature.add(t.getText()); + } + typeParameterListSignature = ":<" + StringUtils.join(typeParameterSignature, ", ") + ">"; + } + } catch (Exception e) { + LOGGER.debug(e.getMessage(), e); + } + + String methodName = psiMethod.getName(); + if (psiMethod.isConstructor()) { + // 若是构造函数,则使用javac的处理方式,https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-2.html#jvms-2.9.1 + methodName = ""; + } + + return generateClassSignature(psiMethod.getContainingClass()) + "." + methodName + paramListSignature + typeParameterListSignature; + } + + // TODO type info? + private static String generateFieldSignature(PsiField psiField) { + String classSignature = generateClassSignature(psiField.getContainingClass()); + return classSignature + "." + psiField.getName(); + } + + private static String generateParameterSignature(PsiParameter psiParameter) { + return generateCommonElementSignature(psiParameter); + } + + private static String generateLocalVariableSignature(PsiVariable psiVariable) { + return generateCommonElementSignature(psiVariable); + } + + private static String generateLocationSignature(PsiElement psiElement) { + TextRange textRange = psiElement.getTextRange(); + return textRange.getStartOffset() + "-" + textRange.getEndOffset(); + } + + // TODO: PsiKeywordImpl:(0,7) ? + private static String generateCommonElementSignature(PsiElement psiElement) { + String offsetString = "-1"; + try { + if (psiElement.getTextRange() != null) { + offsetString = psiElement.getTextRange().toString(); + } + } catch (Exception e) { + LOGGER.debug(e.getMessage(), e); + } + return psiElement.toString() + ":" + offsetString; + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Annotation.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Annotation.java new file mode 100644 index 00000000..c706c9b7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Annotation.java @@ -0,0 +1,72 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@EqualsAndHashCode(callSuper = true) +@Data +public class Annotation extends Node { + + public Annotation(Long hashId) { + super(hashId); + } + + public static class AnnotationModel extends Node { + + public AnnotationModel(Long hashId) { + super(hashId); + } + + public Identifier name; + public String qualifiedName; + public Node resolveAnnotationType; + + public AnnotationCanResolved extractAnnotationCanResolved() { + return new AnnotationCanResolved(this.hashId, this.name.name, this.resolveAnnotationType.hashId, this.location.hashId, this.debug_message, this.parent.hashId); + } + + public AnnotationCanNotResolved extractAnnotationCanNotResolved() { + return new AnnotationCanNotResolved(this.hashId, this.qualifiedName, this.location.hashId, this.debug_message, this.parent.hashId); + } + + public AnnotationDeclaration extractAnnotationDeclaration() { + return new AnnotationDeclaration(this.hashId, this.qualifiedName); + } + } + + public static class AnnotationArgument extends Annotation { + + public com.alipay.codequery.coref.model.Expression kind; + public Expression value; + public int index; + + public AnnotationArgument(Long hashId) { + super(hashId); + } + + public AnnotationAccessArgumentWithName extractAnnotationArgumentWithName() { + return new AnnotationAccessArgumentWithName(this.hashId, this.parent.hashId, this.kind.hashId, this.value.hashId, this.location.hashId, this.index, this.debug_message); + } + + public AnnotationAccessArgumentWithoutName extractAnnotationArgumentWithoutName() { + return new AnnotationAccessArgumentWithoutName(this.hashId, this.parent.hashId, this.value.hashId, this.location.hashId, this.index, this.debug_message); + } + } + + public static class AnnotationParameter extends Method { + public Type type; + public Identifier name; + + public AnnotationParameter(Long hashId) { + super(hashId); + } + + public AnnotationDeclarationParameter extractAnnotationArgument() { + return new AnnotationDeclarationParameter(this.hashId, this.parent.hashId, this.type.hashId, this.name.hashId, this.location.hashId, this.debug_message); + } + } + + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Class.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Class.java new file mode 100644 index 00000000..eb5b4d84 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Class.java @@ -0,0 +1,79 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.*; +import com.alipay.codequery.dal.mybatis.domain.LocalClass; +import com.alipay.codequery.dal.mybatis.domain.clazz; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +@EqualsAndHashCode(callSuper = true) +@Data +public class Class extends Node { + public Class(Long hashId) { + super(hashId); + } + + public static class ClassDefinition extends Statement { + + public Identifier identifier; + public List superclass; + public Modifier modifier; + public List annotations; + public String qualifiedName; + public Expression restype; + public ClassDefinition implemented; + + public ClassDefinition(Long hashId) { + super(hashId); + } + + public clazz extractClass() { + return new clazz(this.hashId, qualifiedName, identifier.hashId, this.location.hashId, this.parent.hashId); + } + + public InterfaceInfo extractInterface() { + return new InterfaceInfo(this.hashId, qualifiedName, identifier.hashId, this.location.hashId, this.parent.hashId); + } + + public LocalClass extractLocalClass() { + return new LocalClass(this.hashId, this.identifier.name, this.debug_message, this.location.hashId, this.parent.hashId); + } + + } + + public static class AnonymousClass extends ClassDefinition { + public ClassDefinition baseClass; + public Type baseType; + + public AnonymousClass(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.AnonymousClass extractAnonymousClass() { + return new com.alipay.codequery.dal.mybatis.domain.AnonymousClass(this.hashId, this.baseClass.hashId, this.baseType.hashId, this.location.hashId, this.parent.hashId); + } + } + + + public static class ClassHierarchy extends Node { + public Long child; + public Long parent; + + public ClassHierarchy() { + super(); + } + + public ClassHierarchy (Long childId, Long parentId) { + this.child = childId; + this.parent = parentId; + } + + public com.alipay.codequery.dal.mybatis.domain.ClassHierarchy extractClassHierarchy() { + return new com.alipay.codequery.dal.mybatis.domain.ClassHierarchy(child, parent); + } + } + + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Comment.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Comment.java new file mode 100644 index 00000000..43b89369 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Comment.java @@ -0,0 +1,78 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.JavadocComment; +import com.alipay.codequery.dal.mybatis.domain.JavadocDataToken; +import com.alipay.codequery.dal.mybatis.domain.JavadocTag; +import com.alipay.codequery.dal.mybatis.domain.JavadocTagValue; + +public class Comment extends Node { + + public String text; + public String commentType; + + public Comment(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Comment extractComment() { + return new com.alipay.codequery.dal.mybatis.domain.Comment(this.hashId, this.text, this.parent.hashId, this.location.hashId, this.commentType); + } + + public static class JavaDocComment extends Comment { + + public String text; + public Node documentedItem; + public int index; + + public JavaDocComment(Long hashId) { + super(hashId); + } + + public JavadocComment extractJavaDocComment() { + return new JavadocComment(this.hashId, this.documentedItem.hashId, this.text, this.location.hashId, this.parent.hashId); + } + } + + public static class JavaDocTag extends JavaDocComment { + + public String name; + public String value; + public Comment containedComment; + + public JavaDocTag(Long hashId) { + super(hashId); + } + + public JavadocTag extractJavadocTag() { + return new JavadocTag(this.hashId, this.name, this.value, this.containedComment.hashId, this.index, this.location.hashId); + } + } + + /** + * Model for JavaDocTagValue element. + */ + public static class JavaDocTagValue extends JavaDocTag { + public JavaDocTagValue(Long hashId) { + super(hashId); + } + + public JavadocTagValue extractJavaDocTagValue() { + return new JavadocTagValue(this.hashId, this.value, this.parent.hashId, this.location.getHashId()); + } + } + + /** + * Model for JavaDocDataToken element. + */ + public static class JavaDocDataToken extends JavaDocTag { + + public JavaDocDataToken(Long hashId) { + super(hashId); + } + + public JavadocDataToken extractJavaDocDataToken() { + return new JavadocDataToken(this.hashId, this.value, this.parent.hashId, this.index, this.location.getHashId()); + } + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Constructor.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Constructor.java new file mode 100644 index 00000000..4e2c4287 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Constructor.java @@ -0,0 +1,13 @@ +package com.alipay.codequery.coref.model; + +public class Constructor extends Method { + public int isConstructor; + + public Constructor(int id, Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Constructor extractConstructor(){ + return new com.alipay.codequery.dal.mybatis.domain.Constructor(this.hashId, this.identifier.name, this.signature,this.parent.hashId,this.location.hashId, this.definitionBody); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Containers.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Containers.java new file mode 100644 index 00000000..c01fa371 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Containers.java @@ -0,0 +1,8 @@ +package com.alipay.codequery.coref.model; + + +public class Containers extends Node { + public Containers(Long hashId) { + super(hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Expression.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Expression.java new file mode 100644 index 00000000..6f60ee3e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Expression.java @@ -0,0 +1,408 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.*; + +import java.util.ArrayList; +import java.util.List; + + +public class Expression extends Node { + + public Expression(Long hashId) { + super(hashId); + } + + public String baseName; + + public int index; + public Type type; + + public com.alipay.codequery.dal.mybatis.domain.Expression extractExpression() { + return new com.alipay.codequery.dal.mybatis.domain.Expression(this.hashId, this.baseName, this.parent.hashId, this.index, this.location.hashId, this.debug_message); + } + + public ReferenceExpression extractReferenceExpression() { + return new ReferenceExpression(this.hashId); + } + + public ReferenceElement extractReferenceElement() { + return new ReferenceElement(this.hashId, this.debug_message, this.parent.hashId, this.location.hashId); + } + + public ImportStaticReferenceElement extractImportStaticReferenceElement() { + return new ImportStaticReferenceElement(this.hashId, this.debug_message, this.parent.hashId, this.location.hashId); + } + + public ClassInitializer extractClassInitializer() { + return new ClassInitializer(this.hashId, this.debug_message, this.parent.hashId, this.location.hashId); + } + + + public static class ReferenceList extends ExpressionList { + public String role; + + public ReferenceList(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.ReferenceList extractReferenceList() { + return new com.alipay.codequery.dal.mybatis.domain.ReferenceList(this.hashId, this.location.hashId, this.parent.hashId, this.debug_message, this.role); + } + } + + public static class ExpressionList extends Expression { + public List subexps = new ArrayList<>(); + public Expression list; + + public ExpressionList(Long hashId) { + super(hashId); + } + + public int indexOrder; + public Type type; + public int size; + + public com.alipay.codequery.dal.mybatis.domain.ExpressionList extractExpressionList() { + return new com.alipay.codequery.dal.mybatis.domain.ExpressionList(this.hashId, this.parent.hashId, this.location.hashId, this.debug_message, size); + } + + public ReferenceExpression extractReferenceExpression() { + return new ReferenceExpression(this.hashId); + } + } + + public static class FieldAccess extends Expression { + + public FieldAccess(int id, Long hashId) { + super(hashId); + } + + public String name; + } + + public static class InstanceOfExpression extends Expression { + public InstanceOfExpression(Long hashId) { + super(hashId); + } + + public Expression operand; + public Expression checkType; + public Expression pattern; + + public InstanceofExpression extractInstanceOfExpression() { + return new InstanceofExpression(this.hashId, this.operand.hashId, this.checkType.hashId, this.pattern.hashId); + } + } + + public static class ArrayExpression extends Expression { + + public ArrayExpression(Long hashId) { + super(hashId); + } + + List elements; + } + + public static class ArrayAccessExpression extends Expression { + public ArrayExpression arrayExpression; + public Expression indexExpression; + + public ArrayAccessExpression(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.ArrayAccessExpression extractArrayAccessExpression() { + return new com.alipay.codequery.dal.mybatis.domain.ArrayAccessExpression(this.hashId, this.indexExpression.hashId, this.arrayExpression.hashId); + } + + } + + + public static class InvokeExpression extends Expression { + + public InvokeExpression(Long hashId) { + super(hashId); + } + + public Expression callee; + public Identifier identifier; + public List args = new ArrayList<>(); + + public CallableBinding extractCallableBinding() { + return new CallableBinding(this.hashId, this.callee.hashId); + } + } + + public static class CallExpression extends InvokeExpression { + + public CallExpression(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.NewExpression extractNewExpression() { + return new com.alipay.codequery.dal.mybatis.domain.NewExpression(this.hashId, this.callee.hashId, this.type.hashId); + } + } + + public static class MethodCallExpression extends CallExpression { + + public MethodCallExpression(Long hashId) { + super(hashId); + } + + public Expression reference; + + public ReferenceList argumentList; + + public int isConstructor; + + public MethodAccessExpressionWithoutType extractMethodAccessExpressionWithoutType() { + return new MethodAccessExpressionWithoutType(this.hashId, this.reference.hashId, argumentList.hashId); + } + + public MethodAccessExpressionWithType extractMethodAccessExpressionWithType() { + return new MethodAccessExpressionWithType(this.hashId, this.type.hashId, reference.hashId, argumentList.hashId); + } + + public MethodReferenceExpression extractMethodReferenceExpression() { + return new MethodReferenceExpression(this.hashId, this.isConstructor); + } + + public SuperAccessExpression extractSuperAccessExpression() { + return new SuperAccessExpression(this.hashId); + } + + public SuperConstructorInvocation extractSuperConstructorInvocation() { + return new SuperConstructorInvocation(this.hashId); + } + + } + + + public static class NewExpression extends CallExpression { + + public NewExpression(Long hashId) { + super(hashId); + } + + public Expression qualifier; + public Expression reference; + public int dimension; + + public com.alipay.codequery.dal.mybatis.domain.NewExpression extractNewExpression() { + return new com.alipay.codequery.dal.mybatis.domain.NewExpression(this.hashId, this.reference.hashId, this.type.hashId); + } + + public ArrayCreationExpression extractArrayCreationExpression() { + return new ArrayCreationExpression(this.hashId, this.dimension, this.type.hashId); + } + + public ConstructorInvocation extractConstructorInvocation() { + return new ConstructorInvocation(this.hashId, this.reference.hashId); + } + + } + + public static class CastExpression extends Expression { + public Expression operand; + public CastExpression(Long hashId) { + super(hashId); + } + + public TypeCastExpression extractTypeCastExpressiont() { + return new TypeCastExpression(this.hashId, this.operand.hashId); + } + } + + public static class UnaryExpression extends Expression { + + public UnaryExpression(Long hashId) { + super(hashId); + } + + public Expression operand; + public String opcode; + public int isPostfix; + + public com.alipay.codequery.dal.mybatis.domain.UnaryExpression extractUnaryExpression() { + return new com.alipay.codequery.dal.mybatis.domain.UnaryExpression(this.hashId, this.operand.hashId, this.opcode, this.isPostfix); + } + + } + + public static class UnaryOperator extends UnaryExpression { + + public UnaryOperator(int id, Long hashId) { + super(hashId); + } + } + + public static class UpdateExpression extends Expression { + + public UpdateExpression(int id, Long hashId) { + super(hashId); + } + } + + public static class UpdateOperator extends UpdateExpression { + + public UpdateOperator(int id, Long hashId) { + super(id, hashId); + } + } + + public static class PolyadicExpression extends Expression { + + public PolyadicExpression(Long hashId) { + super(hashId); + } + + public int size; + public String opcode; + + public com.alipay.codequery.dal.mybatis.domain.PolyadicExpression extractPolyadicExpression() { + return new com.alipay.codequery.dal.mybatis.domain.PolyadicExpression(this.hashId, this.size, this.opcode); + } + } + + public static class BinaryExpression extends PolyadicExpression { + + public BinaryExpression(Long hashId) { + super(hashId); + } + + public Expression lhs; + public Expression rhs; + public String opcode; + + public com.alipay.codequery.dal.mybatis.domain.BinaryExpression extractBinaryExpression() { + return new com.alipay.codequery.dal.mybatis.domain.BinaryExpression(this.hashId, this.lhs.hashId, this.rhs.hashId, this.opcode); + } + } + + public static class BinaryOperator extends Expression { + + public BinaryOperator(int id, Long hashId) { + super(hashId); + } + + public Expression opcode; + } + + public static class AssignmentExpression extends Expression { + + public AssignmentExpression(Long hashId) { + super(hashId); + } + + public Expression lhs; + public Expression rhs; + public String opcode; + + public com.alipay.codequery.dal.mybatis.domain.AssignmentExpression extractAssignmentExpression() { + return new com.alipay.codequery.dal.mybatis.domain.AssignmentExpression(this.hashId, this.lhs.hashId, this.rhs.hashId, this.opcode); + } + } + + public static class AssignmentOperator extends Expression { + + public AssignmentOperator(int id, Long hashId) { + super(hashId); + } + } + + public static class LambdaExpression extends Expression { + + public LambdaExpression(Long hashId) { + super(hashId); + } + + public Statement body; + public Expression paramterList; + public int isVoidCompatible; + public int isValueCompatible; + + public com.alipay.codequery.dal.mybatis.domain.LambdaExpression extractLambdaExpression() { + return new com.alipay.codequery.dal.mybatis.domain.LambdaExpression(this.hashId, this.paramterList.hashId, this.body.hashId, this.isVoidCompatible, this.isValueCompatible); + } + + } + + public static class ThisExpression extends Expression { + + public ThisExpression(Long hashId) { + super(hashId); + } + + public Expression qualifier; + public Expression reference; + + public ThisAccessExpression extractThisAccessExpression() { + return new ThisAccessExpression(this.hashId); + } + + public ThisExpressionWithQualifier extractThisExpressionWithQualifier() { + return new ThisExpressionWithQualifier(this.hashId, this.qualifier.hashId); + } + } + + + public static class SuperExpression extends Expression { + + public SuperExpression(Long hashId) { + super(hashId); + } + + public Expression qualifier; + + public com.alipay.codequery.dal.mybatis.domain.SuperExpression extractSuperExpression() { + return new com.alipay.codequery.dal.mybatis.domain.SuperExpression(this.hashId); + } + + public SuperExpressionWithQualifier extractSuperExpressionWithQualifier() { + return new SuperExpressionWithQualifier(this.hashId, qualifier.hashId); + } + + public SuperAccessExpression extractSuperAccessExpression() { + return new SuperAccessExpression(this.hashId); + } + + } + + public static class ConditionalExpression extends Expression { + + public ConditionalExpression(Long hashId) { + super(hashId); + } + + public Expression condition; + public Expression thenExpression; + public Expression elseExpression; + + public com.alipay.codequery.dal.mybatis.domain.ConditionalExpression extractCondtionalExpression() { + return new com.alipay.codequery.dal.mybatis.domain.ConditionalExpression(this.hashId, this.condition.hashId, this.thenExpression.hashId, this.elseExpression.hashId); + } + + } + + public static class ArrayInitializationExpression extends Expression { + + public ArrayInitializationExpression(Long hashId) { + super(hashId); + } + + public Expression initializer; + + public ArrayInitializerExpression extractArrayInitializerExpression() { + + return new ArrayInitializerExpression(this.hashId, this.type.hashId); + } + + + public AnnotationArrayInitializer extractAnnotationArrayInitializer() { + + return new AnnotationArrayInitializer(this.hashId, this.debug_message, this.parent.hashId, this.location.hashId); + } + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Field.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Field.java new file mode 100644 index 00000000..d8fbdc0f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Field.java @@ -0,0 +1,19 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.EnumConstant; + + +public class Field extends Variable { + + public Field(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Field extractField() { + return new com.alipay.codequery.dal.mybatis.domain.Field(this.hashId, this.name, this.parent.hashId, this.debug_message, this.location.hashId); + } + + public EnumConstant extractEnumConstant() { + return new EnumConstant(this.hashId, this.name, this.parent.hashId, this.location.hashId, this.debug_message); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/File.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/File.java new file mode 100644 index 00000000..34395939 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/File.java @@ -0,0 +1,21 @@ +package com.alipay.codequery.coref.model; + + +public class File extends Containers{ + + public String qualifiedName; + public String extension; + public String name; + public Program program; + public Location.NumberOfLines numberOfLines; + + public com.alipay.codequery.dal.mybatis.domain.File extractFile(){ + return new com.alipay.codequery.dal.mybatis.domain.File(this.hashId,this.qualifiedName,this.extension,this.name, this.numberOfLines.hashId); + } + + public File(Long hashId) { + super(hashId); + } + + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Folder.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Folder.java new file mode 100644 index 00000000..264c1eb5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Folder.java @@ -0,0 +1,15 @@ +package com.alipay.codequery.coref.model; + + +public class Folder extends Containers{ + public String qualifiedName; + public String name; + + public Folder(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Folder extractFolder(){ + return new com.alipay.codequery.dal.mybatis.domain.Folder(this.hashId,this.qualifiedName,this.name, this.parent.hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Identifier.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Identifier.java new file mode 100644 index 00000000..76687d53 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Identifier.java @@ -0,0 +1,16 @@ +package com.alipay.codequery.coref.model; + + +public class Identifier extends Node { + + public Identifier(String name, Long hashId) { + super(hashId); + this.name = name; + this.hashId = hashId; + } + public String name; + + public com.alipay.codequery.dal.mybatis.domain.Identifier extractIdentifier(){ + return new com.alipay.codequery.dal.mybatis.domain.Identifier(this.hashId,this.location.hashId,this.name,this.parent.hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Literal.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Literal.java new file mode 100644 index 00000000..e4d9bd64 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Literal.java @@ -0,0 +1,18 @@ +package com.alipay.codequery.coref.model; + + +import com.alipay.codequery.dal.mybatis.domain.StringLiteral; + +public class Literal extends Expression { + + public Literal(Long hashId) { + super(hashId); + } + + public Object value; + public String type; + + public StringLiteral extractLiteral() { + return new StringLiteral(this.hashId, this.value.toString()); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/LocalVariable.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/LocalVariable.java new file mode 100644 index 00000000..10e377b0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/LocalVariable.java @@ -0,0 +1,13 @@ +package com.alipay.codequery.coref.model; + + +public class LocalVariable extends Variable { + + public LocalVariable(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.LocalVariable extractLocalVariable(){ + return new com.alipay.codequery.dal.mybatis.domain.LocalVariable(this.hashId, this.parent.hashId, this.location.hashId, this.debug_message, this.name, this.index); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Location.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Location.java new file mode 100644 index 00000000..1bbcbbd4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Location.java @@ -0,0 +1,59 @@ +package com.alipay.codequery.coref.model; + +public class Location extends Node { + + public File file; + public int startLineNumber; + public int startColumnNumber; + public int endLineNumber; + public int endColumnNumber; + public LocalLocation localLocation; + public NumberOfLines numberOfLines; + + public Location(Long hashId) { + super(hashId); + } + + public Location() { + } + + public Location(Long hashId, File file, LocalLocation localLocation) { + this.hashId = hashId; + this.file = file; + this.startLineNumber = localLocation.startLineNumber; + this.startColumnNumber = localLocation.startColumnNumber; + this.endLineNumber = localLocation.endLineNumber; + this.endColumnNumber = localLocation.endColumnNumber; + } + public com.alipay.codequery.dal.mybatis.domain.Location extractLocation(){ + return new com.alipay.codequery.dal.mybatis.domain.Location( + this.hashId, + this.file.hashId, + this.startLineNumber, + this.startColumnNumber, + this.endLineNumber, + this.endColumnNumber); + } + public static class LocalLocation extends Location { + public LocalLocation(int startLineNumber,int startColumnNumber, int endLineNumber, int endColumnNumber){ + this.startLineNumber = startLineNumber; + this.startColumnNumber = startColumnNumber; + this.endLineNumber = endLineNumber; + this.endColumnNumber = endColumnNumber; + } + } + + public static class NumberOfLines extends Location { + public int numberOfLines; + public int numberOfCommentLines; + public int numberOfCodeLines; + + public NumberOfLines(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.NumberOfLines extractNumberOfLines(){ + return new com.alipay.codequery.dal.mybatis.domain.NumberOfLines(this.hashId, this.numberOfLines,this.numberOfCodeLines,this.numberOfCommentLines); + } + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Method.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Method.java new file mode 100644 index 00000000..01ad5c1f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Method.java @@ -0,0 +1,24 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.Constructor; + + +public class Method extends Node { + public Identifier identifier; + public Type returnType; + public String signature; + public String definitionBody; + + public Method(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Method extractMethodDeclaration() { + return new com.alipay.codequery.dal.mybatis.domain.Method(this.hashId, identifier.name, signature, this.returnType.hashId, parent.hashId, this.location.hashId, this.definitionBody); + } + + public com.alipay.codequery.dal.mybatis.domain.Constructor extractConstructor() { + return new Constructor(this.hashId, identifier.name, signature, parent.hashId, this.location.hashId, this.definitionBody); + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Modifier.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Modifier.java new file mode 100644 index 00000000..94f889ff --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Modifier.java @@ -0,0 +1,42 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.ModifierList; + + +public class Modifier extends Node { + String PUBLIC = "public"; + String PROTECTED = "protected"; + String PRIVATE = "private"; + String PACKAGE_LOCAL = "packageLocal"; + String STATIC = "static"; + String ABSTRACT = "abstract"; + String FINAL = "final"; + String NATIVE = "native"; + String SYNCHRONIZED = "synchronized"; + String STRICTFP = "strictfp"; + String TRANSIENT = "transient"; + String VOLATILE = "volatile"; + String DEFAULT = "default"; + String OPEN = "open"; + String TRANSITIVE = "transitive"; + String SEALED = "sealed"; + String NON_SEALED = "non-sealed"; + + String[] MODIFIERS = { + PUBLIC, PROTECTED, PRIVATE, STATIC, ABSTRACT, FINAL, NATIVE, SYNCHRONIZED, STRICTFP, TRANSIENT, VOLATILE, DEFAULT, OPEN, TRANSITIVE, SEALED, NON_SEALED + }; + + public Modifier(Long hashId) { + super(hashId); + } + + public String name; + + public com.alipay.codequery.dal.mybatis.domain.Modifier extractModifier(){ + return new com.alipay.codequery.dal.mybatis.domain.Modifier(this.hashId, name,this.parent.hashId,this.location.hashId); + } + + public ModifierList extractModifierList(){ + return new ModifierList(this.hashId,this.parent.hashId,this.location.hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Module.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Module.java new file mode 100644 index 00000000..2988ea3d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Module.java @@ -0,0 +1,12 @@ +package com.alipay.codequery.coref.model; + + +public class Module extends Node { + public Module(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Module extractModule(){ + return new com.alipay.codequery.dal.mybatis.domain.Module(this.hashId,this.debug_message); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Node.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Node.java new file mode 100644 index 00000000..634cf999 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Node.java @@ -0,0 +1,24 @@ +package com.alipay.codequery.coref.model; + +import lombok.Data; + + +@Data +public class Node { + + public Location location; + public String debug_message; + public Long hashId; + public Type type; + public Node parent; + + public Node(Long hashId) { + this.hashId = hashId; + } + + public Node() { + } + +} + + diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpClass.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpClass.java new file mode 100644 index 00000000..bf297087 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpClass.java @@ -0,0 +1,14 @@ +package com.alipay.codequery.coref.model; + +public class NpClass extends Node { + public String name; + public String qualifiedName; + + public NpClass(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.NpClass extractNpClass() { + return new com.alipay.codequery.dal.mybatis.domain.NpClass(hashId, name, qualifiedName, parent.hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpFile.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpFile.java new file mode 100644 index 00000000..310c7093 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpFile.java @@ -0,0 +1,16 @@ +package com.alipay.codequery.coref.model; + +public class NpFile extends Node { + public String qualifiedName; + public String extension; + public String name; + public Long projectId; + + public NpFile(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.NpFile extractNpFile() { + return new com.alipay.codequery.dal.mybatis.domain.NpFile(hashId, qualifiedName, name, projectId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpInterface.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpInterface.java new file mode 100644 index 00000000..407493c0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpInterface.java @@ -0,0 +1,15 @@ +package com.alipay.codequery.coref.model; + +public class NpInterface extends Node { + public String name; + public String qualifiedName; + public String extension; + + public NpInterface(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.NpInterface extractNpInterface() { + return new com.alipay.codequery.dal.mybatis.domain.NpInterface(hashId, name, qualifiedName, parent.hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpMethod.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpMethod.java new file mode 100644 index 00000000..a18e6ed5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpMethod.java @@ -0,0 +1,15 @@ +package com.alipay.codequery.coref.model; + +public class NpMethod extends Node { + public String name; + public Type returnType; + public String signature; + + public NpMethod(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.NpMethod extractNpMethod() { + return new com.alipay.codequery.dal.mybatis.domain.NpMethod(this.hashId, name, signature, this.returnType.hashId, parent.hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpProject.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpProject.java new file mode 100644 index 00000000..5f5685f4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/NpProject.java @@ -0,0 +1,14 @@ +package com.alipay.codequery.coref.model; + +public class NpProject extends Node { + public String extension; + public String name; + + public NpProject(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.NpProject extractNpProject() { + return new com.alipay.codequery.dal.mybatis.domain.NpProject(hashId, extension, name); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Package.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Package.java new file mode 100644 index 00000000..4e60ffb1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Package.java @@ -0,0 +1,10 @@ +package com.alipay.codequery.coref.model; + + +public class Package extends Node { + public String packageName; + + public Package(Long hashId) { + super(hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parameter.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parameter.java new file mode 100644 index 00000000..124d7c73 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parameter.java @@ -0,0 +1,14 @@ +package com.alipay.codequery.coref.model; + + +public class Parameter extends Variable { + public int index; + + public Parameter(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Parameter extractParameter() { + return new com.alipay.codequery.dal.mybatis.domain.Parameter(this.hashId, this.name, this.index, this.parent.hashId, this.location.hashId, this.debug_message, this.type.hashId); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/ParameterList.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/ParameterList.java new file mode 100644 index 00000000..594b5f44 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/ParameterList.java @@ -0,0 +1,34 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.EmptyReferenceParameterList; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@EqualsAndHashCode(callSuper = true) +@Data +public class ParameterList extends Node{ + public ParameterList(Long hashId) { + super(hashId); + } + + public static class ReferenceParameterList extends ParameterList { + + public Type[] types; + + public ReferenceParameterList(Long hashId) { + super(hashId); + } + + public EmptyReferenceParameterList extractEmptyReferenceParameterList() { + return new EmptyReferenceParameterList(this.hashId, this.parent.hashId, this.debug_message, this.location.hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.ReferenceParameterList extractReferenceParameterList(int index) { + + return new com.alipay.codequery.dal.mybatis.domain.ReferenceParameterList(types[index].hashId, this.hashId, index, this.parent.hashId, this.debug_message, this.location.hashId); + + } + } +} + diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parent.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parent.java new file mode 100644 index 00000000..8517c5a4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Parent.java @@ -0,0 +1,21 @@ +package com.alipay.codequery.coref.model; + +import lombok.Data; +import lombok.EqualsAndHashCode; + + +@EqualsAndHashCode(callSuper = true) +@Data +public class Parent extends Node { + public Long childId; + public String parentType; + + public Parent(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Parent extractParent(){ + return new com.alipay.codequery.dal.mybatis.domain.Parent(this.hashId,this.parentType); + + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Primitive.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Primitive.java new file mode 100644 index 00000000..5091db62 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Primitive.java @@ -0,0 +1,25 @@ +package com.alipay.codequery.coref.model; + + +public class Primitive extends Type { + + public String value; + + public Primitive(Long hashId) { + super(hashId); + } + + public enum PrimitiveType { + BYTE, + CHAR, + DOUBLE, + FLOAT, + INT, + LONG, + SHORT, + BOOLEAN, + VOID, + NULL + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Program.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Program.java new file mode 100644 index 00000000..936be768 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Program.java @@ -0,0 +1,22 @@ +package com.alipay.codequery.coref.model; + +import java.util.ArrayList; +import java.util.List; + + +public class Program extends Node { + + public List list = new ArrayList(); + + // FIXME: the correct concept is root. + // FIXME: rootdir should be in some table like Debug/Job Information + public String prefix = ""; + + public Program(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.Program extractProgram(){ + return new com.alipay.codequery.dal.mybatis.domain.Program(this.hashId, this.prefix); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Statement.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Statement.java new file mode 100644 index 00000000..6aec97c8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Statement.java @@ -0,0 +1,402 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.*; + +import java.util.ArrayList; +import java.util.List; + + +public class Statement extends Node{ + + public String baseName; + + public Statement(Long hashId) { + super(hashId); + } + public int index; + + public com.alipay.codequery.dal.mybatis.domain.Statement extractStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.Statement(this.hashId,this.parent.hashId,this.index,this.location.hashId,this.debug_message, this.baseName); + } + + public static class ExpressionStatement extends Statement { + + public ExpressionStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression expr; + + public com.alipay.codequery.dal.mybatis.domain.ExpressionStatement extractExpressionStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.ExpressionStatement(this.hashId, this.expr.hashId); + } + } + + public static class BlockStatement extends Statement { + + public BlockStatement(Long hashId) { + super(hashId); + } + + public List stats = new ArrayList<>(); + + public CodeBlock codeBlock; + public com.alipay.codequery.dal.mybatis.domain.BlockStatement extractBlockStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.BlockStatement(this.hashId, this.codeBlock.hashId); + } + } + + public static class CodeBlock extends Node { + + public CodeBlock(Long hashId) { + super(hashId); + } + + public List stats = new ArrayList<>(); + public int count; + public int isEmpty; + + public com.alipay.codequery.dal.mybatis.domain.CodeBlock extractCodeBlock(){ + return new com.alipay.codequery.dal.mybatis.domain.CodeBlock(this.hashId, this.count, this.parent.hashId, this.isEmpty,this.location.hashId,this.debug_message); + } + } + + public static class ControlStatement extends Statement { + + public ControlStatement(Long hashId) { + super(hashId); + } + } + + public static class ConstructorCallStatement extends Statement { + + public ConstructorCallStatement(Long hashId) { + super(hashId); + } + public Constructor constructor; + + } + + public static class ImportStatement extends Statement { + + public ImportStatement(Long hashId) { + super(hashId); + } + + public Statement reference; + public String referenceName; + public int isForeignImport; + + public ImportStaticStatement extractImportStaticStatement(){ + return new ImportStaticStatement(this.hashId,this.reference.hashId,this.debug_message,this.parent.hashId,this.location.hashId); + } + + public ImportInfo extractImport(){ + return new ImportInfo( this.hashId,this.reference.hashId, this.debug_message,this.parent.hashId,this.location.hashId, this.isForeignImport); + } + + } + + public static class ContinueStatement extends Statement { + + public ContinueStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Identifier discriminant; + public Statement continuedStatement; + + public com.alipay.codequery.dal.mybatis.domain.ContinueStatement extractContinueStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.ContinueStatement(this.hashId,this.continuedStatement.hashId); + } + + } + + public static class BreakStatement extends Statement { + + public BreakStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Identifier discriminant; + public Statement exitedStatemnt; + + public com.alipay.codequery.dal.mybatis.domain.BreakStatement extractBreakStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.BreakStatement(this.hashId, this.exitedStatemnt.hashId); + } + + } + + public static class EmptyStatement extends Statement { + + public EmptyStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.EmptyStatement extractEmptyStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.EmptyStatement( this.hashId); + } + + } + + public static class LabeledStatement extends Statement { + + public LabeledStatement(Long hashId) { + super(hashId); + } + + public Identifier identifier; + public Statement statement; + + public com.alipay.codequery.dal.mybatis.domain.LabeledStatement extractLabeledStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.LabeledStatement( this.hashId,this.identifier.hashId, this.statement.hashId); + } + + } + + + public static class IfStatement extends ControlStatement { + + public IfStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression condition; + public Statement thenBranch; + public Statement elseBranch; + + public IfStatementWithElse extractIfStatementWithElse(){ + return new IfStatementWithElse(this.hashId, condition.hashId, thenBranch.hashId, elseBranch.hashId); + } + + public IfStatementWithoutElse extractIfStatementWithoutElse(){ + return new IfStatementWithoutElse(this.hashId, condition.hashId, thenBranch.hashId); + } + } + public static class SwitchStatement extends ControlStatement { + + public SwitchStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression discriminant; + public BlockStatement body; + + public com.alipay.codequery.dal.mybatis.domain.SwitchStatement extractSwitchStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.SwitchStatement(this.hashId, this.discriminant.hashId, this.body.hashId); + } + } + + public static class YieldStatement extends Statement { + + public YieldStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression expression; + public com.alipay.codequery.coref.model.Expression enclosingExpression; + + public com.alipay.codequery.dal.mybatis.domain.YieldStatement extractYieldStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.YieldStatement(this.hashId,this.expression.hashId,this.enclosingExpression.hashId); + } + } + + public static class SynchronizedStatement extends Statement { + + public SynchronizedStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression lockExpression; + public Statement body; + + public com.alipay.codequery.dal.mybatis.domain.SynchronizedStatement extractSynchronizedStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.SynchronizedStatement(this.hashId,this.lockExpression.hashId,this.body.hashId); + } + } + + + public static class SwitchLabelStatement extends ControlStatement { + + public SwitchLabelStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression caseValue; + public BlockStatement enclosingSwitchBlock; + public long nextSwitchCashHashId = 0; + + + public com.alipay.codequery.dal.mybatis.domain.SwitchLabelStatement extractSwitchLabelStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.SwitchLabelStatement(this.hashId,this.caseValue.hashId,this.enclosingSwitchBlock.hashId,this.nextSwitchCashHashId); + } + } + public static class CaseStatement extends ControlStatement { + + public CaseStatement(int id, Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression label; + public boolean isDefault; + public Statement body; + } + public static class ForStatement extends ControlStatement { + + public ForStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression init; + public com.alipay.codequery.coref.model.Expression condition; + public com.alipay.codequery.coref.model.Expression update; + public Statement body; + + public com.alipay.codequery.dal.mybatis.domain.ForStatement extractForStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.ForStatement( this.hashId,this.init.hashId,this.condition.hashId,this.update.hashId,this.body.hashId); + } + } + + public static class ForeachStatement extends ControlStatement { + + public ForeachStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression iteratedValue; + public Parameter iterationParameter; + public Statement body; + + public com.alipay.codequery.dal.mybatis.domain.ForeachStatement extractForeachStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.ForeachStatement(this.hashId,this.iteratedValue.hashId,this.iterationParameter.hashId,this.body.hashId); + } + } + public static class TryStatement extends ControlStatement { + + public TryStatement(Long hashId) { + super(hashId); + } + + public CodeBlock tryBlock; + public CodeBlock catchBlock; + public CodeBlock finallyBlock; + + public TryStatementWithoutFinally extractTryStatementWithoutFinally(){ + return new TryStatementWithoutFinally(this.hashId, this.tryBlock.hashId); + } + + public TryStatementWithFinally extractTryStatementWithFinally(){ + return new TryStatementWithFinally(this.hashId, this.tryBlock.hashId, this.finallyBlock.hashId); + } + + } + public static class CatchClause extends Node { + + public CatchClause(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression param; + public TryStatement tryStatement; + + public int index; + + public CatchSection extractCatchSection(){ + return new CatchSection( this.hashId,this.debug_message,this.param.hashId,this.type.hashId,this.location.hashId,this.tryStatement.hashId, this.index); + } + + } + + public static class ThrowStatement extends ControlStatement { + + public ThrowStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression exception; + public CodeBlock body; + + public com.alipay.codequery.dal.mybatis.domain.ThrowStatement extractThrowStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.ThrowStatement(this.hashId, this.exception.hashId,this.body.hashId); + } + } + public static class WhileStatement extends ControlStatement { + + public WhileStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression condition; + public Statement body; + + public com.alipay.codequery.dal.mybatis.domain.WhileStatement extractWhileStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.WhileStatement(this.hashId,this.condition.hashId,this.body.hashId); + } + } + public static class DoWhileStatement extends ControlStatement { + + public DoWhileStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression condition; + public Statement body; + public String keyword; + + public com.alipay.codequery.dal.mybatis.domain.DoWhileStatement extractDoWhileStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.DoWhileStatement(this.hashId,this.keyword,this.condition.hashId,this.body.hashId); + } + + } + + public static class PackageStatement extends Statement{ + public Package referencePackage; + + public PackageStatement(Long hashId) { + super(hashId); + } + public com.alipay.codequery.dal.mybatis.domain.PackageStatement extractPackage(){ + return new com.alipay.codequery.dal.mybatis.domain.PackageStatement(this.hashId, this.debug_message, this.location.hashId, this.referencePackage.hashId,this.parent.hashId); + } + } + + public static class ReturnStatement extends Statement { + + public ReturnStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression returnExpression; + + public com.alipay.codequery.dal.mybatis.domain.ReturnStatement extractReturnStatement(){ + return new com.alipay.codequery.dal.mybatis.domain.ReturnStatement(this.hashId,this.returnExpression.hashId); + } + } + + public static class AssertStatement extends Statement { + + public AssertStatement(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.coref.model.Expression condition; + public Expression description; + + public com.alipay.codequery.dal.mybatis.domain.AssertStatement extractAssertStatement() { + return new com.alipay.codequery.dal.mybatis.domain.AssertStatement( this.hashId, this.condition.hashId, this.description.hashId); + } + } + + public static class DeclarationStatement extends Statement { + + public DeclarationStatement(Long hashId) { + super(hashId); + } + + public int index; + + public DeclarationElement extractDeclarationElement() { + return new DeclarationElement( this.hashId, this.index, this.parent.hashId); + } + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Type.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Type.java new file mode 100644 index 00000000..d33f7aca --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Type.java @@ -0,0 +1,85 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.*; +import com.alipay.codequery.dal.mybatis.domain.Primitive; + +import java.util.ArrayList; + + +public class Type extends Node { + public String name; + public String qualifiedName; + public int isInferred; + public Node innermostComponentReferenceElement; + + public Type(Long hashId) { + this.hashId = hashId; + } + + public ReferenceType extractReferenceType(){ + return new ReferenceType(this.hashId, this.name,this.qualifiedName); + } + public TypeElement extractTypeElement(){ + return new TypeElement( this.hashId,this.type.hashId,this.debug_message,this.parent.hashId,this.location.hashId); + } + public enum PrimitiveType { + BYTE ("byte", 1), + CHAR ("char", 2), + DOUBLE ("double", 3), + FLOAT ("float", 4), + INT ("int", 5), + LONG ("long", 6), + SHORT ("short", 7), + BOOLEAN("boolean", 8), + VOID ("void", 9), + NULL ("null", 10); + public String name; + public int index; + + public static ArrayList values =new ArrayList<>(); + + PrimitiveType(String name, int index){ + this.name = name; + this.index = index; + } + + public Primitive extractPrimitive(){ + return new Primitive(this.index, this.name); + } + + static { + for (PrimitiveType value : PrimitiveType.values()) { + PrimitiveType.values.add(value); + } + } + } + + public static class TypeLiteral extends Type { + public Type type; + public Type typeElement; + + public TypeLiteral(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.TypeLiteral extractTypeLiteral(){ + return new com.alipay.codequery.dal.mybatis.domain.TypeLiteral(this.hashId, this.typeElement.hashId, this.type.hashId); + } + + } + + public static class TypeParameter extends Type { + public Node owner; + public Node extendsList; + public int index; + + public TypeParameter(Long hashId) { + super(hashId); + } + + public com.alipay.codequery.dal.mybatis.domain.TypeParameter extractTypeParameter(){ + return new com.alipay.codequery.dal.mybatis.domain.TypeParameter(this.hashId,this.debug_message,this.owner.hashId,this.index,this.extendsList.hashId, this.parent.hashId,this.location.hashId); + } + + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Variable.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Variable.java new file mode 100644 index 00000000..1a07ad84 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/model/Variable.java @@ -0,0 +1,19 @@ +package com.alipay.codequery.coref.model; + +import com.alipay.codequery.dal.mybatis.domain.Array; + + +public class Variable extends Node{ + + public Identifier identifier; + public String name; + public int index; + + public Variable(Long hashId) { + super(hashId); + } + + public Array extractArray(){ + return new Array(this.hashId, this.name); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/Commit.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/Commit.java new file mode 100644 index 00000000..d1f2cf37 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/Commit.java @@ -0,0 +1,63 @@ +package com.alipay.codequery.coref.storage; + +import com.alibaba.fastjson.JSON; +import com.alipay.codequery.util.PathUtil; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; + +import java.io.*; +import java.util.Collection; +import java.util.stream.Collectors; + +@Data +@Slf4j +public class Commit { + private String id; + private Collection containedFileObjects; + + public Commit(String commitId, Collection containedFiles, File rootDir) { + this.id = commitId; + this.containedFileObjects = containedFiles.stream() + .map(fileObject -> { + SimpleFileObject simpleFileObject = new SimpleFileObject(); + simpleFileObject.setObjectId(fileObject.getHashId()); + simpleFileObject.setRelativePath(PathUtil.getRelPath(rootDir.getAbsolutePath(), fileObject.getSourceFile().getAbsolutePath())); + return simpleFileObject; + }) + .collect(Collectors.toList()); + } + + public void writeToJsonFile(File targetFile) { + String jsonString = JSON.toJSONString(this); + try ( + InputStream inputStream = new ByteArrayInputStream(jsonString.getBytes()); + OutputStream outputStream = new FileOutputStream(targetFile) + ) { + IOUtils.copy(inputStream, outputStream); + } catch (IOException ioe) { + log.error("write json string to file get error!", ioe); + throw new RuntimeException(ioe); + } + } + + public static Commit readFromFile(File targetFile) { + try ( + InputStream inputStream = new FileInputStream(targetFile); + ByteArrayOutputStream outputStream = new ByteArrayOutputStream() + ) { + IOUtils.copy(inputStream, outputStream); + String jsonString = outputStream.toString(); + return JSON.parseObject(jsonString, Commit.class); + } catch (IOException e) { + log.error("read file to json get error!", e); + throw new RuntimeException(e); + } + } + + @Data + public static class SimpleFileObject { + String objectId; + String relativePath; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefASTDumpStorage.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefASTDumpStorage.java new file mode 100644 index 00000000..4b918a16 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefASTDumpStorage.java @@ -0,0 +1,866 @@ +package com.alipay.codequery.coref.storage; + +import com.alipay.codequery.coref.core.CorefURI; +import com.alipay.codequery.coref.core.SignatureGenerator; +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.coref.model.Class; +import com.alipay.codequery.coref.model.Comment; +import com.alipay.codequery.coref.model.Expression; +import com.alipay.codequery.coref.model.File; +import com.alipay.codequery.coref.model.Folder; +import com.alipay.codequery.coref.model.Identifier; +import com.alipay.codequery.coref.model.Modifier; +import com.alipay.codequery.coref.model.Module; +import com.alipay.codequery.coref.model.Program; +import com.alipay.codequery.coref.model.Statement; +import com.alipay.codequery.coref.model.NpClass; +import com.alipay.codequery.coref.model.NpFile; +import com.alipay.codequery.coref.model.NpInterface; +import com.alipay.codequery.coref.model.NpMethod; +import com.alipay.codequery.coref.model.NpProject; +import com.alipay.codequery.coref.util.HashUtil; +import com.alipay.codequery.dal.mybatis.domain.*; +import com.alipay.codequery.dal.mybatis.domain.Exception; +import com.alipay.codequery.dal.mybatis.mapper.*; +import com.alipay.codequery.project.PsiProject; +import com.google.gson.*; +import com.alipay.codequery.dal.mybatis.domain.Primitive; +import com.alipay.codequery.util.PathUtil; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jetbrains.kotlin.com.intellij.psi.*; + +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.Map; + +public class CorefASTDumpStorage implements IStorage { + + public static final Logger logger = LogManager.getLogger(CorefASTDumpStorage.class); + private final Map hashIDToNodeMap = new HashMap<>(); + private final String corefASTPath; + private final String srcRootDir; + private final java.io.File file; + private PsiJavaFile psiJavaFile; + private final CorefURI corefURI ; + + public CorefASTDumpStorage(String corefASTPath, String srcRootDir, java.io.File file, PsiProject basicProject, + String repository) { + this.psiJavaFile = basicProject.getPsiJavaFileFromFile(file); + assert psiJavaFile != null; + + this.corefURI = new CorefURI(repository); + String relativePath = PathUtil.getRelPath(srcRootDir, psiJavaFile.getVirtualFile().getPath()); + this.corefURI.setPath(relativePath); + + this.corefASTPath = corefASTPath; + this.srcRootDir = srcRootDir; + this.file = file; + + } + + @Override + public void commit() { + this.dumpCorefAST(); + } + + @Override + public void storeLocation(com.alipay.codequery.coref.model.Location location) { + } + + @Override + public void storeStatementEnclosingExpression(StatementEnclosingExpression s) { + } + + @Override + public void storeCallableEnclosingExpression(CallableEnclosingExpression c) { + + } + + void collectHashIdToNode(Long hashId, Object node) { + hashIDToNodeMap.put(hashId, node.getClass().getSimpleName()); + } + + @Override + public void storeCallableEnclosingStatement(CallableEnclosingStatement c) { + } + + @Override + public void storeNumberOfLines(com.alipay.codequery.coref.model.Location.NumberOfLines numberOfLines) { + } + + @Override + public void storeNameStrings(NameString nameString) { + } + + @Override + public void storeReferenceRelation(ReferenceRelation referenceRelation) { + } + + @Override + public void storeCallableBinding(CallableBinding callableBinding) { + } + + @Override + public void storeParent(com.alipay.codequery.coref.model.Parent parent) { + } + + @Override + public void storeAnnotatedRelation(AnnotatedRelation annotatedRelation) { + } + + @Override + public void storeParameter(com.alipay.codequery.coref.model.Parameter parameter) { + collectHashIdToNode(parameter.getHashId(), parameter.extractParameter()); + } + + @Override + public void storeReferenceElement(com.alipay.codequery.coref.model.Expression reference) { + collectHashIdToNode(reference.getHashId(), reference.extractReferenceElement()); + } + + @Override + public void storeImportStaticReferenceElement(com.alipay.codequery.coref.model.Expression reference) { + collectHashIdToNode(reference.getHashId(), reference.extractImportStaticReferenceElement()); + } + + @Override + public void storeTypeParameter(Type.TypeParameter parameter) { + collectHashIdToNode(parameter.getHashId(), parameter.extractTypeParameter()); + } + + @Override + public void storeClassInitializer(com.alipay.codequery.coref.model.Expression initializer) { + collectHashIdToNode(initializer.getHashId(), initializer.extractClassInitializer()); + } + + @Override + public void storeAnnotationDeclarationParameterDefaultValue(AnnotationDeclarationParameterDefaultValue parameter) { + collectHashIdToNode(parameter.getElementHashId(), parameter); + } + + @Override + public void storeJavaDocTag(com.alipay.codequery.coref.model.Comment.JavaDocTag docTag) { + collectHashIdToNode(docTag.getHashId(), docTag.extractJavadocTag()); + } + + @Override + public void storeAnonymousClass(Class.AnonymousClass clazz) { + collectHashIdToNode(clazz.getHashId(), clazz.extractAnonymousClass()); + } + + @Override + public void storeFileMd5Sum(FileMd5Sum file) { + } + + @Override + public void storeFileSHA256Sum(FileSha256Sum file) { + } + +// public void storeAnnotation(Annotations.AnnotationModel annotation){ +// if(!mock)// } + + @Override + public void storeReferenceType(Type type) { + collectHashIdToNode(type.getHashId(), type.extractReferenceType()); + } + + @Override + public void storeIfStatementWithElse(com.alipay.codequery.coref.model.Statement.IfStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractIfStatementWithElse()); + } + + @Override + public void storeIfStatementWithoutElse(com.alipay.codequery.coref.model.Statement.IfStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractIfStatementWithoutElse()); + } + +// public void storeTypeParameter(TypeParameterElement element){ +// if(!mock)// } + + @Override + public void storeTypeElement(Type element) { + collectHashIdToNode(element.getHashId(), element.extractTypeElement()); + } + +// public void storeTypeArgument(TypeArgument argument){ +// if(!mock)// } + + @Override + public void storeYieldStatement(com.alipay.codequery.coref.model.Statement.YieldStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractYieldStatement()); + } + + @Override + public void storeSynchronizedStatement(com.alipay.codequery.coref.model.Statement.SynchronizedStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractSynchronizedStatement()); + } + + + @Override + public void storeExpressionStatement(com.alipay.codequery.coref.model.Statement.ExpressionStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractExpressionStatement()); + } + + @Override + public void storeCodeBlock(com.alipay.codequery.coref.model.Statement.CodeBlock codeblock) { + collectHashIdToNode(codeblock.getHashId(), codeblock.extractCodeBlock()); + } + + @Override + public void storeBlockStatement(com.alipay.codequery.coref.model.Statement.BlockStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractBlockStatement()); + } + + @Override + public void storeLabeledStatement(com.alipay.codequery.coref.model.Statement.LabeledStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractLabeledStatement()); + } + + @Override + public void storeLambdaExpression(com.alipay.codequery.coref.model.Expression.LambdaExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractLambdaExpression()); + } + + @Override + public void storeThisExpression(com.alipay.codequery.coref.model.Expression.ThisExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractThisAccessExpression()); + } + + @Override + public void storeThisExpressionWithQualifier(com.alipay.codequery.coref.model.Expression.ThisExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractThisExpressionWithQualifier()); + + } + + @Override + public void storeSuperAccessExpression(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractSuperAccessExpression()); + } + + @Override + public void storeSuperConstructorInvocation(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractSuperConstructorInvocation()); + } + + @Override + public void storeEmptyStatement(com.alipay.codequery.coref.model.Statement.EmptyStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractEmptyStatement()); + } + + @Override + public void storeWhileStatement(com.alipay.codequery.coref.model.Statement.WhileStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractWhileStatement()); + } + + @Override + public void storeTryStatementWithoutFinally(com.alipay.codequery.coref.model.Statement.TryStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractTryStatementWithoutFinally()); + } + + @Override + public void storeTryStatementWithFinally(com.alipay.codequery.coref.model.Statement.TryStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractTryStatementWithFinally()); + } + + @Override + public void storeThrowStatement(com.alipay.codequery.coref.model.Statement.ThrowStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractThrowStatement()); + } + + + @Override + public void storeSwitchStatement(com.alipay.codequery.coref.model.Statement.SwitchStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractSwitchStatement()); + } + + @Override + public void storeSwitchLabelStatement(com.alipay.codequery.coref.model.Statement.SwitchLabelStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractSwitchLabelStatement()); + } + + @Override + public void storeDoWhileStatement(com.alipay.codequery.coref.model.Statement.DoWhileStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractDoWhileStatement()); + } + + @Override + public void storeContinueStatement(com.alipay.codequery.coref.model.Statement.ContinueStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractContinueStatement()); + } + + @Override + public void storeBreakStatement(com.alipay.codequery.coref.model.Statement.BreakStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractBreakStatement()); + } + + @Override + public void storeReturnStatement(com.alipay.codequery.coref.model.Statement.ReturnStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractReturnStatement()); + } + + @Override + public void storeModule(Module module) { + collectHashIdToNode(module.getHashId(), module.extractModule()); + } + + @Override + public void storeTypeLiteral(Type.TypeLiteral literal) { + collectHashIdToNode(literal.getHashId(), literal.extractTypeLiteral()); + } + + @Override + public void storeAssertStatement(com.alipay.codequery.coref.model.Statement.AssertStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractAssertStatement()); + } + + @Override + public void storeDeclarationElement(com.alipay.codequery.coref.model.Statement.DeclarationStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractDeclarationElement()); + } + + @Override + public void storeImport(com.alipay.codequery.coref.model.Statement.ImportStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractImport()); + } + + @Override + public void storeImportStaticStatement(com.alipay.codequery.coref.model.Statement.ImportStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractImportStaticStatement()); + } + + @Override + public void storeResourceList(ResourceList list) { + + } + + @Override + public void storeMethodAccessExpressionWithoutType(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractMethodAccessExpressionWithoutType()); + } + + @Override + public void storeMethodAccessExpressionWithType(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractMethodAccessExpressionWithType()); + } + + @Override + public void storeMethodReferenceExpression(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractMethodReferenceExpression()); + } + + @Override + public void storeArrayInitializerExpression(com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractArrayInitializerExpression()); + } + + @Override + public void storeAnnotationArrayInitializer(com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractAnnotationArrayInitializer()); + } + + @Override + public void storeArrayAccessExpression(com.alipay.codequery.coref.model.Expression.ArrayAccessExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractArrayAccessExpression()); + } + + @Override + public void storeToken(Token token) { + } + + @Override + public void storeLocalVariable(com.alipay.codequery.coref.model.LocalVariable variable) { + collectHashIdToNode(variable.getHashId(), variable.extractLocalVariable()); + } + +// public void storeCallExpression(Expressions.CallExpression expression){ +// if(!mock)// } + + @Override + public void storeCastExpression(com.alipay.codequery.coref.model.Expression.CastExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractTypeCastExpressiont()); + } + + @Override + public void storeReferenceExpression(com.alipay.codequery.coref.model.Expression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractReferenceExpression()); + + } + + @Override + public void storeConstructorInvocation(com.alipay.codequery.coref.model.Expression.NewExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractConstructorInvocation()); + + } + + @Override + public void storeConditionalExpression(com.alipay.codequery.coref.model.Expression.ConditionalExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractCondtionalExpression()); + + } + + @Override + public void storeNewExpression(com.alipay.codequery.coref.model.Expression.NewExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractNewExpression()); + + } + + @Override + public void storeArrayCreationExpression(com.alipay.codequery.coref.model.Expression.NewExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractArrayCreationExpression()); + + } + + @Override + public void storeField(com.alipay.codequery.coref.model.Field field) { + collectHashIdToNode(field.getHashId(), field.extractField()); + + } + + @Override + public void storeMethod(com.alipay.codequery.coref.model.Method method) { + collectHashIdToNode(method.getHashId(), method.extractMethodDeclaration()); + + } + + @Override + public void storeConstructor(com.alipay.codequery.coref.model.Method method) { + collectHashIdToNode(method.getHashId(), method.extractConstructor()); + } + + @Override + public void storePrimitive(Primitive primitive) { + } + + @Override + public void storeCatchClauseStatement(com.alipay.codequery.coref.model.Statement.CatchClause catchClause) { + collectHashIdToNode(catchClause.getHashId(), catchClause.extractCatchSection()); + + } + + @Override + public void storeLocalClass(Class.ClassDefinition statement) { + collectHashIdToNode(statement.getHashId(), statement.extractLocalClass()); + + } + + @Override + public void storeEnumConstant(com.alipay.codequery.coref.model.Field enumField) { + collectHashIdToNode(enumField.getHashId(), enumField.extractEnumConstant()); + + } + + @Override + public void storeInstanceOfExpression(com.alipay.codequery.coref.model.Expression.InstanceOfExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractInstanceOfExpression()); + + } + + @Override + public void storeArray(Variable array) { + } + + @Override + public void storeAnnotationCanResolved(Annotation.AnnotationModel annotation) { + collectHashIdToNode(annotation.getHashId(), annotation.extractAnnotationCanResolved()); + } + + @Override + public void storeAnnotationCanNotResolved(Annotation.AnnotationModel annotation) { + collectHashIdToNode(annotation.getHashId(), annotation.extractAnnotationCanNotResolved()); + } + + @Override + public void storeAnnotationDeclaration(Annotation.AnnotationModel annotation) { + collectHashIdToNode(annotation.getHashId(), annotation.extractAnnotationDeclaration()); + } + + @Override + public void storeAnnotationDeclarationParameter(Annotation.AnnotationParameter parameter) { + collectHashIdToNode(parameter.getHashId(), parameter.extractAnnotationArgument()); + } + + @Override + public void storeExpression(com.alipay.codequery.coref.model.Expression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractExpression()); + } + + @Override + public void storePackageStatement(com.alipay.codequery.coref.model.Statement.PackageStatement packages) { + collectHashIdToNode(packages.getHashId(), packages.extractPackage()); + } + + @Override + public void storeCuPackage(Cupackage cupackage) { + } + + @Override + public void storeClassHierarchy(Class.ClassHierarchy classHierarchy) { + collectHashIdToNode(classHierarchy.getHashId(), classHierarchy.extractClassHierarchy()); + } + + @Override + public void storeSuperExpression(com.alipay.codequery.coref.model.Expression.SuperExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractSuperExpression()); + } + + @Override + public void storeSuperExpressionWithQualifier(com.alipay.codequery.coref.model.Expression.SuperExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractSuperExpressionWithQualifier()); + } + + @Override + public void storeException(Exception exception) { + } + + @Override + public void storeClass(Class.ClassDefinition classDefinition) { + collectHashIdToNode(classDefinition.getHashId(), classDefinition.extractClass()); + } + + @Override + public void storeImplementlist(ClassImplementList list) { + } + + + @Override + public void storeElement(Element e) { + } + + @Override + public void storeReferencelist(com.alipay.codequery.coref.model.Expression.ReferenceList list) { + collectHashIdToNode(list.getHashId(), list.extractReferenceList()); + } + + @Override + public void storeReferenceParameterlist(ParameterList.ReferenceParameterList list, int index) { + collectHashIdToNode(list.getHashId(), list.extractReferenceParameterList(index)); + } + + @Override + public void storeEmptyReferenceParameterlist(ParameterList.ReferenceParameterList list) { + collectHashIdToNode(list.getHashId(), list.extractEmptyReferenceParameterList()); + } + + @Override + public void storeInterface(Class.ClassDefinition classDefinition) { + collectHashIdToNode(classDefinition.getHashId(), classDefinition.extractInterface()); + } + + @Override + public void storeStatement(com.alipay.codequery.coref.model.Statement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractStatement()); + } + + @Override + public void storeComment(com.alipay.codequery.coref.model.Comment comment) { + collectHashIdToNode(comment.getHashId(), comment.extractComment()); + } + + @Override + public void storeExpressionList(com.alipay.codequery.coref.model.Expression.ExpressionList list) { + collectHashIdToNode(list.getHashId(), list.extractExpressionList()); + } + + @Override + public void storeExpressionListExpressionRelation(ExpressionListExpressionRelation expressionListRelation) { + } + + @Override + public void storeJavaDocComment(com.alipay.codequery.coref.model.Comment.JavaDocComment comments) { + collectHashIdToNode(comments.getHashId(), comments.extractJavaDocComment()); + } + + @Override + public void storeJavaDocDataToken(com.alipay.codequery.coref.model.Comment.JavaDocDataToken javaDocDataToken) { + collectHashIdToNode(javaDocDataToken.getHashId(), javaDocDataToken.extractJavaDocDataToken()); + } + + @Override + public void storeJavaDocTagValue(Comment.JavaDocTagValue javaDocTagValue) { + collectHashIdToNode(javaDocTagValue.getHashId(), javaDocTagValue.extractJavaDocTagValue()); + } + + @Override + public void storeForStatement(com.alipay.codequery.coref.model.Statement.ForStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractForStatement()); + } + + @Override + public void storeAssignmentExpression(com.alipay.codequery.coref.model.Expression.AssignmentExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractAssignmentExpression()); + } + + @Override + public void storeBinaryExpression(com.alipay.codequery.coref.model.Expression.BinaryExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractBinaryExpression()); + } + + @Override + public void storePolyadicExpression(com.alipay.codequery.coref.model.Expression.PolyadicExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractPolyadicExpression()); + } + + @Override + public void storeUnaryExpression(Expression.UnaryExpression expression) { + collectHashIdToNode(expression.getHashId(), expression.extractUnaryExpression()); + } + + @Override + public void storeForeachStatement(Statement.ForeachStatement statement) { + collectHashIdToNode(statement.getHashId(), statement.extractForeachStatement()); + } + + @Override + public void storeAnnotationArgumentWithName(Annotation.AnnotationArgument annotationArgument) { + collectHashIdToNode(annotationArgument.getHashId(), annotationArgument.extractAnnotationArgumentWithName()); + + } + + @Override + public void storeAnnotationArgumentWithoutName(Annotation.AnnotationArgument annotationArgument) { + collectHashIdToNode(annotationArgument.getHashId(), annotationArgument.extractAnnotationArgumentWithoutName()); + } + + @Override + public void storeProgram(Program program) { + collectHashIdToNode(program.getHashId(), program.extractProgram()); + } + + @Override + public void storeModifier(com.alipay.codequery.coref.model.Modifier modifier) { + collectHashIdToNode(modifier.getHashId(), modifier.extractModifier()); + } + + @Override + public void storeModifierList(Modifier modifier) { + collectHashIdToNode(modifier.getHashId(), modifier.extractModifierList()); + } + + @Override + public void storeFile(File file) { + collectHashIdToNode(file.getHashId(), file.extractFile()); + } + + @Override + public void storeFolder(Folder folder) { + collectHashIdToNode(folder.getHashId(), folder.extractFolder()); + } + + @Override + public void storeContainerParent(ContainerParent container) { + } + + @Override + public void storeIdentifier(Identifier identifier) { + collectHashIdToNode(identifier.getHashId(), identifier.extractIdentifier()); + } + + @Override + public void handleLiteral(Literal literal) { + switch (literal.type) { + case "String": + storeLiteral(literal, StringLiteralMapper.class); + break; + case "int": + storeLiteral(literal, IntegerLiteralMapper.class); + break; + case "char": + storeLiteral(literal, CharacterLiteralMapper.class); + break; + case "double": + storeLiteral(literal, DoubleLiteralMapper.class); + break; + case "float": + storeLiteral(literal, FloatingPointLiteralMapper.class); + break; + case "long": + storeLiteral(literal, LongLiteralMapper.class); + break; + case "boolean": + storeLiteral(literal, BooleanLiteralMapper.class); + break; + case "null": + storeLiteral(literal, NullLiteralMapper.class); + break; + default: + break; + } + } + + @Override + public void storeLiteral(Literal literal, java.lang.Class mapperClass) { + collectHashIdToNode(literal.getHashId(), literal.extractLiteral()); + } + + @Override + public void storeNpProject(NpProject npProject) { + collectHashIdToNode(npProject.getHashId(), npProject.extractNpProject()); + } + + @Override + public void storeNpFile(NpFile npFile) { + collectHashIdToNode(npFile.getHashId(), npFile.extractNpFile()); + } + + @Override + public void storeNpClass(NpClass npClass) { + collectHashIdToNode(npClass.getHashId(), npClass.extractNpClass()); + } + + @Override + public void storeNpInterface(NpInterface npInterface) { + collectHashIdToNode(npInterface.getHashId(), npInterface.extractNpInterface()); + } + + @Override + public void storeNpMethod(NpMethod npMethod) { + collectHashIdToNode(npMethod.getHashId(), npMethod.extractNpMethod()); + } + + public void clearHashIDToNodeMap() { + this.hashIDToNodeMap.clear(); + } + + + private void dumpCorefAST() { + if (corefASTPath != null ) { + Path basePath = Paths.get(srcRootDir); + // 计算相对路径 + Path relativePath = basePath.relativize(Paths.get(file.toString())); + // 拼接输出路径 + Path fullPath = Paths.get(corefASTPath, relativePath.toString()); + + // 非空和覆盖的情况 + java.io.File astPathDir = new java.io.File(corefASTPath); + if (!astPathDir.exists()) { + boolean created = astPathDir.mkdir(); + if (created) { + logger.info("Folder created successfully."); + } else { + logger.error("Folder creation failed."); + } + } + // 直接添加一个.json的后缀 + dumpAstJsonStr(psiJavaFile, hashIDToNodeMap, fullPath + ".json"); + } + this.clearHashIDToNodeMap(); + } + + + private void dumpAstJsonStr(PsiFile psiFile, Map hashIDToNodeMap, String outputPath) { + JsonElement jsonObject = getElementJsonStr(psiFile, hashIDToNodeMap); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + String jsonString = gson.toJson(jsonObject); + java.io.File file = new java.io.File(outputPath); + + + try { + FileWriter writer = new FileWriter(file); + writer.write(jsonString); + writer.close(); + logger.info("\nsuccess to generate file: " + outputPath); + } catch (IOException e) { + logger.error("\nfaild to generate file: " + outputPath, e); + } + } + + private String truncate(String text, int maxTextLength) { + if (text.length() > maxTextLength){ + return text.substring(0, maxTextLength).trim() + "..."; + } + else{ + return text; + } + + } + + private String getNodeMessage(PsiElement element) { + int maxTextLength = 80; + String result = ""; + if (element instanceof PsiPlainTextFile) { + result = ((PsiPlainTextFile) element).getName(); + } else if (element instanceof PsiFile) { + result = ((PsiFile) element).getName(); + } else if (element instanceof PsiDirectory) { + result = ((PsiDirectory) element).getName(); + } else if (element instanceof PsiComment) { + result = truncate(element.getText(), maxTextLength); + } else if (element instanceof PsiBinaryFile) { + result = ((PsiBinaryFile) element).getName(); + } else { + result = truncate(element.getText(), maxTextLength); + } + + return result; + } + + private Long getHashId(PsiElement element){ + if( element != null) { + String signature = SignatureGenerator.generate(element); + String path = corefURI.getPath(); + + //when a resolved element is from another file, needs to use its real file path. + if(element.getContainingFile() != null && element.getContainingFile().getVirtualFile() != null) { + if(!(element.getContainingFile().equals(file))){ + path = PathUtil.getRelPath(this.srcRootDir, element.getContainingFile().getVirtualFile().getPath()); + } + } + + String corefURIString = CorefURI.generate(corefURI.getRepository(), path, signature); + return HashUtil.hashString(corefURIString); + } else { + return Long.valueOf(-1); + } + } + + private JsonElement getElementJsonStr(PsiElement element, Map hashIDToNodeMap) { + + if (element == null || (element instanceof PsiWhiteSpace)) { + return null; + } + Long hashId = getHashId(element); + String label = ""; + + + if (hashIDToNodeMap.containsKey(hashId)) { + label = hashIDToNodeMap.get(hashId); + + // 手工做一些特殊处理,更标准的方法是在代码中找到对应关系 + if (("clazz").equals(label)) { + label = "Class"; + } else if (("ImportInfo").equals(label)) { + label = "Import"; + } else if (("InterfaceInfo").equals(label)) { + label = "Interface"; + } + } + + String nodeMessage = getNodeMessage(element); + if ("".equals(nodeMessage) && "".equals(label)) { + return null; + } + + JsonObject jsonObject = new JsonObject(); + jsonObject.add("nodeName", new JsonPrimitive(label)); + jsonObject.add("nodeMessage", new JsonPrimitive(nodeMessage)); + jsonObject.add("startOffset", new JsonPrimitive(element.getTextRange().getStartOffset())); + jsonObject.add("endOffset", new JsonPrimitive(element.getTextRange().getEndOffset())); + + JsonArray jsonElements = new JsonArray(); + if (element.getChildren().length > 0) { + for (PsiElement child : element.getChildren()) { + JsonElement childObject = getElementJsonStr(child, hashIDToNodeMap); + if (childObject != null) { + jsonElements.add(childObject); + } + + } + } + jsonObject.add("children", jsonElements); + return jsonObject; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefCache.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefCache.java new file mode 100644 index 00000000..bbbd8f3a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/CorefCache.java @@ -0,0 +1,19 @@ +package com.alipay.codequery.coref.storage; + +import java.io.File; +import java.util.Set; + +public interface CorefCache { + + Set getAllObjectIds(); + + void putObjects(Set objectList); + + Set getObjectByIds(Set objectIds); + + File getLocalObjectDir(); + + void putCommit(Commit commit); + + Commit getCommit(String commitId); +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/FileScopeCorefObject.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/FileScopeCorefObject.java new file mode 100644 index 00000000..fdee6c02 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/FileScopeCorefObject.java @@ -0,0 +1,12 @@ +package com.alipay.codequery.coref.storage; + +import lombok.Data; + +import java.io.File; + +@Data +public class FileScopeCorefObject { + File sourceFile; + String hashId; + File cacheFile; +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/IStorage.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/IStorage.java new file mode 100644 index 00000000..06109ae7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/IStorage.java @@ -0,0 +1,277 @@ +package com.alipay.codequery.coref.storage; + +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.coref.model.Class; +import com.alipay.codequery.coref.model.Comment; +import com.alipay.codequery.coref.model.Expression; +import com.alipay.codequery.coref.model.Location; +import com.alipay.codequery.coref.model.Module; +import com.alipay.codequery.coref.model.Statement; +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.coref.model.File; +import com.alipay.codequery.coref.model.Folder; +import com.alipay.codequery.coref.model.Identifier; +import com.alipay.codequery.coref.model.Modifier; +import com.alipay.codequery.coref.model.NpClass; +import com.alipay.codequery.coref.model.NpFile; +import com.alipay.codequery.coref.model.NpInterface; +import com.alipay.codequery.coref.model.NpMethod; +import com.alipay.codequery.coref.model.NpProject; +import com.alipay.codequery.coref.model.Program; +import com.alipay.codequery.dal.mybatis.domain.*; +import com.alipay.codequery.dal.mybatis.domain.Exception; +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.dal.mybatis.domain.Primitive; + + +public interface IStorage { + void commit(); + + void storeLocation(Location location); + + void storeStatementEnclosingExpression(StatementEnclosingExpression s); + + void storeCallableEnclosingExpression(CallableEnclosingExpression c); + + void storeCallableEnclosingStatement(CallableEnclosingStatement c); + + void storeNumberOfLines(Location.NumberOfLines numberOfLines); + + void storeNameStrings(NameString nameString); + + void storeReferenceRelation(ReferenceRelation referenceRelation); + + void storeCallableBinding(CallableBinding callableBinding); + + void storeParent(com.alipay.codequery.coref.model.Parent parent); + + void storeAnnotatedRelation(AnnotatedRelation annotatedRelation); + + void storeParameter(com.alipay.codequery.coref.model.Parameter parameter); + + void storeReferenceElement(com.alipay.codequery.coref.model.Expression reference); + + void storeImportStaticReferenceElement(com.alipay.codequery.coref.model.Expression reference); + + void storeTypeParameter(Type.TypeParameter parameter); + + void storeClassInitializer(com.alipay.codequery.coref.model.Expression initializer); + + void storeAnnotationDeclarationParameterDefaultValue(AnnotationDeclarationParameterDefaultValue parameter); + + void storeJavaDocTag(com.alipay.codequery.coref.model.Comment.JavaDocTag docTag); + + void storeAnonymousClass(Class.AnonymousClass clazz); + + void storeFileMd5Sum(FileMd5Sum file); + + void storeFileSHA256Sum(FileSha256Sum file); + + void storeReferenceType(Type type); + + void storeIfStatementWithElse(com.alipay.codequery.coref.model.Statement.IfStatement statement); + + void storeIfStatementWithoutElse(com.alipay.codequery.coref.model.Statement.IfStatement statement); + + void storeTypeElement(Type element); + + void storeYieldStatement(com.alipay.codequery.coref.model.Statement.YieldStatement statement); + + void storeSynchronizedStatement(com.alipay.codequery.coref.model.Statement.SynchronizedStatement statement); + + void storeExpressionStatement(com.alipay.codequery.coref.model.Statement.ExpressionStatement statement); + + void storeCodeBlock(com.alipay.codequery.coref.model.Statement.CodeBlock statement); + + void storeBlockStatement(com.alipay.codequery.coref.model.Statement.BlockStatement statement); + + void storeLabeledStatement(com.alipay.codequery.coref.model.Statement.LabeledStatement statement); + + void storeLambdaExpression(com.alipay.codequery.coref.model.Expression.LambdaExpression expression); + + void storeThisExpression(com.alipay.codequery.coref.model.Expression.ThisExpression expression); + + void storeThisExpressionWithQualifier(com.alipay.codequery.coref.model.Expression.ThisExpression expression); + + void storeSuperAccessExpression(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression); + + void storeSuperConstructorInvocation(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression); + + void storeEmptyStatement(com.alipay.codequery.coref.model.Statement.EmptyStatement statement); + + void storeWhileStatement(com.alipay.codequery.coref.model.Statement.WhileStatement statement); + + void storeTryStatementWithoutFinally(com.alipay.codequery.coref.model.Statement.TryStatement statement); + + void storeTryStatementWithFinally(com.alipay.codequery.coref.model.Statement.TryStatement statement); + + void storeThrowStatement(com.alipay.codequery.coref.model.Statement.ThrowStatement statement); + + void storeSwitchStatement(com.alipay.codequery.coref.model.Statement.SwitchStatement statement); + + void storeSwitchLabelStatement(com.alipay.codequery.coref.model.Statement.SwitchLabelStatement statement); + + void storeDoWhileStatement(com.alipay.codequery.coref.model.Statement.DoWhileStatement statement); + + void storeContinueStatement(com.alipay.codequery.coref.model.Statement.ContinueStatement statement); + + void storeBreakStatement(com.alipay.codequery.coref.model.Statement.BreakStatement statement); + + void storeReturnStatement(com.alipay.codequery.coref.model.Statement.ReturnStatement statement); + + void storeModule(Module module); + + void storeTypeLiteral(Type.TypeLiteral literal); + + void storeAssertStatement(com.alipay.codequery.coref.model.Statement.AssertStatement statement); + + void storeDeclarationElement(com.alipay.codequery.coref.model.Statement.DeclarationStatement statement); + + void storeImport(com.alipay.codequery.coref.model.Statement.ImportStatement statement); + + void storeImportStaticStatement(com.alipay.codequery.coref.model.Statement.ImportStatement statement); + + void storeResourceList(ResourceList list); + + void storeMethodAccessExpressionWithoutType(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression); + + void storeMethodAccessExpressionWithType(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression); + + void storeMethodReferenceExpression(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression); + + void storeArrayInitializerExpression(com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression expression); + + void storeAnnotationArrayInitializer(com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression expression); + + void storeArrayAccessExpression(com.alipay.codequery.coref.model.Expression.ArrayAccessExpression expression); + + void storeToken(Token token); + + void storeLocalVariable(com.alipay.codequery.coref.model.LocalVariable variable); + + void storeCastExpression(com.alipay.codequery.coref.model.Expression.CastExpression expression); + + void storeReferenceExpression(com.alipay.codequery.coref.model.Expression expression); + + void storeConstructorInvocation(com.alipay.codequery.coref.model.Expression.NewExpression expression); + + void storeConditionalExpression(com.alipay.codequery.coref.model.Expression.ConditionalExpression expression); + + void storeNewExpression(com.alipay.codequery.coref.model.Expression.NewExpression expression); + + void storeArrayCreationExpression(com.alipay.codequery.coref.model.Expression.NewExpression expression); + + void storeField(com.alipay.codequery.coref.model.Field field); + + void storeMethod(com.alipay.codequery.coref.model.Method method); + + void storeConstructor(com.alipay.codequery.coref.model.Method method); + + void storePrimitive(Primitive primitive); + + void storeCatchClauseStatement(com.alipay.codequery.coref.model.Statement.CatchClause catchClause); + + void storeLocalClass(Class.ClassDefinition statement); + + void storeEnumConstant(com.alipay.codequery.coref.model.Field enumField); + + void storeInstanceOfExpression(com.alipay.codequery.coref.model.Expression.InstanceOfExpression expression); + + void storeArray(Variable array); + + // void storeAnnotationAccess(com.alipay.codequery.coref.model.Annotation.AnnotationModel annotation); + + void storeAnnotationCanResolved(Annotation.AnnotationModel annotation); + + void storeAnnotationCanNotResolved(Annotation.AnnotationModel annotation); + + void storeAnnotationDeclaration(Annotation.AnnotationModel annotation); + + void storeAnnotationDeclarationParameter(Annotation.AnnotationParameter parameter); + + void storeExpression(com.alipay.codequery.coref.model.Expression expression); + + void storePackageStatement(com.alipay.codequery.coref.model.Statement.PackageStatement packages); + + void storeCuPackage(Cupackage cupackage); + + void storeClassHierarchy(Class.ClassHierarchy classHierarchy); + + void storeSuperExpression(com.alipay.codequery.coref.model.Expression.SuperExpression expression); + + void storeSuperExpressionWithQualifier(com.alipay.codequery.coref.model.Expression.SuperExpression expression); + + void storeException(Exception exception); + + void storeClass(Class.ClassDefinition classDefinition); + + void storeImplementlist(ClassImplementList list); + + void storeElement(Element e); + + void storeReferencelist(com.alipay.codequery.coref.model.Expression.ReferenceList list); + + void storeReferenceParameterlist(ParameterList.ReferenceParameterList list, int index); + + void storeEmptyReferenceParameterlist(ParameterList.ReferenceParameterList list); + + void storeInterface(Class.ClassDefinition classDefinition); + + void storeStatement(Statement statement); + + void storeComment(com.alipay.codequery.coref.model.Comment comment); + + void storeExpressionList(com.alipay.codequery.coref.model.Expression.ExpressionList list); + + void storeExpressionListExpressionRelation(ExpressionListExpressionRelation expressionListRelation); + + void storeJavaDocComment(com.alipay.codequery.coref.model.Comment.JavaDocComment comments); + + void storeJavaDocDataToken(com.alipay.codequery.coref.model.Comment.JavaDocDataToken javaDocDataToken); + + void storeJavaDocTagValue(Comment.JavaDocTagValue javaDocTagValue); + + void storeForStatement(Statement.ForStatement statement); + + void storeAssignmentExpression(com.alipay.codequery.coref.model.Expression.AssignmentExpression expression); + + void storeBinaryExpression(com.alipay.codequery.coref.model.Expression.BinaryExpression expression); + + void storePolyadicExpression(Expression.PolyadicExpression expression); + + void storeUnaryExpression(Expression.UnaryExpression expression); + + void storeForeachStatement(Statement.ForeachStatement statement); + + void storeAnnotationArgumentWithName(Annotation.AnnotationArgument annotationArgument); + + void storeAnnotationArgumentWithoutName(Annotation.AnnotationArgument annotationArgument); + + void storeProgram(Program program); + + void storeModifier(Modifier modifier); + + void storeModifierList(Modifier modifier); + + void storeFile(File file); + + void storeFolder(Folder folder); + + void storeContainerParent(ContainerParent container); + + void storeIdentifier(Identifier identifier); + + void handleLiteral(Literal literal); + + void storeLiteral(Literal literal, java.lang.Class mapperClass); + + void storeNpProject(NpProject npProject); + + void storeNpFile(NpFile npFile); + + void storeNpClass(NpClass npClass); + + void storeNpInterface(NpInterface npInterface); + + void storeNpMethod(NpMethod npMethod); +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/LocalCorefCache.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/LocalCorefCache.java new file mode 100644 index 00000000..4c511632 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/LocalCorefCache.java @@ -0,0 +1,100 @@ +package com.alipay.codequery.coref.storage; + +import com.google.common.collect.Sets; + +import java.io.File; +import java.util.HashSet; +import java.util.Set; + +public class LocalCorefCache implements CorefCache { + + private final File fileObjectDir; + private final File refDir; + + /** + * 本地缓存可以选择关联远程缓存,对本地缓存的操作同时映射到远程缓存上。 + */ + private CorefCache remoteCorefCache; + + public LocalCorefCache(File dir, CorefCache remoteCorefCache) { + this.fileObjectDir = new File(dir.getAbsolutePath() + File.separator + "objects"); + this.fileObjectDir.mkdirs(); + this.refDir = new File(dir.getAbsolutePath() + File.separator + "refs"); + this.refDir.mkdirs(); + this.remoteCorefCache = remoteCorefCache; + } + + @Override + public Set getAllObjectIds() { + Set localObjectIds = getLocalObjectIds(); + if (remoteCorefCache == null) { + return localObjectIds; + } + + // 若关联着远端存储,则需要统计远端和本地,合并结果 + Set remoteObjectIds = remoteCorefCache.getAllObjectIds(); + localObjectIds.addAll(remoteObjectIds); + return localObjectIds; + } + + @Override + public void putObjects(Set objectList) { + // 本地存储,storage已经写入过了,可以不管 + if (remoteCorefCache == null) { + return; + } + + remoteCorefCache.putObjects(objectList); + } + + @Override + public Set getObjectByIds(Set objectIds) { + if (remoteCorefCache == null) { + return new HashSet<>(); + } + + // 只下载本地不存在,且远程存在的 + Set localObjectIds = getLocalObjectIds(); + Set shouldFetchIds = Sets.difference(objectIds, localObjectIds).immutableCopy(); + return remoteCorefCache.getObjectByIds(shouldFetchIds); + } + + @Override + public File getLocalObjectDir() { + return this.fileObjectDir; + } + + @Override + public void putCommit(Commit commit) { + File commitJsonFile = new File(refDir + File.separator + commit.getId() + ".json"); + commit.writeToJsonFile(commitJsonFile); + + if (remoteCorefCache != null) { + remoteCorefCache.putCommit(commit); + } + } + + @Override + public Commit getCommit(String commitId) { + File commitJsonFile = new File(refDir + File.separator + commitId); + if (!commitJsonFile.exists()) { + // 若本地没有则尝试从远程获取 + return remoteCorefCache.getCommit(commitId); + } + return Commit.readFromFile(commitJsonFile); + } + + private Set getLocalObjectIds() { + Set cachedFileObjectIds = new HashSet<>(); + File[] childFiles = fileObjectDir.listFiles(); + if (childFiles == null || childFiles.length == 0) { + return cachedFileObjectIds; + } + + for (File childFile : childFiles) { + cachedFileObjectIds.add(childFile.getName()); + } + + return cachedFileObjectIds; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/OssCorefCache.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/OssCorefCache.java new file mode 100644 index 00000000..12959216 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/OssCorefCache.java @@ -0,0 +1,255 @@ +package com.alipay.codequery.coref.storage; + +import com.alibaba.fastjson.JSON; +import com.aliyun.oss.ClientException; +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.aliyun.oss.OSSException; +import com.aliyun.oss.model.*; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.ini4j.Wini; + +import java.io.*; +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +@Slf4j +public class OssCorefCache implements CorefCache { + + private final String endpoint; + private final String bucket; + private final String objectPathPrefix; + private final String refPathPrefix; + + private final String accessKeyId; + private final String accessKeySecret; + + private final File localFileObjectDir; + private final File localRefDir; + + private static final String compressedFileSuffix = ".gz"; + private static final String jsonFileSuffix = ".json"; + + public OssCorefCache(String pathPrefix, File localCacheDir, String bucket, File ossConfigFile) { + this.objectPathPrefix = pathPrefix + "objects/"; + this.refPathPrefix = pathPrefix + "refs/"; + this.localFileObjectDir = new File(localCacheDir.getAbsolutePath() + File.separator + "objects"); + this.localFileObjectDir.mkdirs(); + this.localRefDir = new File(localCacheDir.getAbsolutePath() + File.separator + "refs"); + this.localRefDir.mkdirs(); + if (StringUtils.isBlank(bucket)) { + throw new IllegalArgumentException("bucket cannot be blank!"); + } + this.bucket = bucket; + + if (ossConfigFile == null) { + throw new IllegalArgumentException("please specify oss config file!"); + } + if (!ossConfigFile.exists()) { + throw new RuntimeException("oss config file not exists!"); + } + try { + Wini ini = new Wini(ossConfigFile); + String endpoint = ini.get("Credentials", "endpoint"); + String accessKeyId = ini.get("Credentials", "accessKeyID"); + String accessKeySecret = ini.get("Credentials", "accessKeySecret"); + + if (endpoint == null || accessKeyId == null || accessKeySecret == null) { + throw new IllegalArgumentException("missing value: endpoint or accessKeyID or accessKeySecret."); + } + this.endpoint = endpoint; + this.accessKeyId = accessKeyId; + this.accessKeySecret = accessKeySecret; + } catch (IOException iffe) { + throw new RuntimeException("parse config file get exception.", iffe); + } + + } + + @Override + public Set getAllObjectIds() { + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + Set idSet = new HashSet<>(); + try { + // 分页获取 + int maxKeys = 200; + ListObjectsV2Result listObjectsV2Result; + String nextContinuationToken = null; + do { + ListObjectsV2Request listObjectsV2Request = new ListObjectsV2Request(bucket, objectPathPrefix); + listObjectsV2Request.setMaxKeys(maxKeys); + listObjectsV2Request.setContinuationToken(nextContinuationToken); + + listObjectsV2Result = ossClient.listObjectsV2(listObjectsV2Request); + + for (OSSObjectSummary summary : listObjectsV2Result.getObjectSummaries()) { + String key = summary.getKey(); + if (key.endsWith(compressedFileSuffix)) { + key = key.substring(0, key.lastIndexOf('.')); + } + String hashId = StringUtils.removeStart(key, objectPathPrefix); + idSet.add(hashId); + } + nextContinuationToken = listObjectsV2Result.getNextContinuationToken(); + } while (listObjectsV2Result.isTruncated()); + } catch (OSSException oe) { + log.error("List object get OSSException. Error Message: {}, Error Code: {}, Request ID: {}, Host ID: {}", + oe.getErrorMessage(), oe.getErrorCode(), oe.getRequestId(), oe.getHostId()); + } catch (ClientException ce) { + log.error("List object get ClientException. Error Message:" + ce.getMessage()); + } finally { + if (ossClient != null) { + ossClient.shutdown(); + } + } + + return idSet; + } + + @Override + public void putObjects(Set objectList) { + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + ExecutorService es = Executors.newFixedThreadPool(8); + CountDownLatch count = new CountDownLatch(objectList.size()); + for (FileScopeCorefObject fileObject : objectList) { + es.submit(() -> { + File cacheFile = fileObject.getCacheFile(); + File cacheZipFile = new File(cacheFile.getAbsolutePath() + compressedFileSuffix); + try { + FileInputStream fis = new FileInputStream(cacheFile); + GZIPOutputStream gzipOutputStream = new GZIPOutputStream(new FileOutputStream(cacheZipFile)); + IOUtils.copy(fis, gzipOutputStream); + gzipOutputStream.close(); + fis.close(); + + // 上传到OSS + String objectName = objectPathPrefix + fileObject.getHashId() + compressedFileSuffix; + ossClient.putObject(new PutObjectRequest(bucket, objectName, cacheZipFile)); + } catch (IOException e) { + log.error("gzip compress get IOException. file objectId: {}", fileObject.getHashId(), e); + } catch (OSSException oe) { + log.error("Put object get OSSException. Error Message: {}, Error Code: {}, Request ID: {}, Host ID: {}", + oe.getErrorMessage(), oe.getErrorCode(), oe.getRequestId(), oe.getHostId()); + } catch (ClientException ce) { + log.error("Put object get ClientException. Error Message:" + ce.getMessage()); + } finally { + count.countDown(); + } + + // 上传完gz文件后,删除本地的gz文件 + cacheZipFile.delete(); + }); + } + + try { + count.await(); + } catch (InterruptedException e) { + log.error("count down await get exception. ", e); + } finally { + es.shutdown(); + if (ossClient != null) { + ossClient.shutdown(); + } + } + } + + @Override + public Set getObjectByIds(Set objectIds) { + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + Set cacheFileSet = new HashSet<>(); + ExecutorService es = Executors.newFixedThreadPool(8); + CountDownLatch count = new CountDownLatch(objectIds.size()); + for (String objectId : objectIds) { + es.submit(() -> { + try { + String path = objectPathPrefix + objectId + compressedFileSuffix; + File downloadedFile = new File(this.localFileObjectDir + "/" + objectId + compressedFileSuffix); + ossClient.getObject(new GetObjectRequest(bucket, path), downloadedFile); + File decompressedFile = new File(this.localFileObjectDir + "/" + objectId); + + GZIPInputStream gzipInputStream = new GZIPInputStream(new FileInputStream(downloadedFile)); + FileOutputStream fos = new FileOutputStream(decompressedFile); + IOUtils.copy(gzipInputStream, fos); + gzipInputStream.close(); + fos.close(); + // 删除下载的压缩文件 + downloadedFile.delete(); + + FileScopeCorefObject fileScopeCorefObject = new FileScopeCorefObject(); + fileScopeCorefObject.setCacheFile(decompressedFile); + fileScopeCorefObject.setHashId(objectId); + cacheFileSet.add(fileScopeCorefObject); + } catch (IOException e) { + log.error("gzip decompress get IOException. file objectId: {}", objectId, e); + } catch (OSSException oe) { + log.error("Get object get OSSException. Error Message: {}, Error Code: {}, Request ID: {}, Host ID: {}", + oe.getErrorMessage(), oe.getErrorCode(), oe.getRequestId(), oe.getHostId()); + } catch (ClientException ce) { + log.error("Get object get ClientException. Error Message:" + ce.getMessage()); + } finally { + count.countDown(); + } + }); + } + + try { + count.await(); + } catch (InterruptedException e) { + log.error("count down await get exception. ", e); + } finally { + es.shutdown(); + if (ossClient != null) { + ossClient.shutdown(); + } + } + + return cacheFileSet; + } + + @Override + public File getLocalObjectDir() { + return this.localFileObjectDir; + } + + @Override + public void putCommit(Commit commit) { + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + String objectName = refPathPrefix + commit.getId() + jsonFileSuffix; + String commitJsonString = JSON.toJSONString(commit); + InputStream inputStream = new ByteArrayInputStream(commitJsonString.getBytes()); + try { + ossClient.putObject(new PutObjectRequest(bucket, objectName, inputStream)); + } catch (OSSException oe) { + log.error("Put object get OSSException. Error Message: {}, Error Code: {}, Request ID: {}, Host ID: {}", + oe.getErrorMessage(), oe.getErrorCode(), oe.getRequestId(), oe.getHostId()); + } catch (ClientException ce) { + log.error("Put object get ClientException. Error Message:" + ce.getMessage()); + } finally { + if (ossClient != null) { + ossClient.shutdown(); + } + } + } + + @Override + public Commit getCommit(String commitId) { + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + String objectName = refPathPrefix + commitId + jsonFileSuffix; + boolean exists = ossClient.doesObjectExist(bucket, objectName); + if (!exists) { + return null; + } + // 若在oss存在,则拷贝到本地缓存,并读取内容返回 + File localCommitFile = new File(localRefDir.getAbsolutePath() + File.separator + commitId + jsonFileSuffix); + ossClient.getObject(new GetObjectRequest(bucket, objectName), localCommitFile); + return Commit.readFromFile(localCommitFile); + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/RemoteCacheType.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/RemoteCacheType.java new file mode 100644 index 00000000..091a4ab2 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/RemoteCacheType.java @@ -0,0 +1,5 @@ +package com.alipay.codequery.coref.storage; + +public enum RemoteCacheType { + oss; +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteStorage2.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteStorage2.java new file mode 100644 index 00000000..8f57a35d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteStorage2.java @@ -0,0 +1,830 @@ +package com.alipay.codequery.coref.storage; + +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.coref.model.Class; +import com.alipay.codequery.coref.model.Comment; +import com.alipay.codequery.coref.model.Expression; +import com.alipay.codequery.coref.model.File; +import com.alipay.codequery.coref.model.Folder; +import com.alipay.codequery.coref.model.Identifier; +import com.alipay.codequery.coref.model.Modifier; +import com.alipay.codequery.coref.model.Module; +import com.alipay.codequery.coref.model.Program; +import com.alipay.codequery.coref.model.Statement; +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.coref.model.NpClass; +import com.alipay.codequery.coref.model.NpFile; +import com.alipay.codequery.coref.model.NpInterface; +import com.alipay.codequery.coref.model.NpMethod; +import com.alipay.codequery.coref.model.NpProject; +import com.alipay.codequery.dal.mybatis.domain.*; +import com.alipay.codequery.dal.mybatis.domain.Exception; +import com.alipay.codequery.dal.mybatis.mapper.*; +import com.alipay.codequery.coref.model.*; +import com.alipay.codequery.dal.mybatis.domain.Primitive; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.ibatis.datasource.DataSourceFactory; +import org.apache.ibatis.datasource.pooled.PooledDataSourceFactory; +import org.apache.ibatis.io.ResolverUtil; +import org.apache.ibatis.mapping.Environment; +import org.apache.ibatis.session.Configuration; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; +import org.apache.ibatis.session.SqlSessionFactoryBuilder; +import org.apache.ibatis.transaction.TransactionFactory; +import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import tk.mybatis.mapper.entity.Config; +import tk.mybatis.mapper.mapperhelper.MapperHelper; + +import javax.sql.DataSource; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; +import java.util.List; +import java.util.stream.Stream; + +@Slf4j +public class SqliteStorage2 implements IStorage { + + public static final Logger logger = LogManager.getLogger(SqliteStorage2.class); + + private static final Set> mappers = new HashSet<>(); + static { + ResolverUtil> resolverUtil = new ResolverUtil<>(); + resolverUtil.find(new ResolverUtil.IsA(Object.class), "com.alipay.codequery.dal.mybatis.mapper"); + Set>> mapperSet = resolverUtil.getClasses(); + mappers.addAll(mapperSet); + } + + private final SqlSessionFactory sqlSessionFactory; + private final MapperHelper mapperHelper; + private int batchSize = 2000; + + private final Map> cacheManager = Collections.synchronizedMap(new HashMap<>()); + + public SqliteStorage2(String dbDir, String dbFileName) { + copyDBFiles(dbDir, dbFileName); + + // init the mapper + Config config = new Config(); + config.setIDENTITY("sqlite"); + config.setEnableMethodAnnotation(true); + config.setNotEmpty(true); + config.setCheckExampleEntityClass(true); + config.setUseSimpleType(true); + config.setEnumAsSimpleType(true); + config.setWrapKeyword("`{0}`"); + mapperHelper = new MapperHelper(); + mapperHelper.setConfig(config); + + Properties properties = new Properties(); + properties.setProperty("driver", "org.sqlite.JDBC"); + properties.setProperty("url", "jdbc:sqlite:" + Paths.get(dbDir, dbFileName)); + properties.setProperty("username", ""); + properties.setProperty("password", ""); + + DataSourceFactory factory = new PooledDataSourceFactory(); + DataSource dataSource = factory.getDataSource(); + factory.setProperties(properties); + TransactionFactory transactionFactory = new JdbcTransactionFactory(); + Environment environment = new Environment("development", transactionFactory, dataSource); + Configuration configuration = new Configuration(environment); + for (java.lang.Class mapperClass : mappers) { + configuration.addMapper(mapperClass); + } + + sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration); + + SqlSession session = sqlSessionFactory.openSession(false); + mapperHelper.processConfiguration(session.getConfiguration()); + session.commit(); + session.close(); + } + + private void copyDBFiles(String dbDir, String corefDbName) { + try { + Path destPath = Paths.get(dbDir, corefDbName); + if (destPath.toFile().exists()) { + Files.delete(destPath); + } + + InputStream in = this.getClass().getClassLoader().getResourceAsStream("coref_java_src.db"); + IOUtils.copy(in, new FileOutputStream(destPath.toFile())); + } catch (IOException e) { + logger.error("copy db file get error!", e); + } + } + + private void insert(java.lang.Class mapperClass, Object object) { + Set objectList = cacheManager.computeIfAbsent(mapperClass, k -> Collections.synchronizedSet(new HashSet<>())); + objectList.add(object); + } + + + + @Override + public void commit() { + SqlSession session = sqlSessionFactory.openSession(false); + cacheManager.forEach((mapperClass, value) -> { + List doList = new ArrayList<>(value); + Object mapper = session.getMapper(mapperClass); + try { + // MENTION: here we use reflect to reduce the coding work, but make sense while the dal change. + java.lang.reflect.Method method = mapper.getClass().getMethod("insertMultiple", Collection.class); + // we must limit the batch insert size to avoid blob over-size crash + Stream.iterate(0, n -> n + 1).limit(doList.size() / batchSize + 1) + .forEach(idx -> { + int startIndex = idx * batchSize; + int endIndex = Integer.min(startIndex + batchSize, doList.size()); + if (startIndex >= doList.size()) { + return; + } + List subList = doList.subList(startIndex, endIndex); + if (!subList.isEmpty()) { + try { + method.invoke(mapper, subList); + session.commit(); + } catch (IllegalAccessException | InvocationTargetException e) { + e.printStackTrace(); + } + } + } + ); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } + }); + session.close(); + cacheManager.clear(); + } + + @Override + public void storeLocation(com.alipay.codequery.coref.model.Location location) { + insert(LocationMapper.class, location.extractLocation()); + } + + @Override + public void storeStatementEnclosingExpression(StatementEnclosingExpression s) { + insert(StatementEnclosingExpressionMapper.class, s); + } + + @Override + public void storeCallableEnclosingExpression(CallableEnclosingExpression c) { + insert(CallableEnclosingExpressionMapper.class, c); + } + + @Override + public void storeCallableEnclosingStatement(CallableEnclosingStatement c) { + insert(CallableEnclosingStatementMapper.class, c); + } + + @Override + public void storeNumberOfLines(com.alipay.codequery.coref.model.Location.NumberOfLines numberOfLines) { + insert(NumberOfLinesMapper.class, numberOfLines.extractNumberOfLines()); + } + + @Override + public void storeNameStrings(NameString nameString) { + insert(NameStringMapper.class, nameString); + } + + @Override + public void storeReferenceRelation(ReferenceRelation referenceRelation) { + insert(ReferenceRelationMapper.class, referenceRelation); + } + + @Override + public void storeCallableBinding(CallableBinding callableBinding) { + insert(CallableBindingMapper.class, callableBinding); + } + + @Override + public void storeParent(com.alipay.codequery.coref.model.Parent parent) { + insert(ParentMapper.class, parent.extractParent()); + } + + @Override + public void storeAnnotatedRelation(AnnotatedRelation annotatedRelation) { + insert(AnnotatedRelationMapper.class, annotatedRelation); + } + + @Override + public void storeParameter(com.alipay.codequery.coref.model.Parameter parameter) { + insert(ParameterMapper.class, parameter.extractParameter()); + } + + @Override + public void storeReferenceElement(com.alipay.codequery.coref.model.Expression reference) { + insert(ReferenceElementMapper.class, reference.extractReferenceElement()); + } + + @Override + public void storeImportStaticReferenceElement(com.alipay.codequery.coref.model.Expression reference) { + insert(ImportStaticReferenceElementMapper.class, reference.extractImportStaticReferenceElement()); + } + + @Override + public void storeTypeParameter(Type.TypeParameter parameter) { + insert(TypeParameterMapper.class, parameter.extractTypeParameter()); + } + + @Override + public void storeClassInitializer(com.alipay.codequery.coref.model.Expression initializer) { + insert(ClassInitializerMapper.class, initializer.extractClassInitializer()); + } + + @Override + public void storeAnnotationDeclarationParameterDefaultValue(AnnotationDeclarationParameterDefaultValue parameter) { + insert(AnnotationDeclarationParameterDefaultValueMapper.class, parameter); + } + + @Override + public void storeJavaDocTag(com.alipay.codequery.coref.model.Comment.JavaDocTag docTag) { + insert(JavadocTagMapper.class, docTag.extractJavadocTag()); + } + + @Override + public void storeAnonymousClass(Class.AnonymousClass clazz) { + insert(AnonymousClassMapper.class, clazz.extractAnonymousClass()); + } + + @Override + public void storeFileMd5Sum(FileMd5Sum file) { + insert(FileMd5SumMapper.class, file); + } + + @Override + public void storeFileSHA256Sum(FileSha256Sum file) { + insert(FileSha256SumMapper.class, file); + } + +// public void storeAnnotation(Annotations.AnnotationModel annotation){ +// if(!mock)insert(AnnotationMapper.class, annotation.extractAnnotation()); +// } + + @Override + public void storeReferenceType(Type type) { + insert(ReferenceTypeMapper.class, type.extractReferenceType()); + + } + + @Override + public void storeIfStatementWithElse(com.alipay.codequery.coref.model.Statement.IfStatement statement) { + insert(IfStatementWithElseMapper.class, statement.extractIfStatementWithElse()); + } + + @Override + public void storeIfStatementWithoutElse(com.alipay.codequery.coref.model.Statement.IfStatement statement) { + insert(IfStatementWithoutElseMapper.class, statement.extractIfStatementWithoutElse()); + } + +// public void storeTypeParameter(TypeParameterElement element){ +// if(!mock)insert(TypeParameterElementMapper.class, element); +// } + + @Override + public void storeTypeElement(Type element) { + insert(TypeElementMapper.class, element.extractTypeElement()); + } + + +// public void storeTypeArgument(TypeArgument argument){ +// if(!mock)insert(TypeArgumentMapper.class, argument); +// } + + @Override + public void storeYieldStatement(com.alipay.codequery.coref.model.Statement.YieldStatement statement) { + insert(YieldStatementMapper.class, statement.extractYieldStatement()); + } + + @Override + public void storeSynchronizedStatement(com.alipay.codequery.coref.model.Statement.SynchronizedStatement statement) { + insert(SynchronizedStatementMapper.class, statement.extractSynchronizedStatement()); + } + + + @Override + public void storeExpressionStatement(com.alipay.codequery.coref.model.Statement.ExpressionStatement statement) { + insert(ExpressionStatementMapper.class, statement.extractExpressionStatement()); + } + + @Override + public void storeCodeBlock(com.alipay.codequery.coref.model.Statement.CodeBlock codeblock) { + insert(CodeBlockMapper.class, codeblock.extractCodeBlock()); + } + + @Override + public void storeBlockStatement(com.alipay.codequery.coref.model.Statement.BlockStatement statement) { + insert(BlockStatementMapper.class, statement.extractBlockStatement()); + } + + @Override + public void storeLabeledStatement(com.alipay.codequery.coref.model.Statement.LabeledStatement statement) { + insert(LabeledStatementMapper.class, statement.extractLabeledStatement()); + } + + @Override + public void storeLambdaExpression(com.alipay.codequery.coref.model.Expression.LambdaExpression expression) { + insert(LambdaExpressionMapper.class, expression.extractLambdaExpression()); + } + + @Override + public void storeThisExpression(com.alipay.codequery.coref.model.Expression.ThisExpression expression) { + insert(ThisAccessExpressionMapper.class, expression.extractThisAccessExpression()); + } + + @Override + public void storeThisExpressionWithQualifier(com.alipay.codequery.coref.model.Expression.ThisExpression expression) { + insert(ThisExpressionWithQualifierMapper.class, expression.extractThisExpressionWithQualifier()); + } + + @Override + public void storeSuperAccessExpression(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + insert(SuperAccessExpressionMapper.class, expression.extractSuperAccessExpression()); + } + + @Override + public void storeSuperConstructorInvocation(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + insert(SuperConstructorInvocationMapper.class, expression.extractSuperConstructorInvocation()); + } + + @Override + public void storeEmptyStatement(com.alipay.codequery.coref.model.Statement.EmptyStatement statement) { + insert(EmptyStatementMapper.class, statement.extractEmptyStatement()); + } + + @Override + public void storeWhileStatement(com.alipay.codequery.coref.model.Statement.WhileStatement statement) { + insert(WhileStatementMapper.class, statement.extractWhileStatement()); + } + + @Override + public void storeTryStatementWithoutFinally(com.alipay.codequery.coref.model.Statement.TryStatement statement) { + insert(TryStatementWithoutFinallyMapper.class, statement.extractTryStatementWithoutFinally()); + } + + @Override + public void storeTryStatementWithFinally(com.alipay.codequery.coref.model.Statement.TryStatement statement) { + insert(TryStatementWithFinallyMapper.class, statement.extractTryStatementWithFinally()); + } + + @Override + public void storeThrowStatement(com.alipay.codequery.coref.model.Statement.ThrowStatement statement) { + insert(ThrowStatementMapper.class, statement.extractThrowStatement()); + } + + + @Override + public void storeSwitchStatement(com.alipay.codequery.coref.model.Statement.SwitchStatement statement) { + insert(SwitchStatementMapper.class, statement.extractSwitchStatement()); + } + + @Override + public void storeSwitchLabelStatement(com.alipay.codequery.coref.model.Statement.SwitchLabelStatement statement) { + insert(SwitchLabelStatementMapper.class, statement.extractSwitchLabelStatement()); + } + + @Override + public void storeDoWhileStatement(com.alipay.codequery.coref.model.Statement.DoWhileStatement statement) { + insert(DoWhileStatementMapper.class, statement.extractDoWhileStatement()); + } + + @Override + public void storeContinueStatement(com.alipay.codequery.coref.model.Statement.ContinueStatement statement) { + insert(ContinueStatementMapper.class, statement.extractContinueStatement()); + } + + @Override + public void storeBreakStatement(com.alipay.codequery.coref.model.Statement.BreakStatement statement) { + insert(BreakStatementMapper.class, statement.extractBreakStatement()); + } + + @Override + public void storeReturnStatement(com.alipay.codequery.coref.model.Statement.ReturnStatement statement) { + insert(ReturnStatementMapper.class, statement.extractReturnStatement()); + } + + @Override + public void storeModule(Module module) { + insert(ModuleMapper.class, module.extractModule()); + } + + @Override + public void storeTypeLiteral(Type.TypeLiteral literal) { + insert(TypeLiteralMapper.class, literal.extractTypeLiteral()); + } + + @Override + public void storeAssertStatement(com.alipay.codequery.coref.model.Statement.AssertStatement statement) { + insert(AssertStatementMapper.class, statement.extractAssertStatement()); + } + + @Override + public void storeDeclarationElement(com.alipay.codequery.coref.model.Statement.DeclarationStatement statement) { + insert(DeclarationElementMapper.class, statement.extractDeclarationElement()); + } + + @Override + public void storeImport(com.alipay.codequery.coref.model.Statement.ImportStatement statement) { + insert(ImportInfoMapper.class, statement.extractImport()); + } + + @Override + public void storeImportStaticStatement(com.alipay.codequery.coref.model.Statement.ImportStatement statement) { + insert(ImportStaticStatementMapper.class, statement.extractImportStaticStatement()); + } + + @Override + public void storeResourceList(ResourceList list) { + insert(ResourceListMapper.class, list); + } + + @Override + public void storeMethodAccessExpressionWithoutType(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + insert(MethodAccessExpressionWithoutTypeMapper.class, expression.extractMethodAccessExpressionWithoutType()); + } + + @Override + public void storeMethodAccessExpressionWithType(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + insert(MethodAccessExpressionWithTypeMapper.class, expression.extractMethodAccessExpressionWithType()); + } + + @Override + public void storeMethodReferenceExpression(com.alipay.codequery.coref.model.Expression.MethodCallExpression expression) { + insert(MethodReferenceExpressionMapper.class, expression.extractMethodReferenceExpression()); + } + + @Override + public void storeArrayInitializerExpression(com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression expression) { + insert(ArrayInitializerExpressionMapper.class, expression.extractArrayInitializerExpression()); + } + + @Override + public void storeAnnotationArrayInitializer(com.alipay.codequery.coref.model.Expression.ArrayInitializationExpression expression) { + insert(AnnotationArrayInitializerMapper.class, expression.extractAnnotationArrayInitializer()); + } + + @Override + public void storeArrayAccessExpression(com.alipay.codequery.coref.model.Expression.ArrayAccessExpression expression) { + insert(ArrayAccessExpressionMapper.class, expression.extractArrayAccessExpression()); + } + + @Override + public void storeToken(Token token) { + insert(TokenMapper.class, token); + } + + @Override + public void storeLocalVariable(com.alipay.codequery.coref.model.LocalVariable variable) { + insert(LocalVariableMapper.class, variable.extractLocalVariable()); + } + +// public void storeCallExpression(Expressions.CallExpression expression){ +// if(!mock)insert(CallExpressionMapper.class, expression.extractCallExpression()); +// } + + @Override + public void storeCastExpression(com.alipay.codequery.coref.model.Expression.CastExpression expression) { + insert(TypeCastExpressionMapper.class, expression.extractTypeCastExpressiont()); + } + + @Override + public void storeReferenceExpression(com.alipay.codequery.coref.model.Expression expression) { + insert(ReferenceExpressionMapper.class, expression.extractReferenceExpression()); + } + + @Override + public void storeConstructorInvocation(com.alipay.codequery.coref.model.Expression.NewExpression expression) { + insert(ConstructorInvocationMapper.class, expression.extractConstructorInvocation()); + } + + @Override + public void storeConditionalExpression(com.alipay.codequery.coref.model.Expression.ConditionalExpression expression) { + insert(ConditionalExpressionMapper.class, expression.extractCondtionalExpression()); + } + + @Override + public void storeNewExpression(com.alipay.codequery.coref.model.Expression.NewExpression expression) { + insert(NewExpressionMapper.class, expression.extractNewExpression()); + } + + @Override + public void storeArrayCreationExpression(com.alipay.codequery.coref.model.Expression.NewExpression expression) { + insert(ArrayCreationExpressionMapper.class, expression.extractArrayCreationExpression()); + } + + @Override + public void storeField(com.alipay.codequery.coref.model.Field field) { + insert(FieldMapper.class, field.extractField()); + } + + @Override + public void storeMethod(com.alipay.codequery.coref.model.Method method) { + insert(MethodMapper.class, method.extractMethodDeclaration()); + } + + @Override + public void storeConstructor(com.alipay.codequery.coref.model.Method method) { + insert(ConstructorMapper.class, method.extractConstructor()); + } + + @Override + public void storePrimitive(Primitive primitive) { + insert(PrimitiveMapper.class, primitive); + } + + @Override + public void storeCatchClauseStatement(com.alipay.codequery.coref.model.Statement.CatchClause catchClause) { + insert(CatchSectionMapper.class, catchClause.extractCatchSection()); + } + + @Override + public void storeLocalClass(Class.ClassDefinition statement) { + insert(LocalClassMapper.class, statement.extractLocalClass()); + } + + @Override + public void storeEnumConstant(com.alipay.codequery.coref.model.Field enumField) { + insert(EnumConstantMapper.class, enumField.extractEnumConstant()); + } + + @Override + public void storeInstanceOfExpression(com.alipay.codequery.coref.model.Expression.InstanceOfExpression expression) { + insert(InstanceofExpressionMapper.class, expression.extractInstanceOfExpression()); + } + + @Override + public void storeArray(Variable array) { + insert(ArrayMapper.class, array.extractArray()); + } + + @Override + public void storeAnnotationCanResolved(Annotation.AnnotationModel annotation) { + insert(AnnotationCanResolvedMapper.class, annotation.extractAnnotationCanResolved()); + } + + @Override + public void storeAnnotationCanNotResolved(Annotation.AnnotationModel annotation) { + insert(AnnotationCanNotResolvedMapper.class, annotation.extractAnnotationCanNotResolved()); + } + + @Override + public void storeAnnotationDeclaration(Annotation.AnnotationModel annotation) { + insert(AnnotationDeclarationMapper.class, annotation.extractAnnotationDeclaration()); + } + + @Override + public void storeAnnotationDeclarationParameter(Annotation.AnnotationParameter parameter) { + insert(AnnotationDeclarationParameterMapper.class, parameter.extractAnnotationArgument()); + } + + @Override + public void storeExpression(com.alipay.codequery.coref.model.Expression expression) { + insert(ExpressionMapper.class, expression.extractExpression()); + } + + @Override + public void storePackageStatement(com.alipay.codequery.coref.model.Statement.PackageStatement packages) { + insert(PackageStatementMapper.class, packages.extractPackage()); + } + + @Override + public void storeCuPackage(Cupackage cupackage) { + insert(CupackageMapper.class, cupackage); + } + + @Override + public void storeClassHierarchy(Class.ClassHierarchy classHierarchy) { + insert(ClassHierarchyMapper.class, classHierarchy.extractClassHierarchy()); + } + + @Override + public void storeSuperExpression(com.alipay.codequery.coref.model.Expression.SuperExpression expression) { + insert(SuperExpressionMapper.class, expression.extractSuperExpression()); + } + + @Override + public void storeSuperExpressionWithQualifier(com.alipay.codequery.coref.model.Expression.SuperExpression expression) { + insert(SuperExpressionWithQualifierMapper.class, expression.extractSuperExpressionWithQualifier()); + } + + @Override + public void storeException(Exception exception) { + insert(ExceptionMapper.class, exception); + } + + @Override + public void storeClass(Class.ClassDefinition classDefinition) { + insert(clazzMapper.class, classDefinition.extractClass()); + } + + @Override + public void storeImplementlist(ClassImplementList list) { + insert(ClassImplementListMapper.class, list); + } + + + @Override + public void storeElement(Element e) { + insert(ElementMapper.class, e); + } + + @Override + public void storeReferencelist(com.alipay.codequery.coref.model.Expression.ReferenceList list) { + insert(ReferenceListMapper.class, list.extractReferenceList()); + } + + @Override + public void storeReferenceParameterlist(ParameterList.ReferenceParameterList list, int index) { + insert(ReferenceParameterListMapper.class, list.extractReferenceParameterList(index)); + } + + @Override + public void storeEmptyReferenceParameterlist(ParameterList.ReferenceParameterList list) { + insert(EmptyReferenceParameterListMapper.class, list.extractEmptyReferenceParameterList()); + } + + @Override + public void storeInterface(Class.ClassDefinition classDefinition) { + insert(InterfaceInfoMapper.class, classDefinition.extractInterface()); + } + + @Override + public void storeStatement(com.alipay.codequery.coref.model.Statement statement) { + insert(StatementMapper.class, statement.extractStatement()); + } + + @Override + public void storeComment(com.alipay.codequery.coref.model.Comment comment) { + insert(CommentMapper.class, comment.extractComment()); + } + + @Override + public void storeExpressionList(com.alipay.codequery.coref.model.Expression.ExpressionList list) { + insert(ExpressionListMapper.class, list.extractExpressionList()); + } + + @Override + public void storeExpressionListExpressionRelation(ExpressionListExpressionRelation expressionListRelation) { + insert(ExpressionListExpressionRelationMapper.class, expressionListRelation); + } + + @Override + public void storeJavaDocComment(com.alipay.codequery.coref.model.Comment.JavaDocComment comments) { + insert(JavadocCommentMapper.class, comments.extractJavaDocComment()); + } + + @Override + public void storeJavaDocDataToken(com.alipay.codequery.coref.model.Comment.JavaDocDataToken javaDocDataToken) { + insert(JavadocDataTokenMapper.class, javaDocDataToken.extractJavaDocDataToken()); + } + + @Override + public void storeJavaDocTagValue(Comment.JavaDocTagValue javaDocTagValue) { + insert(JavadocTagValueMapper.class, javaDocTagValue.extractJavaDocTagValue()); + } + + @Override + public void storeForStatement(com.alipay.codequery.coref.model.Statement.ForStatement statement) { + insert(ForStatementMapper.class, statement.extractForStatement()); + } + + @Override + public void storeAssignmentExpression(com.alipay.codequery.coref.model.Expression.AssignmentExpression expression) { + insert(AssignmentExpressionMapper.class, expression.extractAssignmentExpression()); + } + + @Override + public void storeBinaryExpression(com.alipay.codequery.coref.model.Expression.BinaryExpression expression) { + insert(BinaryExpressionMapper.class, expression.extractBinaryExpression()); + } + + @Override + public void storePolyadicExpression(com.alipay.codequery.coref.model.Expression.PolyadicExpression expression) { + insert(PolyadicExpressionMapper.class, expression.extractPolyadicExpression()); + } + + @Override + public void storeUnaryExpression(Expression.UnaryExpression expression) { + insert(UnaryExpressionMapper.class, expression.extractUnaryExpression()); + } + + @Override + public void storeForeachStatement(Statement.ForeachStatement statement) { + insert(ForeachStatementMapper.class, statement.extractForeachStatement()); + } + + @Override + public void storeAnnotationArgumentWithName(Annotation.AnnotationArgument annotationArgument) { + insert(AnnotationAccessArgumentWithNameMapper.class, annotationArgument.extractAnnotationArgumentWithName()); + } + + @Override + public void storeAnnotationArgumentWithoutName(Annotation.AnnotationArgument annotationArgument) { + insert(AnnotationAccessArgumentWithoutNameMapper.class, annotationArgument.extractAnnotationArgumentWithoutName()); + } + + @Override + public void storeProgram(Program program) { + insert(ProgramMapper.class, program.extractProgram()); + } + + @Override + public void storeModifier(com.alipay.codequery.coref.model.Modifier modifier) { + insert(ModifierMapper.class, modifier.extractModifier()); + } + + @Override + public void storeModifierList(Modifier modifier) { + insert(ModifierListMapper.class, modifier.extractModifierList()); + } + + @Override + public void storeFile(File file) { + insert(FileMapper.class, file.extractFile()); + } + + @Override + public void storeFolder(Folder folder) { + insert(FolderMapper.class, folder.extractFolder()); + } + + @Override + public void storeContainerParent(ContainerParent container) { + insert(ContainerParentMapper.class, container); + } + + @Override + public void storeIdentifier(Identifier identifier) { + insert(IdentifierMapper.class, identifier.extractIdentifier()); + } + + @Override + public void handleLiteral(Literal literal) { + switch (literal.type) { + case "String": + storeLiteral(literal, StringLiteralMapper.class); + break; + case "int": + storeLiteral(literal, IntegerLiteralMapper.class); + break; + case "char": + storeLiteral(literal, CharacterLiteralMapper.class); + break; + case "double": + storeLiteral(literal, DoubleLiteralMapper.class); + break; + case "float": + storeLiteral(literal, FloatingPointLiteralMapper.class); + break; + case "long": + storeLiteral(literal, LongLiteralMapper.class); + break; + case "boolean": + storeLiteral(literal, BooleanLiteralMapper.class); + break; + case "null": + storeLiteral(literal, NullLiteralMapper.class); + break; + + } + } + + @Override + public void storeLiteral(Literal literal, java.lang.Class mapperClass) { + insert(mapperClass, literal.extractLiteral()); + } + + @Override + public void storeNpProject(NpProject npProject) { + insert(NpProjectMapper.class, npProject.extractNpProject()); + } + + @Override + public void storeNpFile(NpFile npFile) { + insert(NpFileMapper.class, npFile.extractNpFile()); + } + + @Override + public void storeNpClass(NpClass npClass) { + insert(NpClassMapper.class, npClass.extractNpClass()); + } + + @Override + public void storeNpInterface(NpInterface npInterface) { + insert(NpInterfaceMapper.class, npInterface.extractNpInterface()); + } + + @Override + public void storeNpMethod(NpMethod npMethod) { + insert(NpMethodMapper.class, npMethod.extractNpMethod()); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteUtil.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteUtil.java new file mode 100644 index 00000000..abafd023 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/storage/SqliteUtil.java @@ -0,0 +1,214 @@ +package com.alipay.codequery.coref.storage; + +import com.alipay.codequery.coref.util.CmdUtils; +import com.google.common.collect.MapDifference; +import com.google.common.collect.Maps; +import lombok.extern.log4j.Log4j2; + +import java.io.File; +import java.sql.*; +import java.util.*; + +@Log4j2 +public class SqliteUtil { + private static Connection connect(String filePath) { + Connection conn = null; + try { + String url = String.format("jdbc:sqlite:%s", filePath); + conn = DriverManager.getConnection(url); + } catch (SQLException e) { + System.out.println(e.getMessage()); + } + return conn; + } + + + public static void importSqlite(String dir, String targetFilePath) { + File dirFile = new File(dir); + File[] files = dirFile.listFiles(); + for (File sliceDir : files) { + importSqliteSlice(sliceDir, targetFilePath); + } + } + + public static void importSqlite(Collection fileList, String targetFilePath) { + for (File sliceDir : fileList) { + importSqliteSlice(sliceDir, targetFilePath); + } + } + + private static void importSqliteSlice(File dir, String targetFilePath) { + List blackList = new ArrayList<>(); + blackList.add("primitive"); + blackList.add("sql_master"); + Set tableNameList = new HashSet<>(getTableNameList(targetFilePath)); + String insertSqlFormat = "insert into %s select * from toMerge.%s;"; + StringBuilder insertSqlBuilder = new StringBuilder(); + for (String table : tableNameList) { + if (blackList.contains(table)) { + continue; + } + String insertSql = String.format(insertSqlFormat, table, table); + insertSqlBuilder.append(insertSql); + } + + /** + * 调用sqlite原生attach命令,将每个表的数据合并到最终db的表中。 + * + * 举例一个命令如下: + * attach coref_src.db as toMerge; + * BEGIN; + * insert into table1 select * from toMerge.table1; + * insert into table2 select * from toMerge.table2; + * ... + * COMMIT; + * detach toMerge; + */ + String sql = "attach '%s' as toMerge;\n" + + "BEGIN;\n" + + "%s \n" + + "COMMIT;\n" + + "detach toMerge;\n"; + sql = String.format(sql, dir.getAbsolutePath(), insertSqlBuilder.toString()); + log.trace("Attach sql:\n" + sql); + + try { + Connection conn = connect(targetFilePath); + Statement stmt = conn.createStatement(); + stmt.executeUpdate(sql); + conn.close(); + } catch (SQLException throwables) { + throwables.printStackTrace(); + } + } + + private static List getTableNameList(String targetFilePath) { + String sql = "select tbl_name from sqlite_master"; + List tableNameList = new ArrayList<>(); + try (Connection conn = connect(targetFilePath); + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery(sql)) { + while (rs.next()) { + tableNameList.add(rs.getString("tbl_name")); + } + } catch (SQLException throwables) { + throwables.printStackTrace(); + } + return tableNameList; + } + + public static void importCSV(String dir, String targetSqlitePath) { + File dirFile = new File(dir); + File[] files = dirFile.listFiles(File::isDirectory); + for (File sliceDir : files) { + importCsvSlice(sliceDir, targetSqlitePath); + } + } + + private static void importCsvSlice(File dir, String targetSqlitePath) { + File[] files = dir.listFiles(); + for (File tableFile : files) { + if (tableFile.getName().endsWith(".csv")) { + importCsvToTable(tableFile, targetSqlitePath); + } + } + + } + + private static void importCsvToTable(File csvFile, String targetSqlitePath) { + String filePath = csvFile.getAbsolutePath(); + String tableName = csvFile.getName().replace(".csv", ""); + String dotImportClause = String.format(".import %s %s --csv", filePath, tableName); + + String[] cmd = { + "sqlite3", + targetSqlitePath, + dotImportClause + }; + CmdUtils.runExternalCommand(cmd); + } + + public static void compare(String file1, String file2) { + Map map1 = getTableStats(file1); + Map map2 = getTableStats(file2); + System.out.printf("db1: %s%n", file1); + System.out.printf("db2: %s%n", file2); + System.out.printf("db1 db2 tables: %s, %s%n", map1.size(), map2.size()); + + MapDifference diff = Maps.difference(map1, map2); + String statStr = String.format("same, different: %s, %s", diff.entriesInCommon().size(), diff.entriesDiffering().size()); + System.out.println(statStr); + + Map> entriesDiffering = diff.entriesDiffering(); + + for (Map.Entry> entry : entriesDiffering.entrySet()) { + String tableName = entry.getKey(); + Long val1 = entry.getValue().leftValue(); + Long val2 = entry.getValue().rightValue(); + String outString = String.format("%s (%s, %s)", tableName, val1, val2); + System.out.println(outString); + } + } + + private static Long getTableCount(String table, Connection connection) { + String sql = String.format("select count(*) from %s", table); + try { + Statement stmt = connection.createStatement(); + ResultSet resultSet = stmt.executeQuery(sql); + String countStr = resultSet.getString(1); + return Long.parseLong(countStr); + } catch (SQLException e) { + e.printStackTrace(); + throw new RuntimeException(); + } + } + // counts the uniquer values of a specified column in a table. + private static Long getTableDistinctCountByColumn(String table, String column, Connection connection) { + String sql = String.format("select count(distinct(%s)) from %s", column, table); + try { + Statement stmt = connection.createStatement(); + ResultSet resultSet = stmt.executeQuery(sql); + String countStr = resultSet.getString(1); + return Long.parseLong(countStr); + } catch (SQLException e) { + e.printStackTrace(); + throw new RuntimeException(); + } + } + // check the uniqueness of a specified column in a table. + public static boolean isUniqueColumn(String table, String column, String filePath) { + Connection connection = connect(filePath); + Long tableCount = getTableCount(table, connection); + Long columnCount = getTableDistinctCountByColumn(table, column, connection); + return tableCount.equals(columnCount); + } + + public static Map getTableStats(String filePath) { + List tables1 = getTableNameList(filePath); + Connection connection1 = connect(filePath); + Map map1 = new HashMap<>(); + for (String table : tables1) { + Long tableCount = getTableCount(table, connection1); + map1.put(table, tableCount); + } + return map1; + } + //select specified column values of a table. + public static List getRecordValue(String table, String column, String filePath) { + Connection connection = connect(filePath); + String sql = String.format("select %s from %s", column, table); + List result = new ArrayList<>(); + try { + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(sql); + while (resultSet.next()) { + result.add(resultSet.getString(column)); + } + return result; + } catch (SQLException e) { + e.printStackTrace(); + throw new RuntimeException(); + } + } + +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/CmdUtils.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/CmdUtils.java new file mode 100644 index 00000000..9a1c8178 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/CmdUtils.java @@ -0,0 +1,32 @@ +package com.alipay.codequery.coref.util; + +import lombok.extern.log4j.Log4j2; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; + + +@Log4j2 +public class CmdUtils { + + public static List runExternalCommand(String... cmdItems) { + List lineRes = new ArrayList<>(); + try { + ProcessBuilder builder = new ProcessBuilder(cmdItems); + builder.redirectErrorStream(true); + Process process = builder.start(); + BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream())); + String line; + while ((line = input.readLine()) != null) { + lineRes.add(line); + } + input.close(); + } catch (Exception e) { + e.printStackTrace(); + } + + return lineRes; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ConvertCodeUtil.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ConvertCodeUtil.java new file mode 100644 index 00000000..0ef73177 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ConvertCodeUtil.java @@ -0,0 +1,63 @@ +package com.alipay.codequery.coref.util; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import java.io.*; + +public class ConvertCodeUtil { + private static final Logger logger = LogManager.getLogger(ConvertCodeUtil.class); + + private static final String FILE_PATH = ""; //文件路径 + private static final String TARGET_CODE = "UTF-8"; //目标文件编码 + private static final String SOURCE_CODE = "GBK"; //源文件编码 + private static final String FILE_END_WITH = ".java"; //转换文件格式 + public static long start = System.currentTimeMillis(); + + public static void main(String[] args) throws IOException { + File srcFolder = new File(FILE_PATH); + normCodecToUTF8ForDir(srcFolder); + System.out.println("success"); + System.out.println("耗时时间:" + (System.currentTimeMillis() - start)); + } + + public static void normCodecToUTF8ForDir(File srcFolder) throws IOException { + File[] fileArray = srcFolder.listFiles(); + for (File file : fileArray) { + if (file.isDirectory()) { + normCodecToUTF8ForDir(file); + } else { + if (file.getName().endsWith(FILE_END_WITH)) { + normCodecToUTF8ForFile(file); + } + } + } + } + + public static void normCodecToUTF8ForFile(File file) throws IOException { + String s = JudgeFileCharset.getFileCharsetByICU4J(file); + if (!(s.equals("UTF-8"))) { + FileInputStream fis = new FileInputStream(file); + InputStreamReader isr = new InputStreamReader(fis, SOURCE_CODE); + BufferedReader br = new BufferedReader(isr); + String OriStr; + StringBuilder stringBuilder = new StringBuilder(); + while ((OriStr = br.readLine()) != null) { + //手动拼接换行符 + OriStr += "\n"; + stringBuilder.append(OriStr); + } + String targetStr = stringBuilder.toString(); + //false代表不追加直接覆盖,true代表追加文件 + FileOutputStream fos = new FileOutputStream(file.getAbsolutePath(), false); + OutputStreamWriter osw = new OutputStreamWriter(fos, TARGET_CODE); + osw.write(targetStr); + osw.flush(); + osw.close(); + fos.close(); + br.close(); + isr.close(); + fis.close(); + } + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/HashUtil.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/HashUtil.java new file mode 100644 index 00000000..90838393 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/HashUtil.java @@ -0,0 +1,143 @@ +package com.alipay.codequery.coref.util; + +import org.apache.commons.codec.binary.Hex; +import org.apache.commons.codec.digest.DigestUtils; + +import java.io.*; +import java.security.MessageDigest; + +public class HashUtil { + public static String getFileMD5(String filename) { + File cachedfile = new File(filename); + FileInputStream fileInputStream = null; + try { + MessageDigest MD5 = MessageDigest.getInstance("MD5"); + fileInputStream = new FileInputStream(cachedfile); + byte[] buffer = new byte[8192]; + int length; + while ((length = fileInputStream.read(buffer)) != -1) { + MD5.update(buffer, 0, length); + } + return new String(Hex.encodeHex(MD5.digest())); + } catch (Exception e) { + e.printStackTrace(); + return null; + } finally { + try { + if (fileInputStream != null) { + fileInputStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + public static String GetStringMD5(String target) { + return DigestUtils.md5Hex(target); + } + + public static String getFileSHA1(String filename) { + File cachedfile = new File(filename); + String str = ""; + try { + str = getHashCode(cachedfile, "SHA-256"); + } catch (Exception e) { + e.printStackTrace(); + } + return str; + } + + public static Long hashString(String value) { + Long hash = 0L; + if (value.length() > 0) { + for (int i = 0; i < value.length(); i++) { + hash = 63 * hash + value.charAt(i); + } + } + return hash; + } + + public static Long getStringHash(String value) { + return HashUtil.hashString(value); + // return UUID.nameUUIDFromBytes(base.getBytes()).getMostSignificantBits(); + } + + public static Long getStringSHA256(String base) { + try { + MessageDigest digest = MessageDigest.getInstance("SHA-256"); + byte[] hash = digest.digest(base.getBytes("UTF-8")); + StringBuffer hexString = new StringBuffer(); + for (int i = 0; i < hash.length; i++) { + String hex = Integer.toHexString(0xff & hash[i]); + if (hex.length() == 1) hexString.append('0'); + hexString.append(hex); + } + String temp = hexString.toString(); + Long hashId = Long.parseLong(temp.substring(49, 64), 16); + return hashId; + } catch (Exception ex) { + throw new RuntimeException(ex); + } + } + + public static int getShortStringSHA256(String base) { + try { + MessageDigest digest = MessageDigest.getInstance("SHA-256"); + byte[] hash = digest.digest(base.getBytes("UTF-8")); + StringBuffer hexString = new StringBuffer(); + for (int i = 0; i < hash.length; i++) { + String hex = Integer.toHexString(0xff & hash[i]); + if (hex.length() == 1) hexString.append('0'); + hexString.append(hex); + } + String temp = hexString.toString(); + int hashId = Integer.parseInt(temp.substring(57, 64), 16); + return hashId; + } catch (Exception ex) { + throw new RuntimeException(ex); + } + } + + public static String getHashCode(File file, String hashType) throws Exception { + InputStream fis = new FileInputStream(file); + byte buffer[] = new byte[1024]; + MessageDigest sha256 = MessageDigest.getInstance(hashType); + for (int numRead = 0; (numRead = fis.read(buffer)) > 0; ) { + sha256.update(buffer, 0, numRead); + } + fis.close(); + return toHexString(sha256.digest()); + } + + public static String toHexString(byte b[]) { + StringBuilder sb = new StringBuilder(); + for (byte aB : b) { + sb.append(Integer.toHexString(aB & 0xFF)); + } + return sb.toString(); + } + + /** + * generate sha1 hash as git hash-object command + * @param file + * @return + */ + public static String getFileSha1Hash(File file) { + try { + BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); + ByteArrayOutputStream buf = new ByteArrayOutputStream(); + int result = bis.read(); + while (result != -1) { + buf.write((byte) result); + result = bis.read(); + } + String content = buf.toString("UTF-8"); + String contentForHash = "blob " + buf.size() + "\0" + content; + return DigestUtils.sha1Hex(contentForHash); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/JudgeFileCharset.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/JudgeFileCharset.java new file mode 100644 index 00000000..8d7ee2f0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/JudgeFileCharset.java @@ -0,0 +1,34 @@ +package com.alipay.codequery.coref.util; + +import com.ibm.icu.text.CharsetDetector; +import com.ibm.icu.text.CharsetMatch; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class JudgeFileCharset { + private static final Logger logger = LogManager.getLogger(JudgeFileCharset.class); + public static CharsetDetector detector = new CharsetDetector(); + + public static String getFileCharsetByICU4J(File file) { + String encoding = null; + try { + Path path = Paths.get(file.getPath()); + byte[] data = Files.readAllBytes(path); + detector.setText(data); + CharsetMatch match = detector.detect(); + if (match == null) { + return encoding; + } + encoding = match.getName(); + } catch (IOException e) { + System.err.println(e); + } + return encoding; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ReadStream.java b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ReadStream.java new file mode 100644 index 00000000..c8fd5e71 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/coref/util/ReadStream.java @@ -0,0 +1,34 @@ +package com.alipay.codequery.coref.util; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; + +public class ReadStream implements Runnable { + String name; + InputStream is; + Thread thread; + public ReadStream(String name, InputStream is) { + this.name = name; + this.is = is; + } + public void start () { + thread = new Thread (this); + thread.start (); + } + public void run () { + try { + InputStreamReader isr = new InputStreamReader (is); + BufferedReader br = new BufferedReader (isr); + while (true) { + String s = br.readLine (); + if (s == null) break; + System.out.println ("[" + name + "] " + s); + } + is.close (); + } catch (Exception ex) { + System.out.println ("Problem reading stream " + name + "... :" + ex); + ex.printStackTrace (); + } + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotatedRelation.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotatedRelation.java new file mode 100644 index 00000000..8782e525 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotatedRelation.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotatedRelation implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotation_hash_id") + private Long annotationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotated_item_hash_id") + private Long annotatedItemHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + public AnnotatedRelation(Long annotationHashId, Long annotatedItemHashId) { + this.annotationHashId = annotationHashId; + this.annotatedItemHashId = annotatedItemHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + public AnnotatedRelation() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotation_hash_id") + public Long getAnnotationHashId() { + return annotationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotation_hash_id") + public void setAnnotationHashId(Long annotationHashId) { + this.annotationHashId = annotationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotated_item_hash_id") + public Long getAnnotatedItemHashId() { + return annotatedItemHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotated_item_hash_id") + public void setAnnotatedItemHashId(Long annotatedItemHashId) { + this.annotatedItemHashId = annotatedItemHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotatedRelation other = (AnnotatedRelation) that; + return (this.getAnnotationHashId() == null ? other.getAnnotationHashId() == null : this.getAnnotationHashId().equals(other.getAnnotationHashId())) + && (this.getAnnotatedItemHashId() == null ? other.getAnnotatedItemHashId() == null : this.getAnnotatedItemHashId().equals(other.getAnnotatedItemHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getAnnotationHashId() == null) ? 0 : getAnnotationHashId().hashCode()); + result = prime * result + ((getAnnotatedItemHashId() == null) ? 0 : getAnnotatedItemHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", annotationHashId=").append(annotationHashId); + sb.append(", annotatedItemHashId=").append(annotatedItemHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithName.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithName.java new file mode 100644 index 00000000..2d392757 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithName.java @@ -0,0 +1,172 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationAccessArgumentWithName implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.annotation_access_hash_id") + private Long annotationAccessHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.argument_value_hash_id") + private Long argumentValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + public AnnotationAccessArgumentWithName(Long elementHashId, Long annotationAccessHashId, Long typeHashId, Long argumentValueHashId, Long locationHashId, Integer indexOrder, String debugMessage) { + this.elementHashId = elementHashId; + this.annotationAccessHashId = annotationAccessHashId; + this.typeHashId = typeHashId; + this.argumentValueHashId = argumentValueHashId; + this.locationHashId = locationHashId; + this.indexOrder = indexOrder; + this.debugMessage = debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + public AnnotationAccessArgumentWithName() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.annotation_access_hash_id") + public Long getAnnotationAccessHashId() { + return annotationAccessHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.annotation_access_hash_id") + public void setAnnotationAccessHashId(Long annotationAccessHashId) { + this.annotationAccessHashId = annotationAccessHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.argument_value_hash_id") + public Long getArgumentValueHashId() { + return argumentValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.argument_value_hash_id") + public void setArgumentValueHashId(Long argumentValueHashId) { + this.argumentValueHashId = argumentValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationAccessArgumentWithName other = (AnnotationAccessArgumentWithName) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getAnnotationAccessHashId() == null ? other.getAnnotationAccessHashId() == null : this.getAnnotationAccessHashId().equals(other.getAnnotationAccessHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())) + && (this.getArgumentValueHashId() == null ? other.getArgumentValueHashId() == null : this.getArgumentValueHashId().equals(other.getArgumentValueHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getAnnotationAccessHashId() == null) ? 0 : getAnnotationAccessHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + result = prime * result + ((getArgumentValueHashId() == null) ? 0 : getArgumentValueHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", annotationAccessHashId=").append(annotationAccessHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", argumentValueHashId=").append(argumentValueHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithoutName.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithoutName.java new file mode 100644 index 00000000..5c1108e9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationAccessArgumentWithoutName.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationAccessArgumentWithoutName implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.annotation_access_hash_id") + private Long annotationAccessHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.argument_value_hash_id") + private Long argumentValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + public AnnotationAccessArgumentWithoutName(Long elementHashId, Long annotationAccessHashId, Long argumentValueHashId, Long locationHashId, Integer indexOrder, String debugMessage) { + this.elementHashId = elementHashId; + this.annotationAccessHashId = annotationAccessHashId; + this.argumentValueHashId = argumentValueHashId; + this.locationHashId = locationHashId; + this.indexOrder = indexOrder; + this.debugMessage = debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + public AnnotationAccessArgumentWithoutName() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.annotation_access_hash_id") + public Long getAnnotationAccessHashId() { + return annotationAccessHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.annotation_access_hash_id") + public void setAnnotationAccessHashId(Long annotationAccessHashId) { + this.annotationAccessHashId = annotationAccessHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.argument_value_hash_id") + public Long getArgumentValueHashId() { + return argumentValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.argument_value_hash_id") + public void setArgumentValueHashId(Long argumentValueHashId) { + this.argumentValueHashId = argumentValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationAccessArgumentWithoutName other = (AnnotationAccessArgumentWithoutName) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getAnnotationAccessHashId() == null ? other.getAnnotationAccessHashId() == null : this.getAnnotationAccessHashId().equals(other.getAnnotationAccessHashId())) + && (this.getArgumentValueHashId() == null ? other.getArgumentValueHashId() == null : this.getArgumentValueHashId().equals(other.getArgumentValueHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getAnnotationAccessHashId() == null) ? 0 : getAnnotationAccessHashId().hashCode()); + result = prime * result + ((getArgumentValueHashId() == null) ? 0 : getArgumentValueHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", annotationAccessHashId=").append(annotationAccessHashId); + sb.append(", argumentValueHashId=").append(argumentValueHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationArrayInitializer.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationArrayInitializer.java new file mode 100644 index 00000000..3041c1ba --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationArrayInitializer.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationArrayInitializer implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + public AnnotationArrayInitializer(Long elementHashId, String debugMessage, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + public AnnotationArrayInitializer() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationArrayInitializer other = (AnnotationArrayInitializer) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanNotResolved.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanNotResolved.java new file mode 100644 index 00000000..e1144c72 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanNotResolved.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationCanNotResolved implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + public AnnotationCanNotResolved(Long elementHashId, String name, Long locationHashId, String debugMessage, Long parentHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + public AnnotationCanNotResolved() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationCanNotResolved other = (AnnotationCanNotResolved) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanResolved.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanResolved.java new file mode 100644 index 00000000..93233360 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationCanResolved.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationCanResolved implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.annotation_declaration_hash_id") + private Long annotationDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + public AnnotationCanResolved(Long elementHashId, String name, Long annotationDeclarationHashId, Long locationHashId, String debugMessage, Long parentHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.annotationDeclarationHashId = annotationDeclarationHashId; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + public AnnotationCanResolved() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.annotation_declaration_hash_id") + public Long getAnnotationDeclarationHashId() { + return annotationDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.annotation_declaration_hash_id") + public void setAnnotationDeclarationHashId(Long annotationDeclarationHashId) { + this.annotationDeclarationHashId = annotationDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationCanResolved other = (AnnotationCanResolved) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getAnnotationDeclarationHashId() == null ? other.getAnnotationDeclarationHashId() == null : this.getAnnotationDeclarationHashId().equals(other.getAnnotationDeclarationHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getAnnotationDeclarationHashId() == null) ? 0 : getAnnotationDeclarationHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", annotationDeclarationHashId=").append(annotationDeclarationHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclaration.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclaration.java new file mode 100644 index 00000000..9d2dfdec --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclaration.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationDeclaration implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + public AnnotationDeclaration(Long elementHashId, String qualifiedName) { + this.elementHashId = elementHashId; + this.qualifiedName = qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + public AnnotationDeclaration() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationDeclaration other = (AnnotationDeclaration) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameter.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameter.java new file mode 100644 index 00000000..b3735be3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameter.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationDeclarationParameter implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.annotation_declaration_hash_id") + private Long annotationDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.parameter_value_hash_id") + private Long parameterValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + public AnnotationDeclarationParameter(Long elementHashId, Long annotationDeclarationHashId, Long typeHashId, Long parameterValueHashId, Long locationHashId, String debugMessage) { + this.elementHashId = elementHashId; + this.annotationDeclarationHashId = annotationDeclarationHashId; + this.typeHashId = typeHashId; + this.parameterValueHashId = parameterValueHashId; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + public AnnotationDeclarationParameter() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.annotation_declaration_hash_id") + public Long getAnnotationDeclarationHashId() { + return annotationDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.annotation_declaration_hash_id") + public void setAnnotationDeclarationHashId(Long annotationDeclarationHashId) { + this.annotationDeclarationHashId = annotationDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.parameter_value_hash_id") + public Long getParameterValueHashId() { + return parameterValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.parameter_value_hash_id") + public void setParameterValueHashId(Long parameterValueHashId) { + this.parameterValueHashId = parameterValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationDeclarationParameter other = (AnnotationDeclarationParameter) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getAnnotationDeclarationHashId() == null ? other.getAnnotationDeclarationHashId() == null : this.getAnnotationDeclarationHashId().equals(other.getAnnotationDeclarationHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())) + && (this.getParameterValueHashId() == null ? other.getParameterValueHashId() == null : this.getParameterValueHashId().equals(other.getParameterValueHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getAnnotationDeclarationHashId() == null) ? 0 : getAnnotationDeclarationHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + result = prime * result + ((getParameterValueHashId() == null) ? 0 : getParameterValueHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", annotationDeclarationHashId=").append(annotationDeclarationHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", parameterValueHashId=").append(parameterValueHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameterDefaultValue.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameterDefaultValue.java new file mode 100644 index 00000000..784022ef --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnnotationDeclarationParameterDefaultValue.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnnotationDeclarationParameterDefaultValue implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.default_value") + private String defaultValue; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + public AnnotationDeclarationParameterDefaultValue(Long elementHashId, String defaultValue) { + this.elementHashId = elementHashId; + this.defaultValue = defaultValue; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + public AnnotationDeclarationParameterDefaultValue() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.default_value") + public String getDefaultValue() { + return defaultValue; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.default_value") + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue == null ? null : defaultValue.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnnotationDeclarationParameterDefaultValue other = (AnnotationDeclarationParameterDefaultValue) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDefaultValue() == null ? other.getDefaultValue() == null : this.getDefaultValue().equals(other.getDefaultValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", defaultValue=").append(defaultValue); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnonymousClass.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnonymousClass.java new file mode 100644 index 00000000..cfb42ca7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AnonymousClass.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AnonymousClass implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_reference_hash_id") + private Long baseClassReferenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_type_hash_id") + private Long baseClassTypeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + public AnonymousClass(Long elementHashId, Long baseClassReferenceHashId, Long baseClassTypeHashId, Long locationHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.baseClassReferenceHashId = baseClassReferenceHashId; + this.baseClassTypeHashId = baseClassTypeHashId; + this.locationHashId = locationHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + public AnonymousClass() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_reference_hash_id") + public Long getBaseClassReferenceHashId() { + return baseClassReferenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_reference_hash_id") + public void setBaseClassReferenceHashId(Long baseClassReferenceHashId) { + this.baseClassReferenceHashId = baseClassReferenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_type_hash_id") + public Long getBaseClassTypeHashId() { + return baseClassTypeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_type_hash_id") + public void setBaseClassTypeHashId(Long baseClassTypeHashId) { + this.baseClassTypeHashId = baseClassTypeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AnonymousClass other = (AnonymousClass) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getBaseClassReferenceHashId() == null ? other.getBaseClassReferenceHashId() == null : this.getBaseClassReferenceHashId().equals(other.getBaseClassReferenceHashId())) + && (this.getBaseClassTypeHashId() == null ? other.getBaseClassTypeHashId() == null : this.getBaseClassTypeHashId().equals(other.getBaseClassTypeHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getBaseClassReferenceHashId() == null) ? 0 : getBaseClassReferenceHashId().hashCode()); + result = prime * result + ((getBaseClassTypeHashId() == null) ? 0 : getBaseClassTypeHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", baseClassReferenceHashId=").append(baseClassReferenceHashId); + sb.append(", baseClassTypeHashId=").append(baseClassTypeHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Array.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Array.java new file mode 100644 index 00000000..097d223c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Array.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Array implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + public Array(Long elementHashId, String name) { + this.elementHashId = elementHashId; + this.name = name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + public Array() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Array other = (Array) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayAccessExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayAccessExpression.java new file mode 100644 index 00000000..78b53a97 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayAccessExpression.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ArrayAccessExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.index_expression_hash_id") + private Long indexExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.array_expression_hash_id") + private Long arrayExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + public ArrayAccessExpression(Long elementHashId, Long indexExpressionHashId, Long arrayExpressionHashId) { + this.elementHashId = elementHashId; + this.indexExpressionHashId = indexExpressionHashId; + this.arrayExpressionHashId = arrayExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + public ArrayAccessExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.index_expression_hash_id") + public Long getIndexExpressionHashId() { + return indexExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.index_expression_hash_id") + public void setIndexExpressionHashId(Long indexExpressionHashId) { + this.indexExpressionHashId = indexExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.array_expression_hash_id") + public Long getArrayExpressionHashId() { + return arrayExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.array_expression_hash_id") + public void setArrayExpressionHashId(Long arrayExpressionHashId) { + this.arrayExpressionHashId = arrayExpressionHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ArrayAccessExpression other = (ArrayAccessExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getIndexExpressionHashId() == null ? other.getIndexExpressionHashId() == null : this.getIndexExpressionHashId().equals(other.getIndexExpressionHashId())) + && (this.getArrayExpressionHashId() == null ? other.getArrayExpressionHashId() == null : this.getArrayExpressionHashId().equals(other.getArrayExpressionHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getIndexExpressionHashId() == null) ? 0 : getIndexExpressionHashId().hashCode()); + result = prime * result + ((getArrayExpressionHashId() == null) ? 0 : getArrayExpressionHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", indexExpressionHashId=").append(indexExpressionHashId); + sb.append(", arrayExpressionHashId=").append(arrayExpressionHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayCreationExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayCreationExpression.java new file mode 100644 index 00000000..15cb79c3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayCreationExpression.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ArrayCreationExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.number_of_array_dimension") + private Integer numberOfArrayDimension; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + public ArrayCreationExpression(Long elementHashId, Integer numberOfArrayDimension, Long typeHashId) { + this.elementHashId = elementHashId; + this.numberOfArrayDimension = numberOfArrayDimension; + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + public ArrayCreationExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.number_of_array_dimension") + public Integer getNumberOfArrayDimension() { + return numberOfArrayDimension; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.number_of_array_dimension") + public void setNumberOfArrayDimension(Integer numberOfArrayDimension) { + this.numberOfArrayDimension = numberOfArrayDimension; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ArrayCreationExpression other = (ArrayCreationExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getNumberOfArrayDimension() == null ? other.getNumberOfArrayDimension() == null : this.getNumberOfArrayDimension().equals(other.getNumberOfArrayDimension())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getNumberOfArrayDimension() == null) ? 0 : getNumberOfArrayDimension().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", numberOfArrayDimension=").append(numberOfArrayDimension); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayInitializerExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayInitializerExpression.java new file mode 100644 index 00000000..8ad1e635 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ArrayInitializerExpression.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ArrayInitializerExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + public ArrayInitializerExpression(Long elementHashId, Long typeHashId) { + this.elementHashId = elementHashId; + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + public ArrayInitializerExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ArrayInitializerExpression other = (ArrayInitializerExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssertStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssertStatement.java new file mode 100644 index 00000000..33290f5e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssertStatement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AssertStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_condition_hash_id") + private Long assertConditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_description_hash_id") + private Long assertDescriptionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + public AssertStatement(Long elementHashId, Long assertConditionHashId, Long assertDescriptionHashId) { + this.elementHashId = elementHashId; + this.assertConditionHashId = assertConditionHashId; + this.assertDescriptionHashId = assertDescriptionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + public AssertStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_condition_hash_id") + public Long getAssertConditionHashId() { + return assertConditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_condition_hash_id") + public void setAssertConditionHashId(Long assertConditionHashId) { + this.assertConditionHashId = assertConditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_description_hash_id") + public Long getAssertDescriptionHashId() { + return assertDescriptionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_description_hash_id") + public void setAssertDescriptionHashId(Long assertDescriptionHashId) { + this.assertDescriptionHashId = assertDescriptionHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AssertStatement other = (AssertStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getAssertConditionHashId() == null ? other.getAssertConditionHashId() == null : this.getAssertConditionHashId().equals(other.getAssertConditionHashId())) + && (this.getAssertDescriptionHashId() == null ? other.getAssertDescriptionHashId() == null : this.getAssertDescriptionHashId().equals(other.getAssertDescriptionHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getAssertConditionHashId() == null) ? 0 : getAssertConditionHashId().hashCode()); + result = prime * result + ((getAssertDescriptionHashId() == null) ? 0 : getAssertDescriptionHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", assertConditionHashId=").append(assertConditionHashId); + sb.append(", assertDescriptionHashId=").append(assertDescriptionHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssignmentExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssignmentExpression.java new file mode 100644 index 00000000..2d9d1d37 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/AssignmentExpression.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class AssignmentExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.lhs_hash_id") + private Long lhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.rhs_hash_id") + private Long rhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.opcode") + private String opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + public AssignmentExpression(Long elementHashId, Long lhsHashId, Long rhsHashId, String opcode) { + this.elementHashId = elementHashId; + this.lhsHashId = lhsHashId; + this.rhsHashId = rhsHashId; + this.opcode = opcode; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + public AssignmentExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.lhs_hash_id") + public Long getLhsHashId() { + return lhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.lhs_hash_id") + public void setLhsHashId(Long lhsHashId) { + this.lhsHashId = lhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.rhs_hash_id") + public Long getRhsHashId() { + return rhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.rhs_hash_id") + public void setRhsHashId(Long rhsHashId) { + this.rhsHashId = rhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.opcode") + public String getOpcode() { + return opcode; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.opcode") + public void setOpcode(String opcode) { + this.opcode = opcode == null ? null : opcode.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AssignmentExpression other = (AssignmentExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getLhsHashId() == null ? other.getLhsHashId() == null : this.getLhsHashId().equals(other.getLhsHashId())) + && (this.getRhsHashId() == null ? other.getRhsHashId() == null : this.getRhsHashId().equals(other.getRhsHashId())) + && (this.getOpcode() == null ? other.getOpcode() == null : this.getOpcode().equals(other.getOpcode())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getLhsHashId() == null) ? 0 : getLhsHashId().hashCode()); + result = prime * result + ((getRhsHashId() == null) ? 0 : getRhsHashId().hashCode()); + result = prime * result + ((getOpcode() == null) ? 0 : getOpcode().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", lhsHashId=").append(lhsHashId); + sb.append(", rhsHashId=").append(rhsHashId); + sb.append(", opcode=").append(opcode); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BinaryExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BinaryExpression.java new file mode 100644 index 00000000..08165e80 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BinaryExpression.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class BinaryExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.lhs_hash_id") + private Long lhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.rhs_hash_id") + private Long rhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.opcode") + private String opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + public BinaryExpression(Long elementHashId, Long lhsHashId, Long rhsHashId, String opcode) { + this.elementHashId = elementHashId; + this.lhsHashId = lhsHashId; + this.rhsHashId = rhsHashId; + this.opcode = opcode; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + public BinaryExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.lhs_hash_id") + public Long getLhsHashId() { + return lhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.lhs_hash_id") + public void setLhsHashId(Long lhsHashId) { + this.lhsHashId = lhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.rhs_hash_id") + public Long getRhsHashId() { + return rhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.rhs_hash_id") + public void setRhsHashId(Long rhsHashId) { + this.rhsHashId = rhsHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.opcode") + public String getOpcode() { + return opcode; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.opcode") + public void setOpcode(String opcode) { + this.opcode = opcode == null ? null : opcode.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BinaryExpression other = (BinaryExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getLhsHashId() == null ? other.getLhsHashId() == null : this.getLhsHashId().equals(other.getLhsHashId())) + && (this.getRhsHashId() == null ? other.getRhsHashId() == null : this.getRhsHashId().equals(other.getRhsHashId())) + && (this.getOpcode() == null ? other.getOpcode() == null : this.getOpcode().equals(other.getOpcode())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getLhsHashId() == null) ? 0 : getLhsHashId().hashCode()); + result = prime * result + ((getRhsHashId() == null) ? 0 : getRhsHashId().hashCode()); + result = prime * result + ((getOpcode() == null) ? 0 : getOpcode().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", lhsHashId=").append(lhsHashId); + sb.append(", rhsHashId=").append(rhsHashId); + sb.append(", opcode=").append(opcode); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BlockStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BlockStatement.java new file mode 100644 index 00000000..c1cea1ab --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BlockStatement.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class BlockStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.code_block_hash_id") + private Long codeBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + public BlockStatement(Long elementHashId, Long codeBlockHashId) { + this.elementHashId = elementHashId; + this.codeBlockHashId = codeBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + public BlockStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.code_block_hash_id") + public Long getCodeBlockHashId() { + return codeBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.code_block_hash_id") + public void setCodeBlockHashId(Long codeBlockHashId) { + this.codeBlockHashId = codeBlockHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BlockStatement other = (BlockStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getCodeBlockHashId() == null ? other.getCodeBlockHashId() == null : this.getCodeBlockHashId().equals(other.getCodeBlockHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getCodeBlockHashId() == null) ? 0 : getCodeBlockHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", codeBlockHashId=").append(codeBlockHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BooleanLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BooleanLiteral.java new file mode 100644 index 00000000..042eff0b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BooleanLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class BooleanLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + public BooleanLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + public BooleanLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BooleanLiteral other = (BooleanLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BreakStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BreakStatement.java new file mode 100644 index 00000000..4da2d2ea --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/BreakStatement.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class BreakStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.exited_statement_hash_id") + private Long exitedStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + public BreakStatement(Long elementHashId, Long exitedStatementHashId) { + this.elementHashId = elementHashId; + this.exitedStatementHashId = exitedStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + public BreakStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.exited_statement_hash_id") + public Long getExitedStatementHashId() { + return exitedStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.exited_statement_hash_id") + public void setExitedStatementHashId(Long exitedStatementHashId) { + this.exitedStatementHashId = exitedStatementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BreakStatement other = (BreakStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getExitedStatementHashId() == null ? other.getExitedStatementHashId() == null : this.getExitedStatementHashId().equals(other.getExitedStatementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getExitedStatementHashId() == null) ? 0 : getExitedStatementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", exitedStatementHashId=").append(exitedStatementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableBinding.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableBinding.java new file mode 100644 index 00000000..765175ae --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableBinding.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class CallableBinding implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.caller_hash_id") + private Long callerHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.callee_hash_id") + private Long calleeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + public CallableBinding(Long callerHashId, Long calleeHashId) { + this.callerHashId = callerHashId; + this.calleeHashId = calleeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + public CallableBinding() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.caller_hash_id") + public Long getCallerHashId() { + return callerHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.caller_hash_id") + public void setCallerHashId(Long callerHashId) { + this.callerHashId = callerHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.callee_hash_id") + public Long getCalleeHashId() { + return calleeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.callee_hash_id") + public void setCalleeHashId(Long calleeHashId) { + this.calleeHashId = calleeHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CallableBinding other = (CallableBinding) that; + return (this.getCallerHashId() == null ? other.getCallerHashId() == null : this.getCallerHashId().equals(other.getCallerHashId())) + && (this.getCalleeHashId() == null ? other.getCalleeHashId() == null : this.getCalleeHashId().equals(other.getCalleeHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getCallerHashId() == null) ? 0 : getCallerHashId().hashCode()); + result = prime * result + ((getCalleeHashId() == null) ? 0 : getCalleeHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", callerHashId=").append(callerHashId); + sb.append(", calleeHashId=").append(calleeHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingExpression.java new file mode 100644 index 00000000..47918137 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingExpression.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class CallableEnclosingExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.expression_hash_id") + private Long expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.callable_hash_id") + private Long callableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + public CallableEnclosingExpression(Long expressionHashId, Long callableHashId) { + this.expressionHashId = expressionHashId; + this.callableHashId = callableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + public CallableEnclosingExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.expression_hash_id") + public Long getExpressionHashId() { + return expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.expression_hash_id") + public void setExpressionHashId(Long expressionHashId) { + this.expressionHashId = expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.callable_hash_id") + public Long getCallableHashId() { + return callableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.callable_hash_id") + public void setCallableHashId(Long callableHashId) { + this.callableHashId = callableHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CallableEnclosingExpression other = (CallableEnclosingExpression) that; + return (this.getExpressionHashId() == null ? other.getExpressionHashId() == null : this.getExpressionHashId().equals(other.getExpressionHashId())) + && (this.getCallableHashId() == null ? other.getCallableHashId() == null : this.getCallableHashId().equals(other.getCallableHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getExpressionHashId() == null) ? 0 : getExpressionHashId().hashCode()); + result = prime * result + ((getCallableHashId() == null) ? 0 : getCallableHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", expressionHashId=").append(expressionHashId); + sb.append(", callableHashId=").append(callableHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingStatement.java new file mode 100644 index 00000000..f45ba467 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CallableEnclosingStatement.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class CallableEnclosingStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.statement_hash_id") + private Long statementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.callable_hash_id") + private Long callableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + public CallableEnclosingStatement(Long statementHashId, Long callableHashId) { + this.statementHashId = statementHashId; + this.callableHashId = callableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + public CallableEnclosingStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.statement_hash_id") + public Long getStatementHashId() { + return statementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.statement_hash_id") + public void setStatementHashId(Long statementHashId) { + this.statementHashId = statementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.callable_hash_id") + public Long getCallableHashId() { + return callableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.callable_hash_id") + public void setCallableHashId(Long callableHashId) { + this.callableHashId = callableHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CallableEnclosingStatement other = (CallableEnclosingStatement) that; + return (this.getStatementHashId() == null ? other.getStatementHashId() == null : this.getStatementHashId().equals(other.getStatementHashId())) + && (this.getCallableHashId() == null ? other.getCallableHashId() == null : this.getCallableHashId().equals(other.getCallableHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getStatementHashId() == null) ? 0 : getStatementHashId().hashCode()); + result = prime * result + ((getCallableHashId() == null) ? 0 : getCallableHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", statementHashId=").append(statementHashId); + sb.append(", callableHashId=").append(callableHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CatchSection.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CatchSection.java new file mode 100644 index 00000000..cc8d0996 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CatchSection.java @@ -0,0 +1,172 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class CatchSection implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.parameter_hash_id") + private Long parameterHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.try_statement_hash_id") + private Long tryStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + public CatchSection(Long elementHashId, String debugMessage, Long parameterHashId, Long typeHashId, Long locationHashId, Long tryStatementHashId, Integer indexOrder) { + this.elementHashId = elementHashId; + this.debugMessage = debugMessage; + this.parameterHashId = parameterHashId; + this.typeHashId = typeHashId; + this.locationHashId = locationHashId; + this.tryStatementHashId = tryStatementHashId; + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + public CatchSection() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.parameter_hash_id") + public Long getParameterHashId() { + return parameterHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.parameter_hash_id") + public void setParameterHashId(Long parameterHashId) { + this.parameterHashId = parameterHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.try_statement_hash_id") + public Long getTryStatementHashId() { + return tryStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.try_statement_hash_id") + public void setTryStatementHashId(Long tryStatementHashId) { + this.tryStatementHashId = tryStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CatchSection other = (CatchSection) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParameterHashId() == null ? other.getParameterHashId() == null : this.getParameterHashId().equals(other.getParameterHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getTryStatementHashId() == null ? other.getTryStatementHashId() == null : this.getTryStatementHashId().equals(other.getTryStatementHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParameterHashId() == null) ? 0 : getParameterHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getTryStatementHashId() == null) ? 0 : getTryStatementHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parameterHashId=").append(parameterHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", tryStatementHashId=").append(tryStatementHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CharacterLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CharacterLiteral.java new file mode 100644 index 00000000..aa555c0b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CharacterLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class CharacterLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + public CharacterLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + public CharacterLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CharacterLiteral other = (CharacterLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassHierarchy.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassHierarchy.java new file mode 100644 index 00000000..f36fc317 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassHierarchy.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ClassHierarchy implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.child_hash_id") + private Long childHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + public ClassHierarchy(Long childHashId, Long parentHashId) { + this.childHashId = childHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + public ClassHierarchy() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.child_hash_id") + public Long getChildHashId() { + return childHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.child_hash_id") + public void setChildHashId(Long childHashId) { + this.childHashId = childHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ClassHierarchy other = (ClassHierarchy) that; + return (this.getChildHashId() == null ? other.getChildHashId() == null : this.getChildHashId().equals(other.getChildHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getChildHashId() == null) ? 0 : getChildHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", childHashId=").append(childHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassImplementList.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassImplementList.java new file mode 100644 index 00000000..ba725c09 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassImplementList.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ClassImplementList implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.implemented_element_hash_id") + private Long implementedElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + public ClassImplementList(Long elementHashId, Long implementedElementHashId) { + this.elementHashId = elementHashId; + this.implementedElementHashId = implementedElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + public ClassImplementList() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.implemented_element_hash_id") + public Long getImplementedElementHashId() { + return implementedElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.implemented_element_hash_id") + public void setImplementedElementHashId(Long implementedElementHashId) { + this.implementedElementHashId = implementedElementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ClassImplementList other = (ClassImplementList) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getImplementedElementHashId() == null ? other.getImplementedElementHashId() == null : this.getImplementedElementHashId().equals(other.getImplementedElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getImplementedElementHashId() == null) ? 0 : getImplementedElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", implementedElementHashId=").append(implementedElementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassInitializer.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassInitializer.java new file mode 100644 index 00000000..51814fab --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ClassInitializer.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ClassInitializer implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + public ClassInitializer(Long elementHashId, String debugMessage, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + public ClassInitializer() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ClassInitializer other = (ClassInitializer) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CodeBlock.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CodeBlock.java new file mode 100644 index 00000000..23a73241 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/CodeBlock.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class CodeBlock implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.number_of_statement") + private Integer numberOfStatement; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.is_empty") + private Integer isEmpty; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + public CodeBlock(Long elementHashId, Integer numberOfStatement, Long parentHashId, Integer isEmpty, Long locationHashId, String debugMessage) { + this.elementHashId = elementHashId; + this.numberOfStatement = numberOfStatement; + this.parentHashId = parentHashId; + this.isEmpty = isEmpty; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + public CodeBlock() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.number_of_statement") + public Integer getNumberOfStatement() { + return numberOfStatement; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.number_of_statement") + public void setNumberOfStatement(Integer numberOfStatement) { + this.numberOfStatement = numberOfStatement; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.is_empty") + public Integer getIsEmpty() { + return isEmpty; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.is_empty") + public void setIsEmpty(Integer isEmpty) { + this.isEmpty = isEmpty; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CodeBlock other = (CodeBlock) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getNumberOfStatement() == null ? other.getNumberOfStatement() == null : this.getNumberOfStatement().equals(other.getNumberOfStatement())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getIsEmpty() == null ? other.getIsEmpty() == null : this.getIsEmpty().equals(other.getIsEmpty())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getNumberOfStatement() == null) ? 0 : getNumberOfStatement().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getIsEmpty() == null) ? 0 : getIsEmpty().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", numberOfStatement=").append(numberOfStatement); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", isEmpty=").append(isEmpty); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Comment.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Comment.java new file mode 100644 index 00000000..a8d76452 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Comment.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Comment implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.text") + private String text; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.comment_type") + private String commentType; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + public Comment(Long elementHashId, String text, Long parentHashId, Long locationHashId, String commentType) { + this.elementHashId = elementHashId; + this.text = text; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.commentType = commentType; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + public Comment() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.text") + public String getText() { + return text; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.text") + public void setText(String text) { + this.text = text == null ? null : text.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.comment_type") + public String getCommentType() { + return commentType; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.comment_type") + public void setCommentType(String commentType) { + this.commentType = commentType == null ? null : commentType.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Comment other = (Comment) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getText() == null ? other.getText() == null : this.getText().equals(other.getText())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getCommentType() == null ? other.getCommentType() == null : this.getCommentType().equals(other.getCommentType())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getText() == null) ? 0 : getText().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getCommentType() == null) ? 0 : getCommentType().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", text=").append(text); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", commentType=").append(commentType); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConditionalExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConditionalExpression.java new file mode 100644 index 00000000..37b7a5bd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConditionalExpression.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ConditionalExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.condition_expression_hash_id") + private Long conditionExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.then_part_hash_id") + private Long thenPartHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.else_part_hash_id") + private Long elsePartHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + public ConditionalExpression(Long elementHashId, Long conditionExpressionHashId, Long thenPartHashId, Long elsePartHashId) { + this.elementHashId = elementHashId; + this.conditionExpressionHashId = conditionExpressionHashId; + this.thenPartHashId = thenPartHashId; + this.elsePartHashId = elsePartHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + public ConditionalExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.condition_expression_hash_id") + public Long getConditionExpressionHashId() { + return conditionExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.condition_expression_hash_id") + public void setConditionExpressionHashId(Long conditionExpressionHashId) { + this.conditionExpressionHashId = conditionExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.then_part_hash_id") + public Long getThenPartHashId() { + return thenPartHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.then_part_hash_id") + public void setThenPartHashId(Long thenPartHashId) { + this.thenPartHashId = thenPartHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.else_part_hash_id") + public Long getElsePartHashId() { + return elsePartHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.else_part_hash_id") + public void setElsePartHashId(Long elsePartHashId) { + this.elsePartHashId = elsePartHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ConditionalExpression other = (ConditionalExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getConditionExpressionHashId() == null ? other.getConditionExpressionHashId() == null : this.getConditionExpressionHashId().equals(other.getConditionExpressionHashId())) + && (this.getThenPartHashId() == null ? other.getThenPartHashId() == null : this.getThenPartHashId().equals(other.getThenPartHashId())) + && (this.getElsePartHashId() == null ? other.getElsePartHashId() == null : this.getElsePartHashId().equals(other.getElsePartHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getConditionExpressionHashId() == null) ? 0 : getConditionExpressionHashId().hashCode()); + result = prime * result + ((getThenPartHashId() == null) ? 0 : getThenPartHashId().hashCode()); + result = prime * result + ((getElsePartHashId() == null) ? 0 : getElsePartHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", conditionExpressionHashId=").append(conditionExpressionHashId); + sb.append(", thenPartHashId=").append(thenPartHashId); + sb.append(", elsePartHashId=").append(elsePartHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Constructor.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Constructor.java new file mode 100644 index 00000000..47efe19f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Constructor.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Constructor implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.signature") + private String signature; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.definition_body") + private String definitionBody; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + public Constructor(Long elementHashId, String name, String signature, Long parentHashId, Long locationHashId, String definitionBody) { + this.elementHashId = elementHashId; + this.name = name; + this.signature = signature; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.definitionBody = definitionBody; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + public Constructor() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.signature") + public String getSignature() { + return signature; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.signature") + public void setSignature(String signature) { + this.signature = signature == null ? null : signature.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.definition_body") + public String getDefinitionBody() { + return definitionBody; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.definition_body") + public void setDefinitionBody(String definitionBody) { + this.definitionBody = definitionBody == null ? null : definitionBody.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Constructor other = (Constructor) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getSignature() == null ? other.getSignature() == null : this.getSignature().equals(other.getSignature())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDefinitionBody() == null ? other.getDefinitionBody() == null : this.getDefinitionBody().equals(other.getDefinitionBody())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getSignature() == null) ? 0 : getSignature().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDefinitionBody() == null) ? 0 : getDefinitionBody().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", signature=").append(signature); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", definitionBody=").append(definitionBody); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConstructorInvocation.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConstructorInvocation.java new file mode 100644 index 00000000..7ea43ec8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ConstructorInvocation.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ConstructorInvocation implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.class_reference_hash_id") + private Long classReferenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + public ConstructorInvocation(Long elementHashId, Long classReferenceHashId) { + this.elementHashId = elementHashId; + this.classReferenceHashId = classReferenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + public ConstructorInvocation() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.class_reference_hash_id") + public Long getClassReferenceHashId() { + return classReferenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.class_reference_hash_id") + public void setClassReferenceHashId(Long classReferenceHashId) { + this.classReferenceHashId = classReferenceHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ConstructorInvocation other = (ConstructorInvocation) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getClassReferenceHashId() == null ? other.getClassReferenceHashId() == null : this.getClassReferenceHashId().equals(other.getClassReferenceHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getClassReferenceHashId() == null) ? 0 : getClassReferenceHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", classReferenceHashId=").append(classReferenceHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContainerParent.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContainerParent.java new file mode 100644 index 00000000..14a02d91 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContainerParent.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ContainerParent implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.child_hash_id") + private Long childHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + public ContainerParent(Long childHashId, Long parentHashId) { + this.childHashId = childHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + public ContainerParent() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.child_hash_id") + public Long getChildHashId() { + return childHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.child_hash_id") + public void setChildHashId(Long childHashId) { + this.childHashId = childHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ContainerParent other = (ContainerParent) that; + return (this.getChildHashId() == null ? other.getChildHashId() == null : this.getChildHashId().equals(other.getChildHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getChildHashId() == null) ? 0 : getChildHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", childHashId=").append(childHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContinueStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContinueStatement.java new file mode 100644 index 00000000..7d26d229 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ContinueStatement.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ContinueStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.continued_statement_hash_id") + private Long continuedStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + public ContinueStatement(Long elementHashId, Long continuedStatementHashId) { + this.elementHashId = elementHashId; + this.continuedStatementHashId = continuedStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + public ContinueStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.continued_statement_hash_id") + public Long getContinuedStatementHashId() { + return continuedStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.continued_statement_hash_id") + public void setContinuedStatementHashId(Long continuedStatementHashId) { + this.continuedStatementHashId = continuedStatementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ContinueStatement other = (ContinueStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getContinuedStatementHashId() == null ? other.getContinuedStatementHashId() == null : this.getContinuedStatementHashId().equals(other.getContinuedStatementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getContinuedStatementHashId() == null) ? 0 : getContinuedStatementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", continuedStatementHashId=").append(continuedStatementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Cupackage.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Cupackage.java new file mode 100644 index 00000000..e12ecd60 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Cupackage.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Cupackage implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.file_hash_id") + private Long fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.package_hash_id") + private Long packageHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + public Cupackage(Long fileHashId, Long packageHashId) { + this.fileHashId = fileHashId; + this.packageHashId = packageHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + public Cupackage() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.file_hash_id") + public Long getFileHashId() { + return fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.file_hash_id") + public void setFileHashId(Long fileHashId) { + this.fileHashId = fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.package_hash_id") + public Long getPackageHashId() { + return packageHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.package_hash_id") + public void setPackageHashId(Long packageHashId) { + this.packageHashId = packageHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Cupackage other = (Cupackage) that; + return (this.getFileHashId() == null ? other.getFileHashId() == null : this.getFileHashId().equals(other.getFileHashId())) + && (this.getPackageHashId() == null ? other.getPackageHashId() == null : this.getPackageHashId().equals(other.getPackageHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getFileHashId() == null) ? 0 : getFileHashId().hashCode()); + result = prime * result + ((getPackageHashId() == null) ? 0 : getPackageHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", fileHashId=").append(fileHashId); + sb.append(", packageHashId=").append(packageHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DeclarationElement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DeclarationElement.java new file mode 100644 index 00000000..0b0a9a87 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DeclarationElement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class DeclarationElement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.declaration_statement_hash_id") + private Long declarationStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + public DeclarationElement(Long elementHashId, Integer indexOrder, Long declarationStatementHashId) { + this.elementHashId = elementHashId; + this.indexOrder = indexOrder; + this.declarationStatementHashId = declarationStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + public DeclarationElement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.declaration_statement_hash_id") + public Long getDeclarationStatementHashId() { + return declarationStatementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.declaration_statement_hash_id") + public void setDeclarationStatementHashId(Long declarationStatementHashId) { + this.declarationStatementHashId = declarationStatementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DeclarationElement other = (DeclarationElement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getDeclarationStatementHashId() == null ? other.getDeclarationStatementHashId() == null : this.getDeclarationStatementHashId().equals(other.getDeclarationStatementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getDeclarationStatementHashId() == null) ? 0 : getDeclarationStatementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", declarationStatementHashId=").append(declarationStatementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoWhileStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoWhileStatement.java new file mode 100644 index 00000000..2613129b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoWhileStatement.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class DoWhileStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.keyword") + private String keyword; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.condition_hash_id") + private Long conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.body_declaration_hash_id") + private Long bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + public DoWhileStatement(Long elementHashId, String keyword, Long conditionHashId, Long bodyDeclarationHashId) { + this.elementHashId = elementHashId; + this.keyword = keyword; + this.conditionHashId = conditionHashId; + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + public DoWhileStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.keyword") + public String getKeyword() { + return keyword; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.keyword") + public void setKeyword(String keyword) { + this.keyword = keyword == null ? null : keyword.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.condition_hash_id") + public Long getConditionHashId() { + return conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.condition_hash_id") + public void setConditionHashId(Long conditionHashId) { + this.conditionHashId = conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.body_declaration_hash_id") + public Long getBodyDeclarationHashId() { + return bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.body_declaration_hash_id") + public void setBodyDeclarationHashId(Long bodyDeclarationHashId) { + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DoWhileStatement other = (DoWhileStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getKeyword() == null ? other.getKeyword() == null : this.getKeyword().equals(other.getKeyword())) + && (this.getConditionHashId() == null ? other.getConditionHashId() == null : this.getConditionHashId().equals(other.getConditionHashId())) + && (this.getBodyDeclarationHashId() == null ? other.getBodyDeclarationHashId() == null : this.getBodyDeclarationHashId().equals(other.getBodyDeclarationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getKeyword() == null) ? 0 : getKeyword().hashCode()); + result = prime * result + ((getConditionHashId() == null) ? 0 : getConditionHashId().hashCode()); + result = prime * result + ((getBodyDeclarationHashId() == null) ? 0 : getBodyDeclarationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", keyword=").append(keyword); + sb.append(", conditionHashId=").append(conditionHashId); + sb.append(", bodyDeclarationHashId=").append(bodyDeclarationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoubleLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoubleLiteral.java new file mode 100644 index 00000000..7138376e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/DoubleLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class DoubleLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + public DoubleLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + public DoubleLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DoubleLiteral other = (DoubleLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Element.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Element.java new file mode 100644 index 00000000..f4268f9b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Element.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Element implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.type") + private String type; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_id") + private Long parentId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_type") + private String parentType; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + public Element(Long elementHashId, String type, Long parentId, String parentType) { + this.elementHashId = elementHashId; + this.type = type; + this.parentId = parentId; + this.parentType = parentType; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + public Element() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.type") + public String getType() { + return type; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.type") + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_id") + public Long getParentId() { + return parentId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_id") + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_type") + public String getParentType() { + return parentType; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_type") + public void setParentType(String parentType) { + this.parentType = parentType == null ? null : parentType.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Element other = (Element) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) + && (this.getParentType() == null ? other.getParentType() == null : this.getParentType().equals(other.getParentType())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); + result = prime * result + ((getParentType() == null) ? 0 : getParentType().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", type=").append(type); + sb.append(", parentId=").append(parentId); + sb.append(", parentType=").append(parentType); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyReferenceParameterList.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyReferenceParameterList.java new file mode 100644 index 00000000..8d5cefc2 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyReferenceParameterList.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class EmptyReferenceParameterList implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.list_hash_id") + private Long listHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + public EmptyReferenceParameterList(Long listHashId, Long parentHashId, String debugMessage, Long locationHashId) { + this.listHashId = listHashId; + this.parentHashId = parentHashId; + this.debugMessage = debugMessage; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + public EmptyReferenceParameterList() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.list_hash_id") + public Long getListHashId() { + return listHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.list_hash_id") + public void setListHashId(Long listHashId) { + this.listHashId = listHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + EmptyReferenceParameterList other = (EmptyReferenceParameterList) that; + return (this.getListHashId() == null ? other.getListHashId() == null : this.getListHashId().equals(other.getListHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getListHashId() == null) ? 0 : getListHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", listHashId=").append(listHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyStatement.java new file mode 100644 index 00000000..3b2a83c1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EmptyStatement.java @@ -0,0 +1,70 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class EmptyStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + public EmptyStatement(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + public EmptyStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + EmptyStatement other = (EmptyStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EnumConstant.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EnumConstant.java new file mode 100644 index 00000000..e98c6ac7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/EnumConstant.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class EnumConstant implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + public EnumConstant(Long elementHashId, String name, Long parentHashId, Long locationHashId, String debugMessage) { + this.elementHashId = elementHashId; + this.name = name; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + public EnumConstant() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + EnumConstant other = (EnumConstant) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Exception.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Exception.java new file mode 100644 index 00000000..fad7b732 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Exception.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Exception implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.callable_hash_id") + private Long callableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + public Exception(Long elementHashId, Long typeHashId, Long callableHashId, String name) { + this.elementHashId = elementHashId; + this.typeHashId = typeHashId; + this.callableHashId = callableHashId; + this.name = name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + public Exception() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.callable_hash_id") + public Long getCallableHashId() { + return callableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.callable_hash_id") + public void setCallableHashId(Long callableHashId) { + this.callableHashId = callableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Exception other = (Exception) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())) + && (this.getCallableHashId() == null ? other.getCallableHashId() == null : this.getCallableHashId().equals(other.getCallableHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + result = prime * result + ((getCallableHashId() == null) ? 0 : getCallableHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", callableHashId=").append(callableHashId); + sb.append(", name=").append(name); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Expression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Expression.java new file mode 100644 index 00000000..d94a0b17 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Expression.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Expression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + public Expression(Long elementHashId, String name, Long parentHashId, Integer indexOrder, Long locationHashId, String debugMessage) { + this.elementHashId = elementHashId; + this.name = name; + this.parentHashId = parentHashId; + this.indexOrder = indexOrder; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + public Expression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Expression other = (Expression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionList.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionList.java new file mode 100644 index 00000000..1f61f28d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionList.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ExpressionList implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.size") + private Integer size; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + public ExpressionList(Long elementHashId, Long parentHashId, Long locationHashId, String debugMessage, Integer size) { + this.elementHashId = elementHashId; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + this.size = size; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + public ExpressionList() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.size") + public Integer getSize() { + return size; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.size") + public void setSize(Integer size) { + this.size = size; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ExpressionList other = (ExpressionList) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", size=").append(size); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionListExpressionRelation.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionListExpressionRelation.java new file mode 100644 index 00000000..e07c15d1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionListExpressionRelation.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ExpressionListExpressionRelation implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_list_hash_id") + private Long expressionListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_hash_id") + private Long expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.position") + private Integer position; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + public ExpressionListExpressionRelation(Long expressionListHashId, Long expressionHashId, Integer position) { + this.expressionListHashId = expressionListHashId; + this.expressionHashId = expressionHashId; + this.position = position; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + public ExpressionListExpressionRelation() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_list_hash_id") + public Long getExpressionListHashId() { + return expressionListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_list_hash_id") + public void setExpressionListHashId(Long expressionListHashId) { + this.expressionListHashId = expressionListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_hash_id") + public Long getExpressionHashId() { + return expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_hash_id") + public void setExpressionHashId(Long expressionHashId) { + this.expressionHashId = expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.position") + public Integer getPosition() { + return position; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.position") + public void setPosition(Integer position) { + this.position = position; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ExpressionListExpressionRelation other = (ExpressionListExpressionRelation) that; + return (this.getExpressionListHashId() == null ? other.getExpressionListHashId() == null : this.getExpressionListHashId().equals(other.getExpressionListHashId())) + && (this.getExpressionHashId() == null ? other.getExpressionHashId() == null : this.getExpressionHashId().equals(other.getExpressionHashId())) + && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getExpressionListHashId() == null) ? 0 : getExpressionListHashId().hashCode()); + result = prime * result + ((getExpressionHashId() == null) ? 0 : getExpressionHashId().hashCode()); + result = prime * result + ((getPosition() == null) ? 0 : getPosition().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", expressionListHashId=").append(expressionListHashId); + sb.append(", expressionHashId=").append(expressionHashId); + sb.append(", position=").append(position); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionStatement.java new file mode 100644 index 00000000..92d5bb84 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ExpressionStatement.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ExpressionStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.expression_hash_id") + private Long expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + public ExpressionStatement(Long elementHashId, Long expressionHashId) { + this.elementHashId = elementHashId; + this.expressionHashId = expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + public ExpressionStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.expression_hash_id") + public Long getExpressionHashId() { + return expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.expression_hash_id") + public void setExpressionHashId(Long expressionHashId) { + this.expressionHashId = expressionHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ExpressionStatement other = (ExpressionStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getExpressionHashId() == null ? other.getExpressionHashId() == null : this.getExpressionHashId().equals(other.getExpressionHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getExpressionHashId() == null) ? 0 : getExpressionHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", expressionHashId=").append(expressionHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Field.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Field.java new file mode 100644 index 00000000..dbf0f589 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Field.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Field implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + public Field(Long elementHashId, String name, Long parentHashId, String debugMessage, Long locationHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.parentHashId = parentHashId; + this.debugMessage = debugMessage; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + public Field() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Field other = (Field) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/File.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/File.java new file mode 100644 index 00000000..30926ef3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/File.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class File implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.extension") + private String extension; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.number_of_lines_hash_id") + private Long numberOfLinesHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + public File(Long elementHashId, String qualifiedName, String extension, String name, Long numberOfLinesHashId) { + this.elementHashId = elementHashId; + this.qualifiedName = qualifiedName; + this.extension = extension; + this.name = name; + this.numberOfLinesHashId = numberOfLinesHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + public File() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.extension") + public String getExtension() { + return extension; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.extension") + public void setExtension(String extension) { + this.extension = extension == null ? null : extension.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.number_of_lines_hash_id") + public Long getNumberOfLinesHashId() { + return numberOfLinesHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.number_of_lines_hash_id") + public void setNumberOfLinesHashId(Long numberOfLinesHashId) { + this.numberOfLinesHashId = numberOfLinesHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + File other = (File) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getExtension() == null ? other.getExtension() == null : this.getExtension().equals(other.getExtension())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getNumberOfLinesHashId() == null ? other.getNumberOfLinesHashId() == null : this.getNumberOfLinesHashId().equals(other.getNumberOfLinesHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getExtension() == null) ? 0 : getExtension().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getNumberOfLinesHashId() == null) ? 0 : getNumberOfLinesHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", extension=").append(extension); + sb.append(", name=").append(name); + sb.append(", numberOfLinesHashId=").append(numberOfLinesHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileMd5Sum.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileMd5Sum.java new file mode 100644 index 00000000..f05223cc --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileMd5Sum.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class FileMd5Sum implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.file_hash_id") + private Long fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + public FileMd5Sum(Long fileHashId, String value) { + this.fileHashId = fileHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + public FileMd5Sum() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.file_hash_id") + public Long getFileHashId() { + return fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.file_hash_id") + public void setFileHashId(Long fileHashId) { + this.fileHashId = fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + FileMd5Sum other = (FileMd5Sum) that; + return (this.getFileHashId() == null ? other.getFileHashId() == null : this.getFileHashId().equals(other.getFileHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getFileHashId() == null) ? 0 : getFileHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", fileHashId=").append(fileHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileSha256Sum.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileSha256Sum.java new file mode 100644 index 00000000..a0e0c775 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FileSha256Sum.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class FileSha256Sum implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.file_hash_id") + private Long fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + public FileSha256Sum(Long fileHashId, String value) { + this.fileHashId = fileHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + public FileSha256Sum() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.file_hash_id") + public Long getFileHashId() { + return fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.file_hash_id") + public void setFileHashId(Long fileHashId) { + this.fileHashId = fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + FileSha256Sum other = (FileSha256Sum) that; + return (this.getFileHashId() == null ? other.getFileHashId() == null : this.getFileHashId().equals(other.getFileHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getFileHashId() == null) ? 0 : getFileHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", fileHashId=").append(fileHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FloatingPointLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FloatingPointLiteral.java new file mode 100644 index 00000000..aa01bd6b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/FloatingPointLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class FloatingPointLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + public FloatingPointLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + public FloatingPointLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + FloatingPointLiteral other = (FloatingPointLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Folder.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Folder.java new file mode 100644 index 00000000..b787ba9a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Folder.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Folder implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + public Folder(Long elementHashId, String qualifiedName, String name, Long parentHashId) { + this.elementHashId = elementHashId; + this.qualifiedName = qualifiedName; + this.name = name; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + public Folder() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Folder other = (Folder) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForStatement.java new file mode 100644 index 00000000..99682186 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForStatement.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ForStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.initialization_hash_id") + private Long initializationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.condition_hash_id") + private Long conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.update_hash_id") + private Long updateHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.body_hash_id") + private Long bodyHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + public ForStatement(Long elementHashId, Long initializationHashId, Long conditionHashId, Long updateHashId, Long bodyHashId) { + this.elementHashId = elementHashId; + this.initializationHashId = initializationHashId; + this.conditionHashId = conditionHashId; + this.updateHashId = updateHashId; + this.bodyHashId = bodyHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + public ForStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.initialization_hash_id") + public Long getInitializationHashId() { + return initializationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.initialization_hash_id") + public void setInitializationHashId(Long initializationHashId) { + this.initializationHashId = initializationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.condition_hash_id") + public Long getConditionHashId() { + return conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.condition_hash_id") + public void setConditionHashId(Long conditionHashId) { + this.conditionHashId = conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.update_hash_id") + public Long getUpdateHashId() { + return updateHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.update_hash_id") + public void setUpdateHashId(Long updateHashId) { + this.updateHashId = updateHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.body_hash_id") + public Long getBodyHashId() { + return bodyHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.body_hash_id") + public void setBodyHashId(Long bodyHashId) { + this.bodyHashId = bodyHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ForStatement other = (ForStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getInitializationHashId() == null ? other.getInitializationHashId() == null : this.getInitializationHashId().equals(other.getInitializationHashId())) + && (this.getConditionHashId() == null ? other.getConditionHashId() == null : this.getConditionHashId().equals(other.getConditionHashId())) + && (this.getUpdateHashId() == null ? other.getUpdateHashId() == null : this.getUpdateHashId().equals(other.getUpdateHashId())) + && (this.getBodyHashId() == null ? other.getBodyHashId() == null : this.getBodyHashId().equals(other.getBodyHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getInitializationHashId() == null) ? 0 : getInitializationHashId().hashCode()); + result = prime * result + ((getConditionHashId() == null) ? 0 : getConditionHashId().hashCode()); + result = prime * result + ((getUpdateHashId() == null) ? 0 : getUpdateHashId().hashCode()); + result = prime * result + ((getBodyHashId() == null) ? 0 : getBodyHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", initializationHashId=").append(initializationHashId); + sb.append(", conditionHashId=").append(conditionHashId); + sb.append(", updateHashId=").append(updateHashId); + sb.append(", bodyHashId=").append(bodyHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForeachStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForeachStatement.java new file mode 100644 index 00000000..eaed2786 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ForeachStatement.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ForeachStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iterated_value_hash_id") + private Long iteratedValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iteration_parameter_hash_id") + private Long iterationParameterHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.body_hash_id") + private Long bodyHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + public ForeachStatement(Long elementHashId, Long iteratedValueHashId, Long iterationParameterHashId, Long bodyHashId) { + this.elementHashId = elementHashId; + this.iteratedValueHashId = iteratedValueHashId; + this.iterationParameterHashId = iterationParameterHashId; + this.bodyHashId = bodyHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + public ForeachStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iterated_value_hash_id") + public Long getIteratedValueHashId() { + return iteratedValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iterated_value_hash_id") + public void setIteratedValueHashId(Long iteratedValueHashId) { + this.iteratedValueHashId = iteratedValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iteration_parameter_hash_id") + public Long getIterationParameterHashId() { + return iterationParameterHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iteration_parameter_hash_id") + public void setIterationParameterHashId(Long iterationParameterHashId) { + this.iterationParameterHashId = iterationParameterHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.body_hash_id") + public Long getBodyHashId() { + return bodyHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.body_hash_id") + public void setBodyHashId(Long bodyHashId) { + this.bodyHashId = bodyHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ForeachStatement other = (ForeachStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getIteratedValueHashId() == null ? other.getIteratedValueHashId() == null : this.getIteratedValueHashId().equals(other.getIteratedValueHashId())) + && (this.getIterationParameterHashId() == null ? other.getIterationParameterHashId() == null : this.getIterationParameterHashId().equals(other.getIterationParameterHashId())) + && (this.getBodyHashId() == null ? other.getBodyHashId() == null : this.getBodyHashId().equals(other.getBodyHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getIteratedValueHashId() == null) ? 0 : getIteratedValueHashId().hashCode()); + result = prime * result + ((getIterationParameterHashId() == null) ? 0 : getIterationParameterHashId().hashCode()); + result = prime * result + ((getBodyHashId() == null) ? 0 : getBodyHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", iteratedValueHashId=").append(iteratedValueHashId); + sb.append(", iterationParameterHashId=").append(iterationParameterHashId); + sb.append(", bodyHashId=").append(bodyHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Identifier.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Identifier.java new file mode 100644 index 00000000..fa75f329 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Identifier.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Identifier implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + public Identifier(Long elementHashId, Long locationHashId, String name, Long parentHashId) { + this.elementHashId = elementHashId; + this.locationHashId = locationHashId; + this.name = name; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + public Identifier() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Identifier other = (Identifier) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithElse.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithElse.java new file mode 100644 index 00000000..da6c8b02 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithElse.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class IfStatementWithElse implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.condition_hash_id") + private Long conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.consequent_hash_id") + private Long consequentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.alternate_hash_id") + private Long alternateHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + public IfStatementWithElse(Long elementHashId, Long conditionHashId, Long consequentHashId, Long alternateHashId) { + this.elementHashId = elementHashId; + this.conditionHashId = conditionHashId; + this.consequentHashId = consequentHashId; + this.alternateHashId = alternateHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + public IfStatementWithElse() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.condition_hash_id") + public Long getConditionHashId() { + return conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.condition_hash_id") + public void setConditionHashId(Long conditionHashId) { + this.conditionHashId = conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.consequent_hash_id") + public Long getConsequentHashId() { + return consequentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.consequent_hash_id") + public void setConsequentHashId(Long consequentHashId) { + this.consequentHashId = consequentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.alternate_hash_id") + public Long getAlternateHashId() { + return alternateHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.alternate_hash_id") + public void setAlternateHashId(Long alternateHashId) { + this.alternateHashId = alternateHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + IfStatementWithElse other = (IfStatementWithElse) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getConditionHashId() == null ? other.getConditionHashId() == null : this.getConditionHashId().equals(other.getConditionHashId())) + && (this.getConsequentHashId() == null ? other.getConsequentHashId() == null : this.getConsequentHashId().equals(other.getConsequentHashId())) + && (this.getAlternateHashId() == null ? other.getAlternateHashId() == null : this.getAlternateHashId().equals(other.getAlternateHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getConditionHashId() == null) ? 0 : getConditionHashId().hashCode()); + result = prime * result + ((getConsequentHashId() == null) ? 0 : getConsequentHashId().hashCode()); + result = prime * result + ((getAlternateHashId() == null) ? 0 : getAlternateHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", conditionHashId=").append(conditionHashId); + sb.append(", consequentHashId=").append(consequentHashId); + sb.append(", alternateHashId=").append(alternateHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithoutElse.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithoutElse.java new file mode 100644 index 00000000..9ccc09aa --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IfStatementWithoutElse.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class IfStatementWithoutElse implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.condition_hash_id") + private Long conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.consequent_hash_id") + private Long consequentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + public IfStatementWithoutElse(Long elementHashId, Long conditionHashId, Long consequentHashId) { + this.elementHashId = elementHashId; + this.conditionHashId = conditionHashId; + this.consequentHashId = consequentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + public IfStatementWithoutElse() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.condition_hash_id") + public Long getConditionHashId() { + return conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.condition_hash_id") + public void setConditionHashId(Long conditionHashId) { + this.conditionHashId = conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.consequent_hash_id") + public Long getConsequentHashId() { + return consequentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.consequent_hash_id") + public void setConsequentHashId(Long consequentHashId) { + this.consequentHashId = consequentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + IfStatementWithoutElse other = (IfStatementWithoutElse) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getConditionHashId() == null ? other.getConditionHashId() == null : this.getConditionHashId().equals(other.getConditionHashId())) + && (this.getConsequentHashId() == null ? other.getConsequentHashId() == null : this.getConsequentHashId().equals(other.getConsequentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getConditionHashId() == null) ? 0 : getConditionHashId().hashCode()); + result = prime * result + ((getConsequentHashId() == null) ? 0 : getConsequentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", conditionHashId=").append(conditionHashId); + sb.append(", consequentHashId=").append(consequentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportInfo.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportInfo.java new file mode 100644 index 00000000..27f3c523 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportInfo.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ImportInfo implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.reference_hash_id") + private Long referenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.is_foreign_import") + private Integer isForeignImport; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + public ImportInfo(Long elementHashId, Long referenceHashId, String name, Long parentHashId, Long locationHashId, Integer isForeignImport) { + this.elementHashId = elementHashId; + this.referenceHashId = referenceHashId; + this.name = name; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.isForeignImport = isForeignImport; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + public ImportInfo() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.reference_hash_id") + public Long getReferenceHashId() { + return referenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.reference_hash_id") + public void setReferenceHashId(Long referenceHashId) { + this.referenceHashId = referenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.is_foreign_import") + public Integer getIsForeignImport() { + return isForeignImport; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.is_foreign_import") + public void setIsForeignImport(Integer isForeignImport) { + this.isForeignImport = isForeignImport; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ImportInfo other = (ImportInfo) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getReferenceHashId() == null ? other.getReferenceHashId() == null : this.getReferenceHashId().equals(other.getReferenceHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getIsForeignImport() == null ? other.getIsForeignImport() == null : this.getIsForeignImport().equals(other.getIsForeignImport())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getReferenceHashId() == null) ? 0 : getReferenceHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getIsForeignImport() == null) ? 0 : getIsForeignImport().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", referenceHashId=").append(referenceHashId); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", isForeignImport=").append(isForeignImport); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticReferenceElement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticReferenceElement.java new file mode 100644 index 00000000..bb2b070e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticReferenceElement.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ImportStaticReferenceElement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + public ImportStaticReferenceElement(Long elementHashId, String debugMessage, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + public ImportStaticReferenceElement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ImportStaticReferenceElement other = (ImportStaticReferenceElement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticStatement.java new file mode 100644 index 00000000..37f47723 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ImportStaticStatement.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ImportStaticStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.reference_hash_id") + private Long referenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + public ImportStaticStatement(Long elementHashId, Long referenceHashId, String name, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.referenceHashId = referenceHashId; + this.name = name; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + public ImportStaticStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.reference_hash_id") + public Long getReferenceHashId() { + return referenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.reference_hash_id") + public void setReferenceHashId(Long referenceHashId) { + this.referenceHashId = referenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ImportStaticStatement other = (ImportStaticStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getReferenceHashId() == null ? other.getReferenceHashId() == null : this.getReferenceHashId().equals(other.getReferenceHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getReferenceHashId() == null) ? 0 : getReferenceHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", referenceHashId=").append(referenceHashId); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InstanceofExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InstanceofExpression.java new file mode 100644 index 00000000..d09e65d8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InstanceofExpression.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class InstanceofExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.operand_hash_id") + private Long operandHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.check_type_hash_id") + private Long checkTypeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.pattern_hash_id") + private Long patternHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + public InstanceofExpression(Long elementHashId, Long operandHashId, Long checkTypeHashId, Long patternHashId) { + this.elementHashId = elementHashId; + this.operandHashId = operandHashId; + this.checkTypeHashId = checkTypeHashId; + this.patternHashId = patternHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + public InstanceofExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.operand_hash_id") + public Long getOperandHashId() { + return operandHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.operand_hash_id") + public void setOperandHashId(Long operandHashId) { + this.operandHashId = operandHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.check_type_hash_id") + public Long getCheckTypeHashId() { + return checkTypeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.check_type_hash_id") + public void setCheckTypeHashId(Long checkTypeHashId) { + this.checkTypeHashId = checkTypeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.pattern_hash_id") + public Long getPatternHashId() { + return patternHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.pattern_hash_id") + public void setPatternHashId(Long patternHashId) { + this.patternHashId = patternHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + InstanceofExpression other = (InstanceofExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getOperandHashId() == null ? other.getOperandHashId() == null : this.getOperandHashId().equals(other.getOperandHashId())) + && (this.getCheckTypeHashId() == null ? other.getCheckTypeHashId() == null : this.getCheckTypeHashId().equals(other.getCheckTypeHashId())) + && (this.getPatternHashId() == null ? other.getPatternHashId() == null : this.getPatternHashId().equals(other.getPatternHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getOperandHashId() == null) ? 0 : getOperandHashId().hashCode()); + result = prime * result + ((getCheckTypeHashId() == null) ? 0 : getCheckTypeHashId().hashCode()); + result = prime * result + ((getPatternHashId() == null) ? 0 : getPatternHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", operandHashId=").append(operandHashId); + sb.append(", checkTypeHashId=").append(checkTypeHashId); + sb.append(", patternHashId=").append(patternHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IntegerLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IntegerLiteral.java new file mode 100644 index 00000000..3c2d3290 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/IntegerLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class IntegerLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + public IntegerLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + public IntegerLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + IntegerLiteral other = (IntegerLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InterfaceInfo.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InterfaceInfo.java new file mode 100644 index 00000000..968c2f1c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/InterfaceInfo.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class InterfaceInfo implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.identifier_hash_id") + private Long identifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + public InterfaceInfo(Long elementHashId, String qualifiedName, Long identifierHashId, Long locationHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.qualifiedName = qualifiedName; + this.identifierHashId = identifierHashId; + this.locationHashId = locationHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + public InterfaceInfo() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.identifier_hash_id") + public Long getIdentifierHashId() { + return identifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.identifier_hash_id") + public void setIdentifierHashId(Long identifierHashId) { + this.identifierHashId = identifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + InterfaceInfo other = (InterfaceInfo) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getIdentifierHashId() == null ? other.getIdentifierHashId() == null : this.getIdentifierHashId().equals(other.getIdentifierHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getIdentifierHashId() == null) ? 0 : getIdentifierHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", identifierHashId=").append(identifierHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocComment.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocComment.java new file mode 100644 index 00000000..8e4cbb8b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocComment.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class JavadocComment implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.documentable_hash_id") + private Long documentableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.text") + private String text; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + public JavadocComment(Long elementHashId, Long documentableHashId, String text, Long locationHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.documentableHashId = documentableHashId; + this.text = text; + this.locationHashId = locationHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + public JavadocComment() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.documentable_hash_id") + public Long getDocumentableHashId() { + return documentableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.documentable_hash_id") + public void setDocumentableHashId(Long documentableHashId) { + this.documentableHashId = documentableHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.text") + public String getText() { + return text; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.text") + public void setText(String text) { + this.text = text == null ? null : text.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + JavadocComment other = (JavadocComment) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDocumentableHashId() == null ? other.getDocumentableHashId() == null : this.getDocumentableHashId().equals(other.getDocumentableHashId())) + && (this.getText() == null ? other.getText() == null : this.getText().equals(other.getText())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDocumentableHashId() == null) ? 0 : getDocumentableHashId().hashCode()); + result = prime * result + ((getText() == null) ? 0 : getText().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", documentableHashId=").append(documentableHashId); + sb.append(", text=").append(text); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocDataToken.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocDataToken.java new file mode 100644 index 00000000..a9364320 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocDataToken.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class JavadocDataToken implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + public JavadocDataToken(Long elementHashId, String value, Long parentHashId, Integer indexOrder, Long locationHashId) { + this.elementHashId = elementHashId; + this.value = value; + this.parentHashId = parentHashId; + this.indexOrder = indexOrder; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + public JavadocDataToken() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + JavadocDataToken other = (JavadocDataToken) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTag.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTag.java new file mode 100644 index 00000000..23655138 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTag.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class JavadocTag implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.containing_comment_hash_id") + private Long containingCommentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + public JavadocTag(Long elementHashId, String name, String value, Long containingCommentHashId, Integer indexOrder, Long locationHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.value = value; + this.containingCommentHashId = containingCommentHashId; + this.indexOrder = indexOrder; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + public JavadocTag() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.containing_comment_hash_id") + public Long getContainingCommentHashId() { + return containingCommentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.containing_comment_hash_id") + public void setContainingCommentHashId(Long containingCommentHashId) { + this.containingCommentHashId = containingCommentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + JavadocTag other = (JavadocTag) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())) + && (this.getContainingCommentHashId() == null ? other.getContainingCommentHashId() == null : this.getContainingCommentHashId().equals(other.getContainingCommentHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + result = prime * result + ((getContainingCommentHashId() == null) ? 0 : getContainingCommentHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", value=").append(value); + sb.append(", containingCommentHashId=").append(containingCommentHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTagValue.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTagValue.java new file mode 100644 index 00000000..35073b67 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/JavadocTagValue.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class JavadocTagValue implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + public JavadocTagValue(Long elementHashId, String value, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.value = value; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + public JavadocTagValue() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + JavadocTagValue other = (JavadocTagValue) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LabeledStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LabeledStatement.java new file mode 100644 index 00000000..67e6f2f3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LabeledStatement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class LabeledStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.labeled_hash_identifier_hash_id") + private Long labeledHashIdentifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.statement_hash_id") + private Long statementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + public LabeledStatement(Long elementHashId, Long labeledHashIdentifierHashId, Long statementHashId) { + this.elementHashId = elementHashId; + this.labeledHashIdentifierHashId = labeledHashIdentifierHashId; + this.statementHashId = statementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + public LabeledStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.labeled_hash_identifier_hash_id") + public Long getLabeledHashIdentifierHashId() { + return labeledHashIdentifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.labeled_hash_identifier_hash_id") + public void setLabeledHashIdentifierHashId(Long labeledHashIdentifierHashId) { + this.labeledHashIdentifierHashId = labeledHashIdentifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.statement_hash_id") + public Long getStatementHashId() { + return statementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.statement_hash_id") + public void setStatementHashId(Long statementHashId) { + this.statementHashId = statementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LabeledStatement other = (LabeledStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getLabeledHashIdentifierHashId() == null ? other.getLabeledHashIdentifierHashId() == null : this.getLabeledHashIdentifierHashId().equals(other.getLabeledHashIdentifierHashId())) + && (this.getStatementHashId() == null ? other.getStatementHashId() == null : this.getStatementHashId().equals(other.getStatementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getLabeledHashIdentifierHashId() == null) ? 0 : getLabeledHashIdentifierHashId().hashCode()); + result = prime * result + ((getStatementHashId() == null) ? 0 : getStatementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", labeledHashIdentifierHashId=").append(labeledHashIdentifierHashId); + sb.append(", statementHashId=").append(statementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LambdaExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LambdaExpression.java new file mode 100644 index 00000000..f58cca66 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LambdaExpression.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class LambdaExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.parameter_list_hash_id") + private Long parameterListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.body_hash_id") + private Long bodyHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_void_compatible") + private Integer isVoidCompatible; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_value_compatible") + private Integer isValueCompatible; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + public LambdaExpression(Long elementHashId, Long parameterListHashId, Long bodyHashId, Integer isVoidCompatible, Integer isValueCompatible) { + this.elementHashId = elementHashId; + this.parameterListHashId = parameterListHashId; + this.bodyHashId = bodyHashId; + this.isVoidCompatible = isVoidCompatible; + this.isValueCompatible = isValueCompatible; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + public LambdaExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.parameter_list_hash_id") + public Long getParameterListHashId() { + return parameterListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.parameter_list_hash_id") + public void setParameterListHashId(Long parameterListHashId) { + this.parameterListHashId = parameterListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.body_hash_id") + public Long getBodyHashId() { + return bodyHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.body_hash_id") + public void setBodyHashId(Long bodyHashId) { + this.bodyHashId = bodyHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_void_compatible") + public Integer getIsVoidCompatible() { + return isVoidCompatible; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_void_compatible") + public void setIsVoidCompatible(Integer isVoidCompatible) { + this.isVoidCompatible = isVoidCompatible; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_value_compatible") + public Integer getIsValueCompatible() { + return isValueCompatible; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_value_compatible") + public void setIsValueCompatible(Integer isValueCompatible) { + this.isValueCompatible = isValueCompatible; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LambdaExpression other = (LambdaExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getParameterListHashId() == null ? other.getParameterListHashId() == null : this.getParameterListHashId().equals(other.getParameterListHashId())) + && (this.getBodyHashId() == null ? other.getBodyHashId() == null : this.getBodyHashId().equals(other.getBodyHashId())) + && (this.getIsVoidCompatible() == null ? other.getIsVoidCompatible() == null : this.getIsVoidCompatible().equals(other.getIsVoidCompatible())) + && (this.getIsValueCompatible() == null ? other.getIsValueCompatible() == null : this.getIsValueCompatible().equals(other.getIsValueCompatible())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getParameterListHashId() == null) ? 0 : getParameterListHashId().hashCode()); + result = prime * result + ((getBodyHashId() == null) ? 0 : getBodyHashId().hashCode()); + result = prime * result + ((getIsVoidCompatible() == null) ? 0 : getIsVoidCompatible().hashCode()); + result = prime * result + ((getIsValueCompatible() == null) ? 0 : getIsValueCompatible().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", parameterListHashId=").append(parameterListHashId); + sb.append(", bodyHashId=").append(bodyHashId); + sb.append(", isVoidCompatible=").append(isVoidCompatible); + sb.append(", isValueCompatible=").append(isValueCompatible); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalClass.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalClass.java new file mode 100644 index 00000000..11864f06 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalClass.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class LocalClass implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + public LocalClass(Long elementHashId, String name, String debugMessage, Long locationHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.debugMessage = debugMessage; + this.locationHashId = locationHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + public LocalClass() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LocalClass other = (LocalClass) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalVariable.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalVariable.java new file mode 100644 index 00000000..db805537 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LocalVariable.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class LocalVariable implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + public LocalVariable(Long elementHashId, Long parentHashId, Long locationHashId, String debugMessage, String name, Integer indexOrder) { + this.elementHashId = elementHashId; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + this.name = name; + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + public LocalVariable() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LocalVariable other = (LocalVariable) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", name=").append(name); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Location.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Location.java new file mode 100644 index 00000000..cfa44e5e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Location.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Location implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.file_hash_id") + private Long fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_line_number") + private Integer startLineNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_column_number") + private Integer startColumnNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_line_number") + private Integer endLineNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_column_number") + private Integer endColumnNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + public Location(Long elementHashId, Long fileHashId, Integer startLineNumber, Integer startColumnNumber, Integer endLineNumber, Integer endColumnNumber) { + this.elementHashId = elementHashId; + this.fileHashId = fileHashId; + this.startLineNumber = startLineNumber; + this.startColumnNumber = startColumnNumber; + this.endLineNumber = endLineNumber; + this.endColumnNumber = endColumnNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + public Location() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.file_hash_id") + public Long getFileHashId() { + return fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.file_hash_id") + public void setFileHashId(Long fileHashId) { + this.fileHashId = fileHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_line_number") + public Integer getStartLineNumber() { + return startLineNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_line_number") + public void setStartLineNumber(Integer startLineNumber) { + this.startLineNumber = startLineNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_column_number") + public Integer getStartColumnNumber() { + return startColumnNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_column_number") + public void setStartColumnNumber(Integer startColumnNumber) { + this.startColumnNumber = startColumnNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_line_number") + public Integer getEndLineNumber() { + return endLineNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_line_number") + public void setEndLineNumber(Integer endLineNumber) { + this.endLineNumber = endLineNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_column_number") + public Integer getEndColumnNumber() { + return endColumnNumber; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_column_number") + public void setEndColumnNumber(Integer endColumnNumber) { + this.endColumnNumber = endColumnNumber; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Location other = (Location) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getFileHashId() == null ? other.getFileHashId() == null : this.getFileHashId().equals(other.getFileHashId())) + && (this.getStartLineNumber() == null ? other.getStartLineNumber() == null : this.getStartLineNumber().equals(other.getStartLineNumber())) + && (this.getStartColumnNumber() == null ? other.getStartColumnNumber() == null : this.getStartColumnNumber().equals(other.getStartColumnNumber())) + && (this.getEndLineNumber() == null ? other.getEndLineNumber() == null : this.getEndLineNumber().equals(other.getEndLineNumber())) + && (this.getEndColumnNumber() == null ? other.getEndColumnNumber() == null : this.getEndColumnNumber().equals(other.getEndColumnNumber())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getFileHashId() == null) ? 0 : getFileHashId().hashCode()); + result = prime * result + ((getStartLineNumber() == null) ? 0 : getStartLineNumber().hashCode()); + result = prime * result + ((getStartColumnNumber() == null) ? 0 : getStartColumnNumber().hashCode()); + result = prime * result + ((getEndLineNumber() == null) ? 0 : getEndLineNumber().hashCode()); + result = prime * result + ((getEndColumnNumber() == null) ? 0 : getEndColumnNumber().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", fileHashId=").append(fileHashId); + sb.append(", startLineNumber=").append(startLineNumber); + sb.append(", startColumnNumber=").append(startColumnNumber); + sb.append(", endLineNumber=").append(endLineNumber); + sb.append(", endColumnNumber=").append(endColumnNumber); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LongLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LongLiteral.java new file mode 100644 index 00000000..756eb7ce --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/LongLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class LongLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + public LongLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + public LongLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LongLiteral other = (LongLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Metainfo.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Metainfo.java new file mode 100644 index 00000000..d6b738ec --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Metainfo.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Metainfo implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.oid") + private Long oid; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.kind") + private String kind; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.program_hash_id") + private Long programHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + public Metainfo(Long oid, String kind, String value, Long programHashId) { + this.oid = oid; + this.kind = kind; + this.value = value; + this.programHashId = programHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + public Metainfo() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.oid") + public Long getOid() { + return oid; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.oid") + public void setOid(Long oid) { + this.oid = oid; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.kind") + public String getKind() { + return kind; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.kind") + public void setKind(String kind) { + this.kind = kind == null ? null : kind.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.program_hash_id") + public Long getProgramHashId() { + return programHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.program_hash_id") + public void setProgramHashId(Long programHashId) { + this.programHashId = programHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Metainfo other = (Metainfo) that; + return (this.getOid() == null ? other.getOid() == null : this.getOid().equals(other.getOid())) + && (this.getKind() == null ? other.getKind() == null : this.getKind().equals(other.getKind())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())) + && (this.getProgramHashId() == null ? other.getProgramHashId() == null : this.getProgramHashId().equals(other.getProgramHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getOid() == null) ? 0 : getOid().hashCode()); + result = prime * result + ((getKind() == null) ? 0 : getKind().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + result = prime * result + ((getProgramHashId() == null) ? 0 : getProgramHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", oid=").append(oid); + sb.append(", kind=").append(kind); + sb.append(", value=").append(value); + sb.append(", programHashId=").append(programHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Method.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Method.java new file mode 100644 index 00000000..bd1922fb --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Method.java @@ -0,0 +1,172 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Method implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.signature") + private String signature; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.definition_body") + private String definitionBody; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + public Method(Long elementHashId, String name, String signature, Long typeHashId, Long parentHashId, Long locationHashId, String definitionBody) { + this.elementHashId = elementHashId; + this.name = name; + this.signature = signature; + this.typeHashId = typeHashId; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.definitionBody = definitionBody; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + public Method() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.signature") + public String getSignature() { + return signature; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.signature") + public void setSignature(String signature) { + this.signature = signature == null ? null : signature.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.definition_body") + public String getDefinitionBody() { + return definitionBody; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.definition_body") + public void setDefinitionBody(String definitionBody) { + this.definitionBody = definitionBody == null ? null : definitionBody.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Method other = (Method) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getSignature() == null ? other.getSignature() == null : this.getSignature().equals(other.getSignature())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDefinitionBody() == null ? other.getDefinitionBody() == null : this.getDefinitionBody().equals(other.getDefinitionBody())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getSignature() == null) ? 0 : getSignature().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDefinitionBody() == null) ? 0 : getDefinitionBody().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", signature=").append(signature); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", definitionBody=").append(definitionBody); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithType.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithType.java new file mode 100644 index 00000000..35696d43 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithType.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class MethodAccessExpressionWithType implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.referen_method_hash_id") + private Long referenMethodHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.argument_list_hash_id") + private Long argumentListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + public MethodAccessExpressionWithType(Long elementHashId, Long typeHashId, Long referenMethodHashId, Long argumentListHashId) { + this.elementHashId = elementHashId; + this.typeHashId = typeHashId; + this.referenMethodHashId = referenMethodHashId; + this.argumentListHashId = argumentListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + public MethodAccessExpressionWithType() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.referen_method_hash_id") + public Long getReferenMethodHashId() { + return referenMethodHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.referen_method_hash_id") + public void setReferenMethodHashId(Long referenMethodHashId) { + this.referenMethodHashId = referenMethodHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.argument_list_hash_id") + public Long getArgumentListHashId() { + return argumentListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.argument_list_hash_id") + public void setArgumentListHashId(Long argumentListHashId) { + this.argumentListHashId = argumentListHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MethodAccessExpressionWithType other = (MethodAccessExpressionWithType) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())) + && (this.getReferenMethodHashId() == null ? other.getReferenMethodHashId() == null : this.getReferenMethodHashId().equals(other.getReferenMethodHashId())) + && (this.getArgumentListHashId() == null ? other.getArgumentListHashId() == null : this.getArgumentListHashId().equals(other.getArgumentListHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + result = prime * result + ((getReferenMethodHashId() == null) ? 0 : getReferenMethodHashId().hashCode()); + result = prime * result + ((getArgumentListHashId() == null) ? 0 : getArgumentListHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", referenMethodHashId=").append(referenMethodHashId); + sb.append(", argumentListHashId=").append(argumentListHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithoutType.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithoutType.java new file mode 100644 index 00000000..f46d9c1c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodAccessExpressionWithoutType.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class MethodAccessExpressionWithoutType implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.referen_method_hash_id") + private Long referenMethodHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.argument_list_hash_id") + private Long argumentListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + public MethodAccessExpressionWithoutType(Long elementHashId, Long referenMethodHashId, Long argumentListHashId) { + this.elementHashId = elementHashId; + this.referenMethodHashId = referenMethodHashId; + this.argumentListHashId = argumentListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + public MethodAccessExpressionWithoutType() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.referen_method_hash_id") + public Long getReferenMethodHashId() { + return referenMethodHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.referen_method_hash_id") + public void setReferenMethodHashId(Long referenMethodHashId) { + this.referenMethodHashId = referenMethodHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.argument_list_hash_id") + public Long getArgumentListHashId() { + return argumentListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.argument_list_hash_id") + public void setArgumentListHashId(Long argumentListHashId) { + this.argumentListHashId = argumentListHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MethodAccessExpressionWithoutType other = (MethodAccessExpressionWithoutType) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getReferenMethodHashId() == null ? other.getReferenMethodHashId() == null : this.getReferenMethodHashId().equals(other.getReferenMethodHashId())) + && (this.getArgumentListHashId() == null ? other.getArgumentListHashId() == null : this.getArgumentListHashId().equals(other.getArgumentListHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getReferenMethodHashId() == null) ? 0 : getReferenMethodHashId().hashCode()); + result = prime * result + ((getArgumentListHashId() == null) ? 0 : getArgumentListHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", referenMethodHashId=").append(referenMethodHashId); + sb.append(", argumentListHashId=").append(argumentListHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodReferenceExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodReferenceExpression.java new file mode 100644 index 00000000..3fde13f7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/MethodReferenceExpression.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class MethodReferenceExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.is_constructor") + private Integer isConstructor; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + public MethodReferenceExpression(Long elementHashId, Integer isConstructor) { + this.elementHashId = elementHashId; + this.isConstructor = isConstructor; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + public MethodReferenceExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.is_constructor") + public Integer getIsConstructor() { + return isConstructor; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.is_constructor") + public void setIsConstructor(Integer isConstructor) { + this.isConstructor = isConstructor; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MethodReferenceExpression other = (MethodReferenceExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getIsConstructor() == null ? other.getIsConstructor() == null : this.getIsConstructor().equals(other.getIsConstructor())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getIsConstructor() == null) ? 0 : getIsConstructor().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", isConstructor=").append(isConstructor); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Modifier.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Modifier.java new file mode 100644 index 00000000..bad06e5d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Modifier.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Modifier implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + public Modifier(Long elementHashId, String name, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + public Modifier() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Modifier other = (Modifier) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ModifierList.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ModifierList.java new file mode 100644 index 00000000..d442b2f4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ModifierList.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ModifierList implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + public ModifierList(Long elementHashId, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + public ModifierList() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ModifierList other = (ModifierList) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Module.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Module.java new file mode 100644 index 00000000..e0ef834a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Module.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Module implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + public Module(Long elementHashId, String name) { + this.elementHashId = elementHashId; + this.name = name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + public Module() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Module other = (Module) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NameString.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NameString.java new file mode 100644 index 00000000..1db7c8c4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NameString.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NameString implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.name_element_hash_id") + private Long nameElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.value_element_hash_id") + private Long valueElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + public NameString(Long parentHashId, Long nameElementHashId, Long valueElementHashId) { + this.parentHashId = parentHashId; + this.nameElementHashId = nameElementHashId; + this.valueElementHashId = valueElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + public NameString() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.name_element_hash_id") + public Long getNameElementHashId() { + return nameElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.name_element_hash_id") + public void setNameElementHashId(Long nameElementHashId) { + this.nameElementHashId = nameElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.value_element_hash_id") + public Long getValueElementHashId() { + return valueElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.value_element_hash_id") + public void setValueElementHashId(Long valueElementHashId) { + this.valueElementHashId = valueElementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NameString other = (NameString) that; + return (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getNameElementHashId() == null ? other.getNameElementHashId() == null : this.getNameElementHashId().equals(other.getNameElementHashId())) + && (this.getValueElementHashId() == null ? other.getValueElementHashId() == null : this.getValueElementHashId().equals(other.getValueElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getNameElementHashId() == null) ? 0 : getNameElementHashId().hashCode()); + result = prime * result + ((getValueElementHashId() == null) ? 0 : getValueElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", nameElementHashId=").append(nameElementHashId); + sb.append(", valueElementHashId=").append(valueElementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NewExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NewExpression.java new file mode 100644 index 00000000..70503363 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NewExpression.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NewExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.reference_hash_id") + private Long referenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + public NewExpression(Long elementHashId, Long referenceHashId, Long typeHashId) { + this.elementHashId = elementHashId; + this.referenceHashId = referenceHashId; + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + public NewExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.reference_hash_id") + public Long getReferenceHashId() { + return referenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.reference_hash_id") + public void setReferenceHashId(Long referenceHashId) { + this.referenceHashId = referenceHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NewExpression other = (NewExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getReferenceHashId() == null ? other.getReferenceHashId() == null : this.getReferenceHashId().equals(other.getReferenceHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getReferenceHashId() == null) ? 0 : getReferenceHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", referenceHashId=").append(referenceHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpClass.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpClass.java new file mode 100644 index 00000000..323b5d3b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpClass.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NpClass implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + public NpClass(Long elementHashId, String name, String qualifiedName, Long parentHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.qualifiedName = qualifiedName; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + public NpClass() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NpClass other = (NpClass) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpFile.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpFile.java new file mode 100644 index 00000000..45294267 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpFile.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NpFile implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.project_hash_id") + private Long projectHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + public NpFile(Long elementHashId, String qualifiedName, String name, Long projectHashId) { + this.elementHashId = elementHashId; + this.qualifiedName = qualifiedName; + this.name = name; + this.projectHashId = projectHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + public NpFile() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.project_hash_id") + public Long getProjectHashId() { + return projectHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.project_hash_id") + public void setProjectHashId(Long projectHashId) { + this.projectHashId = projectHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NpFile other = (NpFile) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getProjectHashId() == null ? other.getProjectHashId() == null : this.getProjectHashId().equals(other.getProjectHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getProjectHashId() == null) ? 0 : getProjectHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", name=").append(name); + sb.append(", projectHashId=").append(projectHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpInterface.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpInterface.java new file mode 100644 index 00000000..86343adc --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpInterface.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NpInterface implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + public NpInterface(Long elementHashId, String name, String qualifiedName, Long parentHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.qualifiedName = qualifiedName; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + public NpInterface() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NpInterface other = (NpInterface) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpMethod.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpMethod.java new file mode 100644 index 00000000..e355e671 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpMethod.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NpMethod implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.signature") + private String signature; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + public NpMethod(Long elementHashId, String name, String signature, Long typeHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.signature = signature; + this.typeHashId = typeHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + public NpMethod() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.signature") + public String getSignature() { + return signature; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.signature") + public void setSignature(String signature) { + this.signature = signature == null ? null : signature.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NpMethod other = (NpMethod) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getSignature() == null ? other.getSignature() == null : this.getSignature().equals(other.getSignature())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getSignature() == null) ? 0 : getSignature().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", signature=").append(signature); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpProject.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpProject.java new file mode 100644 index 00000000..9b0ea5de --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NpProject.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NpProject implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.extension") + private String extension; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + public NpProject(Long elementHashId, String extension, String name) { + this.elementHashId = elementHashId; + this.extension = extension; + this.name = name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + public NpProject() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.extension") + public String getExtension() { + return extension; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.extension") + public void setExtension(String extension) { + this.extension = extension == null ? null : extension.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NpProject other = (NpProject) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getExtension() == null ? other.getExtension() == null : this.getExtension().equals(other.getExtension())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getExtension() == null) ? 0 : getExtension().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", extension=").append(extension); + sb.append(", name=").append(name); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NullLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NullLiteral.java new file mode 100644 index 00000000..f8c3d780 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NullLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NullLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + public NullLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + public NullLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NullLiteral other = (NullLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NumberOfLines.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NumberOfLines.java new file mode 100644 index 00000000..ecc8fab1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/NumberOfLines.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class NumberOfLines implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_total_lines") + private Integer numberOfTotalLines; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_valid_lines") + private Integer numberOfValidLines; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_comment_lines") + private Integer numberOfCommentLines; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + public NumberOfLines(Long elementHashId, Integer numberOfTotalLines, Integer numberOfValidLines, Integer numberOfCommentLines) { + this.elementHashId = elementHashId; + this.numberOfTotalLines = numberOfTotalLines; + this.numberOfValidLines = numberOfValidLines; + this.numberOfCommentLines = numberOfCommentLines; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + public NumberOfLines() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_total_lines") + public Integer getNumberOfTotalLines() { + return numberOfTotalLines; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_total_lines") + public void setNumberOfTotalLines(Integer numberOfTotalLines) { + this.numberOfTotalLines = numberOfTotalLines; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_valid_lines") + public Integer getNumberOfValidLines() { + return numberOfValidLines; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_valid_lines") + public void setNumberOfValidLines(Integer numberOfValidLines) { + this.numberOfValidLines = numberOfValidLines; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_comment_lines") + public Integer getNumberOfCommentLines() { + return numberOfCommentLines; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_comment_lines") + public void setNumberOfCommentLines(Integer numberOfCommentLines) { + this.numberOfCommentLines = numberOfCommentLines; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + NumberOfLines other = (NumberOfLines) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getNumberOfTotalLines() == null ? other.getNumberOfTotalLines() == null : this.getNumberOfTotalLines().equals(other.getNumberOfTotalLines())) + && (this.getNumberOfValidLines() == null ? other.getNumberOfValidLines() == null : this.getNumberOfValidLines().equals(other.getNumberOfValidLines())) + && (this.getNumberOfCommentLines() == null ? other.getNumberOfCommentLines() == null : this.getNumberOfCommentLines().equals(other.getNumberOfCommentLines())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getNumberOfTotalLines() == null) ? 0 : getNumberOfTotalLines().hashCode()); + result = prime * result + ((getNumberOfValidLines() == null) ? 0 : getNumberOfValidLines().hashCode()); + result = prime * result + ((getNumberOfCommentLines() == null) ? 0 : getNumberOfCommentLines().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", numberOfTotalLines=").append(numberOfTotalLines); + sb.append(", numberOfValidLines=").append(numberOfValidLines); + sb.append(", numberOfCommentLines=").append(numberOfCommentLines); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PackageStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PackageStatement.java new file mode 100644 index 00000000..de4fdcee --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PackageStatement.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class PackageStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.package_hash_id") + private Long packageHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + public PackageStatement(Long elementHashId, String qualifiedName, Long locationHashId, Long packageHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.qualifiedName = qualifiedName; + this.locationHashId = locationHashId; + this.packageHashId = packageHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + public PackageStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.package_hash_id") + public Long getPackageHashId() { + return packageHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.package_hash_id") + public void setPackageHashId(Long packageHashId) { + this.packageHashId = packageHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + PackageStatement other = (PackageStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getPackageHashId() == null ? other.getPackageHashId() == null : this.getPackageHashId().equals(other.getPackageHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getPackageHashId() == null) ? 0 : getPackageHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", packageHashId=").append(packageHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parameter.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parameter.java new file mode 100644 index 00000000..07e0298a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parameter.java @@ -0,0 +1,172 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Parameter implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + public Parameter(Long elementHashId, String name, Integer indexOrder, Long parentHashId, Long locationHashId, String debugMessage, Long typeHashId) { + this.elementHashId = elementHashId; + this.name = name; + this.indexOrder = indexOrder; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + public Parameter() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Parameter other = (Parameter) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", name=").append(name); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parent.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parent.java new file mode 100644 index 00000000..1cdd583a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Parent.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Parent implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_type") + private String parentType; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + public Parent(Long parentHashId, String parentType) { + this.parentHashId = parentHashId; + this.parentType = parentType; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + public Parent() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_type") + public String getParentType() { + return parentType; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_type") + public void setParentType(String parentType) { + this.parentType = parentType == null ? null : parentType.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Parent other = (Parent) that; + return (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getParentType() == null ? other.getParentType() == null : this.getParentType().equals(other.getParentType())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getParentType() == null) ? 0 : getParentType().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", parentType=").append(parentType); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PolyadicExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PolyadicExpression.java new file mode 100644 index 00000000..c48bcf5e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/PolyadicExpression.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class PolyadicExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.size") + private Integer size; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.opcode") + private String opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + public PolyadicExpression(Long elementHashId, Integer size, String opcode) { + this.elementHashId = elementHashId; + this.size = size; + this.opcode = opcode; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + public PolyadicExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.size") + public Integer getSize() { + return size; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.size") + public void setSize(Integer size) { + this.size = size; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.opcode") + public String getOpcode() { + return opcode; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.opcode") + public void setOpcode(String opcode) { + this.opcode = opcode == null ? null : opcode.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + PolyadicExpression other = (PolyadicExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize())) + && (this.getOpcode() == null ? other.getOpcode() == null : this.getOpcode().equals(other.getOpcode())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode()); + result = prime * result + ((getOpcode() == null) ? 0 : getOpcode().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", size=").append(size); + sb.append(", opcode=").append(opcode); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Primitive.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Primitive.java new file mode 100644 index 00000000..b1c27e49 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Primitive.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Primitive implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.oid") + private Integer oid; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + public Primitive(Integer oid, String name) { + this.oid = oid; + this.name = name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + public Primitive() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.oid") + public Integer getOid() { + return oid; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.oid") + public void setOid(Integer oid) { + this.oid = oid; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Primitive other = (Primitive) that; + return (this.getOid() == null ? other.getOid() == null : this.getOid().equals(other.getOid())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getOid() == null) ? 0 : getOid().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", oid=").append(oid); + sb.append(", name=").append(name); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Program.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Program.java new file mode 100644 index 00000000..dc81e995 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Program.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Program implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.program_hash_id") + private Long programHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.absolute_prefix_path") + private String absolutePrefixPath; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + public Program(Long programHashId, String absolutePrefixPath) { + this.programHashId = programHashId; + this.absolutePrefixPath = absolutePrefixPath; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + public Program() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.program_hash_id") + public Long getProgramHashId() { + return programHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.program_hash_id") + public void setProgramHashId(Long programHashId) { + this.programHashId = programHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.absolute_prefix_path") + public String getAbsolutePrefixPath() { + return absolutePrefixPath; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.absolute_prefix_path") + public void setAbsolutePrefixPath(String absolutePrefixPath) { + this.absolutePrefixPath = absolutePrefixPath == null ? null : absolutePrefixPath.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Program other = (Program) that; + return (this.getProgramHashId() == null ? other.getProgramHashId() == null : this.getProgramHashId().equals(other.getProgramHashId())) + && (this.getAbsolutePrefixPath() == null ? other.getAbsolutePrefixPath() == null : this.getAbsolutePrefixPath().equals(other.getAbsolutePrefixPath())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getProgramHashId() == null) ? 0 : getProgramHashId().hashCode()); + result = prime * result + ((getAbsolutePrefixPath() == null) ? 0 : getAbsolutePrefixPath().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", programHashId=").append(programHashId); + sb.append(", absolutePrefixPath=").append(absolutePrefixPath); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceElement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceElement.java new file mode 100644 index 00000000..03fbacd4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceElement.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ReferenceElement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + public ReferenceElement(Long elementHashId, String debugMessage, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + public ReferenceElement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ReferenceElement other = (ReferenceElement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceExpression.java new file mode 100644 index 00000000..5148e82a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceExpression.java @@ -0,0 +1,70 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ReferenceExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + public ReferenceExpression(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + public ReferenceExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ReferenceExpression other = (ReferenceExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceList.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceList.java new file mode 100644 index 00000000..f2cbf0ce --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceList.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ReferenceList implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.role") + private String role; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + public ReferenceList(Long elementHashId, Long locationHashId, Long parentHashId, String debugMessage, String role) { + this.elementHashId = elementHashId; + this.locationHashId = locationHashId; + this.parentHashId = parentHashId; + this.debugMessage = debugMessage; + this.role = role; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + public ReferenceList() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.role") + public String getRole() { + return role; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.role") + public void setRole(String role) { + this.role = role == null ? null : role.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ReferenceList other = (ReferenceList) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", role=").append(role); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceParameterList.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceParameterList.java new file mode 100644 index 00000000..41f4f6af --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceParameterList.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ReferenceParameterList implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.type_element_hash_id") + private Long typeElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.list_hash_id") + private Long listHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + public ReferenceParameterList(Long typeElementHashId, Long listHashId, Integer indexOrder, Long parentHashId, String debugMessage, Long locationHashId) { + this.typeElementHashId = typeElementHashId; + this.listHashId = listHashId; + this.indexOrder = indexOrder; + this.parentHashId = parentHashId; + this.debugMessage = debugMessage; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + public ReferenceParameterList() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.type_element_hash_id") + public Long getTypeElementHashId() { + return typeElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.type_element_hash_id") + public void setTypeElementHashId(Long typeElementHashId) { + this.typeElementHashId = typeElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.list_hash_id") + public Long getListHashId() { + return listHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.list_hash_id") + public void setListHashId(Long listHashId) { + this.listHashId = listHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ReferenceParameterList other = (ReferenceParameterList) that; + return (this.getTypeElementHashId() == null ? other.getTypeElementHashId() == null : this.getTypeElementHashId().equals(other.getTypeElementHashId())) + && (this.getListHashId() == null ? other.getListHashId() == null : this.getListHashId().equals(other.getListHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getTypeElementHashId() == null) ? 0 : getTypeElementHashId().hashCode()); + result = prime * result + ((getListHashId() == null) ? 0 : getListHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", typeElementHashId=").append(typeElementHashId); + sb.append(", listHashId=").append(listHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceRelation.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceRelation.java new file mode 100644 index 00000000..dea41b78 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceRelation.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ReferenceRelation implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.reference_element_hash_id") + private Long referenceElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.definition_element_hash_id") + private Long definitionElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + public ReferenceRelation(Long referenceElementHashId, Long definitionElementHashId) { + this.referenceElementHashId = referenceElementHashId; + this.definitionElementHashId = definitionElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + public ReferenceRelation() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.reference_element_hash_id") + public Long getReferenceElementHashId() { + return referenceElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.reference_element_hash_id") + public void setReferenceElementHashId(Long referenceElementHashId) { + this.referenceElementHashId = referenceElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.definition_element_hash_id") + public Long getDefinitionElementHashId() { + return definitionElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.definition_element_hash_id") + public void setDefinitionElementHashId(Long definitionElementHashId) { + this.definitionElementHashId = definitionElementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ReferenceRelation other = (ReferenceRelation) that; + return (this.getReferenceElementHashId() == null ? other.getReferenceElementHashId() == null : this.getReferenceElementHashId().equals(other.getReferenceElementHashId())) + && (this.getDefinitionElementHashId() == null ? other.getDefinitionElementHashId() == null : this.getDefinitionElementHashId().equals(other.getDefinitionElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getReferenceElementHashId() == null) ? 0 : getReferenceElementHashId().hashCode()); + result = prime * result + ((getDefinitionElementHashId() == null) ? 0 : getDefinitionElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", referenceElementHashId=").append(referenceElementHashId); + sb.append(", definitionElementHashId=").append(definitionElementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceType.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceType.java new file mode 100644 index 00000000..2d6a730b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReferenceType.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ReferenceType implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.oid") + private Long oid; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.name") + private String name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + public ReferenceType(Long oid, String name, String qualifiedName) { + this.oid = oid; + this.name = name; + this.qualifiedName = qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + public ReferenceType() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.oid") + public Long getOid() { + return oid; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.oid") + public void setOid(Long oid) { + this.oid = oid; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.name") + public String getName() { + return name; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.name") + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ReferenceType other = (ReferenceType) that; + return (this.getOid() == null ? other.getOid() == null : this.getOid().equals(other.getOid())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getOid() == null) ? 0 : getOid().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", oid=").append(oid); + sb.append(", name=").append(name); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ResourceList.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ResourceList.java new file mode 100644 index 00000000..2235b264 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ResourceList.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ResourceList implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + public ResourceList(Long elementHashId, String debugMessage, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + public ResourceList() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ResourceList other = (ResourceList) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReturnStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReturnStatement.java new file mode 100644 index 00000000..1dcc9d83 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ReturnStatement.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ReturnStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.return_expression_hash_id") + private Long returnExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + public ReturnStatement(Long elementHashId, Long returnExpressionHashId) { + this.elementHashId = elementHashId; + this.returnExpressionHashId = returnExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + public ReturnStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.return_expression_hash_id") + public Long getReturnExpressionHashId() { + return returnExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.return_expression_hash_id") + public void setReturnExpressionHashId(Long returnExpressionHashId) { + this.returnExpressionHashId = returnExpressionHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ReturnStatement other = (ReturnStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getReturnExpressionHashId() == null ? other.getReturnExpressionHashId() == null : this.getReturnExpressionHashId().equals(other.getReturnExpressionHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getReturnExpressionHashId() == null) ? 0 : getReturnExpressionHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", returnExpressionHashId=").append(returnExpressionHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Statement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Statement.java new file mode 100644 index 00000000..66885aba --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Statement.java @@ -0,0 +1,155 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Statement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.type") + private String type; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + public Statement(Long elementHashId, Long parentHashId, Integer indexOrder, Long locationHashId, String debugMessage, String type) { + this.elementHashId = elementHashId; + this.parentHashId = parentHashId; + this.indexOrder = indexOrder; + this.locationHashId = locationHashId; + this.debugMessage = debugMessage; + this.type = type; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + public Statement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.type") + public String getType() { + return type; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.type") + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Statement other = (Statement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", type=").append(type); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StatementEnclosingExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StatementEnclosingExpression.java new file mode 100644 index 00000000..e13914ce --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StatementEnclosingExpression.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class StatementEnclosingExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.expression_hash_id") + private Long expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.statement_hash_id") + private Long statementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + public StatementEnclosingExpression(Long expressionHashId, Long statementHashId) { + this.expressionHashId = expressionHashId; + this.statementHashId = statementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + public StatementEnclosingExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.expression_hash_id") + public Long getExpressionHashId() { + return expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.expression_hash_id") + public void setExpressionHashId(Long expressionHashId) { + this.expressionHashId = expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.statement_hash_id") + public Long getStatementHashId() { + return statementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.statement_hash_id") + public void setStatementHashId(Long statementHashId) { + this.statementHashId = statementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + StatementEnclosingExpression other = (StatementEnclosingExpression) that; + return (this.getExpressionHashId() == null ? other.getExpressionHashId() == null : this.getExpressionHashId().equals(other.getExpressionHashId())) + && (this.getStatementHashId() == null ? other.getStatementHashId() == null : this.getStatementHashId().equals(other.getStatementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getExpressionHashId() == null) ? 0 : getExpressionHashId().hashCode()); + result = prime * result + ((getStatementHashId() == null) ? 0 : getStatementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", expressionHashId=").append(expressionHashId); + sb.append(", statementHashId=").append(statementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StringLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StringLiteral.java new file mode 100644 index 00000000..6fe7814b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/StringLiteral.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class StringLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + public StringLiteral(Long elementHashId, String value) { + this.elementHashId = elementHashId; + this.value = value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + public StringLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + StringLiteral other = (StringLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperAccessExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperAccessExpression.java new file mode 100644 index 00000000..f35f47be --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperAccessExpression.java @@ -0,0 +1,70 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class SuperAccessExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_access_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + public SuperAccessExpression(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + public SuperAccessExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_access_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_access_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SuperAccessExpression other = (SuperAccessExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperConstructorInvocation.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperConstructorInvocation.java new file mode 100644 index 00000000..5399f1a1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperConstructorInvocation.java @@ -0,0 +1,70 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class SuperConstructorInvocation implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_constructor_invocation.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + public SuperConstructorInvocation(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + public SuperConstructorInvocation() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_constructor_invocation.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_constructor_invocation.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SuperConstructorInvocation other = (SuperConstructorInvocation) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpression.java new file mode 100644 index 00000000..e3d20b34 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpression.java @@ -0,0 +1,70 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class SuperExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + public SuperExpression(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + public SuperExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SuperExpression other = (SuperExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpressionWithQualifier.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpressionWithQualifier.java new file mode 100644 index 00000000..29a915b5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SuperExpressionWithQualifier.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class SuperExpressionWithQualifier implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.qualifier_hash_id") + private Long qualifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + public SuperExpressionWithQualifier(Long elementHashId, Long qualifierHashId) { + this.elementHashId = elementHashId; + this.qualifierHashId = qualifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + public SuperExpressionWithQualifier() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.qualifier_hash_id") + public Long getQualifierHashId() { + return qualifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.qualifier_hash_id") + public void setQualifierHashId(Long qualifierHashId) { + this.qualifierHashId = qualifierHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SuperExpressionWithQualifier other = (SuperExpressionWithQualifier) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifierHashId() == null ? other.getQualifierHashId() == null : this.getQualifierHashId().equals(other.getQualifierHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifierHashId() == null) ? 0 : getQualifierHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifierHashId=").append(qualifierHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchLabelStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchLabelStatement.java new file mode 100644 index 00000000..0c29dcd2 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchLabelStatement.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class SwitchLabelStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.case_value_hash_id") + private Long caseValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.enclosing_switch_block_hash_id") + private Long enclosingSwitchBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.next_switch_case_hash_id") + private Long nextSwitchCaseHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + public SwitchLabelStatement(Long elementHashId, Long caseValueHashId, Long enclosingSwitchBlockHashId, Long nextSwitchCaseHashId) { + this.elementHashId = elementHashId; + this.caseValueHashId = caseValueHashId; + this.enclosingSwitchBlockHashId = enclosingSwitchBlockHashId; + this.nextSwitchCaseHashId = nextSwitchCaseHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + public SwitchLabelStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.case_value_hash_id") + public Long getCaseValueHashId() { + return caseValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.case_value_hash_id") + public void setCaseValueHashId(Long caseValueHashId) { + this.caseValueHashId = caseValueHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.enclosing_switch_block_hash_id") + public Long getEnclosingSwitchBlockHashId() { + return enclosingSwitchBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.enclosing_switch_block_hash_id") + public void setEnclosingSwitchBlockHashId(Long enclosingSwitchBlockHashId) { + this.enclosingSwitchBlockHashId = enclosingSwitchBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.next_switch_case_hash_id") + public Long getNextSwitchCaseHashId() { + return nextSwitchCaseHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.next_switch_case_hash_id") + public void setNextSwitchCaseHashId(Long nextSwitchCaseHashId) { + this.nextSwitchCaseHashId = nextSwitchCaseHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SwitchLabelStatement other = (SwitchLabelStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getCaseValueHashId() == null ? other.getCaseValueHashId() == null : this.getCaseValueHashId().equals(other.getCaseValueHashId())) + && (this.getEnclosingSwitchBlockHashId() == null ? other.getEnclosingSwitchBlockHashId() == null : this.getEnclosingSwitchBlockHashId().equals(other.getEnclosingSwitchBlockHashId())) + && (this.getNextSwitchCaseHashId() == null ? other.getNextSwitchCaseHashId() == null : this.getNextSwitchCaseHashId().equals(other.getNextSwitchCaseHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getCaseValueHashId() == null) ? 0 : getCaseValueHashId().hashCode()); + result = prime * result + ((getEnclosingSwitchBlockHashId() == null) ? 0 : getEnclosingSwitchBlockHashId().hashCode()); + result = prime * result + ((getNextSwitchCaseHashId() == null) ? 0 : getNextSwitchCaseHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", caseValueHashId=").append(caseValueHashId); + sb.append(", enclosingSwitchBlockHashId=").append(enclosingSwitchBlockHashId); + sb.append(", nextSwitchCaseHashId=").append(nextSwitchCaseHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchStatement.java new file mode 100644 index 00000000..44cfe015 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SwitchStatement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class SwitchStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.discriminant_hash_id") + private Long discriminantHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.body_declaration_hash_id") + private Long bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + public SwitchStatement(Long elementHashId, Long discriminantHashId, Long bodyDeclarationHashId) { + this.elementHashId = elementHashId; + this.discriminantHashId = discriminantHashId; + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + public SwitchStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.discriminant_hash_id") + public Long getDiscriminantHashId() { + return discriminantHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.discriminant_hash_id") + public void setDiscriminantHashId(Long discriminantHashId) { + this.discriminantHashId = discriminantHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.body_declaration_hash_id") + public Long getBodyDeclarationHashId() { + return bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.body_declaration_hash_id") + public void setBodyDeclarationHashId(Long bodyDeclarationHashId) { + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SwitchStatement other = (SwitchStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDiscriminantHashId() == null ? other.getDiscriminantHashId() == null : this.getDiscriminantHashId().equals(other.getDiscriminantHashId())) + && (this.getBodyDeclarationHashId() == null ? other.getBodyDeclarationHashId() == null : this.getBodyDeclarationHashId().equals(other.getBodyDeclarationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDiscriminantHashId() == null) ? 0 : getDiscriminantHashId().hashCode()); + result = prime * result + ((getBodyDeclarationHashId() == null) ? 0 : getBodyDeclarationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", discriminantHashId=").append(discriminantHashId); + sb.append(", bodyDeclarationHashId=").append(bodyDeclarationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SynchronizedStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SynchronizedStatement.java new file mode 100644 index 00000000..b32b02a9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/SynchronizedStatement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class SynchronizedStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.lock_expression_hash_id") + private Long lockExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.body_declaration_hash_id") + private Long bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + public SynchronizedStatement(Long elementHashId, Long lockExpressionHashId, Long bodyDeclarationHashId) { + this.elementHashId = elementHashId; + this.lockExpressionHashId = lockExpressionHashId; + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + public SynchronizedStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.lock_expression_hash_id") + public Long getLockExpressionHashId() { + return lockExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.lock_expression_hash_id") + public void setLockExpressionHashId(Long lockExpressionHashId) { + this.lockExpressionHashId = lockExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.body_declaration_hash_id") + public Long getBodyDeclarationHashId() { + return bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.body_declaration_hash_id") + public void setBodyDeclarationHashId(Long bodyDeclarationHashId) { + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SynchronizedStatement other = (SynchronizedStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getLockExpressionHashId() == null ? other.getLockExpressionHashId() == null : this.getLockExpressionHashId().equals(other.getLockExpressionHashId())) + && (this.getBodyDeclarationHashId() == null ? other.getBodyDeclarationHashId() == null : this.getBodyDeclarationHashId().equals(other.getBodyDeclarationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getLockExpressionHashId() == null) ? 0 : getLockExpressionHashId().hashCode()); + result = prime * result + ((getBodyDeclarationHashId() == null) ? 0 : getBodyDeclarationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", lockExpressionHashId=").append(lockExpressionHashId); + sb.append(", bodyDeclarationHashId=").append(bodyDeclarationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisAccessExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisAccessExpression.java new file mode 100644 index 00000000..b4eb19d6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisAccessExpression.java @@ -0,0 +1,70 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ThisAccessExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_access_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + public ThisAccessExpression(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + public ThisAccessExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_access_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_access_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ThisAccessExpression other = (ThisAccessExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisExpressionWithQualifier.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisExpressionWithQualifier.java new file mode 100644 index 00000000..2abb7579 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThisExpressionWithQualifier.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ThisExpressionWithQualifier implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.qualifier_hash_id") + private Long qualifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + public ThisExpressionWithQualifier(Long elementHashId, Long qualifierHashId) { + this.elementHashId = elementHashId; + this.qualifierHashId = qualifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + public ThisExpressionWithQualifier() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.qualifier_hash_id") + public Long getQualifierHashId() { + return qualifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.qualifier_hash_id") + public void setQualifierHashId(Long qualifierHashId) { + this.qualifierHashId = qualifierHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ThisExpressionWithQualifier other = (ThisExpressionWithQualifier) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifierHashId() == null ? other.getQualifierHashId() == null : this.getQualifierHashId().equals(other.getQualifierHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifierHashId() == null) ? 0 : getQualifierHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifierHashId=").append(qualifierHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThrowStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThrowStatement.java new file mode 100644 index 00000000..dd668d60 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/ThrowStatement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class ThrowStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.exception_hash_id") + private Long exceptionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.block_hash_id") + private Long blockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + public ThrowStatement(Long elementHashId, Long exceptionHashId, Long blockHashId) { + this.elementHashId = elementHashId; + this.exceptionHashId = exceptionHashId; + this.blockHashId = blockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + public ThrowStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.exception_hash_id") + public Long getExceptionHashId() { + return exceptionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.exception_hash_id") + public void setExceptionHashId(Long exceptionHashId) { + this.exceptionHashId = exceptionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.block_hash_id") + public Long getBlockHashId() { + return blockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.block_hash_id") + public void setBlockHashId(Long blockHashId) { + this.blockHashId = blockHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ThrowStatement other = (ThrowStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getExceptionHashId() == null ? other.getExceptionHashId() == null : this.getExceptionHashId().equals(other.getExceptionHashId())) + && (this.getBlockHashId() == null ? other.getBlockHashId() == null : this.getBlockHashId().equals(other.getBlockHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getExceptionHashId() == null) ? 0 : getExceptionHashId().hashCode()); + result = prime * result + ((getBlockHashId() == null) ? 0 : getBlockHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", exceptionHashId=").append(exceptionHashId); + sb.append(", blockHashId=").append(blockHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Token.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Token.java new file mode 100644 index 00000000..bd1147f2 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/Token.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class Token implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.value") + private String value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + public Token(Long elementHashId, String value, Long locationHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.value = value; + this.locationHashId = locationHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + public Token() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.value") + public String getValue() { + return value; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.value") + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Token other = (Token) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", value=").append(value); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithFinally.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithFinally.java new file mode 100644 index 00000000..ee2452c5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithFinally.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class TryStatementWithFinally implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.try_block_hash_id") + private Long tryBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.finally_block_hash_id") + private Long finallyBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + public TryStatementWithFinally(Long elementHashId, Long tryBlockHashId, Long finallyBlockHashId) { + this.elementHashId = elementHashId; + this.tryBlockHashId = tryBlockHashId; + this.finallyBlockHashId = finallyBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + public TryStatementWithFinally() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.try_block_hash_id") + public Long getTryBlockHashId() { + return tryBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.try_block_hash_id") + public void setTryBlockHashId(Long tryBlockHashId) { + this.tryBlockHashId = tryBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.finally_block_hash_id") + public Long getFinallyBlockHashId() { + return finallyBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.finally_block_hash_id") + public void setFinallyBlockHashId(Long finallyBlockHashId) { + this.finallyBlockHashId = finallyBlockHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TryStatementWithFinally other = (TryStatementWithFinally) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getTryBlockHashId() == null ? other.getTryBlockHashId() == null : this.getTryBlockHashId().equals(other.getTryBlockHashId())) + && (this.getFinallyBlockHashId() == null ? other.getFinallyBlockHashId() == null : this.getFinallyBlockHashId().equals(other.getFinallyBlockHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getTryBlockHashId() == null) ? 0 : getTryBlockHashId().hashCode()); + result = prime * result + ((getFinallyBlockHashId() == null) ? 0 : getFinallyBlockHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", tryBlockHashId=").append(tryBlockHashId); + sb.append(", finallyBlockHashId=").append(finallyBlockHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithoutFinally.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithoutFinally.java new file mode 100644 index 00000000..f645ab78 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TryStatementWithoutFinally.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class TryStatementWithoutFinally implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.try_block_hash_id") + private Long tryBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + public TryStatementWithoutFinally(Long elementHashId, Long tryBlockHashId) { + this.elementHashId = elementHashId; + this.tryBlockHashId = tryBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + public TryStatementWithoutFinally() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.try_block_hash_id") + public Long getTryBlockHashId() { + return tryBlockHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.try_block_hash_id") + public void setTryBlockHashId(Long tryBlockHashId) { + this.tryBlockHashId = tryBlockHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TryStatementWithoutFinally other = (TryStatementWithoutFinally) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getTryBlockHashId() == null ? other.getTryBlockHashId() == null : this.getTryBlockHashId().equals(other.getTryBlockHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getTryBlockHashId() == null) ? 0 : getTryBlockHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", tryBlockHashId=").append(tryBlockHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeCastExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeCastExpression.java new file mode 100644 index 00000000..25b7b09a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeCastExpression.java @@ -0,0 +1,87 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class TypeCastExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.cast_expression_hash_id") + private Long castExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + public TypeCastExpression(Long elementHashId, Long castExpressionHashId) { + this.elementHashId = elementHashId; + this.castExpressionHashId = castExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + public TypeCastExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.cast_expression_hash_id") + public Long getCastExpressionHashId() { + return castExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.cast_expression_hash_id") + public void setCastExpressionHashId(Long castExpressionHashId) { + this.castExpressionHashId = castExpressionHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TypeCastExpression other = (TypeCastExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getCastExpressionHashId() == null ? other.getCastExpressionHashId() == null : this.getCastExpressionHashId().equals(other.getCastExpressionHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getCastExpressionHashId() == null) ? 0 : getCastExpressionHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", castExpressionHashId=").append(castExpressionHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeElement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeElement.java new file mode 100644 index 00000000..cf146aaf --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeElement.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class TypeElement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.reference_type_hash_id") + private Long referenceTypeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + public TypeElement(Long elementHashId, Long referenceTypeHashId, String debugMessage, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.referenceTypeHashId = referenceTypeHashId; + this.debugMessage = debugMessage; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + public TypeElement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.reference_type_hash_id") + public Long getReferenceTypeHashId() { + return referenceTypeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.reference_type_hash_id") + public void setReferenceTypeHashId(Long referenceTypeHashId) { + this.referenceTypeHashId = referenceTypeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TypeElement other = (TypeElement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getReferenceTypeHashId() == null ? other.getReferenceTypeHashId() == null : this.getReferenceTypeHashId().equals(other.getReferenceTypeHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getReferenceTypeHashId() == null) ? 0 : getReferenceTypeHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", referenceTypeHashId=").append(referenceTypeHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeLiteral.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeLiteral.java new file mode 100644 index 00000000..1660d7d1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeLiteral.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class TypeLiteral implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_element_hash_id") + private Long typeElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_hash_id") + private Long typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + public TypeLiteral(Long elementHashId, Long typeElementHashId, Long typeHashId) { + this.elementHashId = elementHashId; + this.typeElementHashId = typeElementHashId; + this.typeHashId = typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + public TypeLiteral() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_element_hash_id") + public Long getTypeElementHashId() { + return typeElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_element_hash_id") + public void setTypeElementHashId(Long typeElementHashId) { + this.typeElementHashId = typeElementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_hash_id") + public Long getTypeHashId() { + return typeHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_hash_id") + public void setTypeHashId(Long typeHashId) { + this.typeHashId = typeHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TypeLiteral other = (TypeLiteral) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getTypeElementHashId() == null ? other.getTypeElementHashId() == null : this.getTypeElementHashId().equals(other.getTypeElementHashId())) + && (this.getTypeHashId() == null ? other.getTypeHashId() == null : this.getTypeHashId().equals(other.getTypeHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getTypeElementHashId() == null) ? 0 : getTypeElementHashId().hashCode()); + result = prime * result + ((getTypeHashId() == null) ? 0 : getTypeHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", typeElementHashId=").append(typeElementHashId); + sb.append(", typeHashId=").append(typeHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeParameter.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeParameter.java new file mode 100644 index 00000000..c33d2130 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/TypeParameter.java @@ -0,0 +1,172 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class TypeParameter implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.debug_message") + private String debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.owner_hash_id") + private Long ownerHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.index_order") + private Integer indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.extends_list_hash_id") + private Long extendsListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + public TypeParameter(Long elementHashId, String debugMessage, Long ownerHashId, Integer indexOrder, Long extendsListHashId, Long parentHashId, Long locationHashId) { + this.elementHashId = elementHashId; + this.debugMessage = debugMessage; + this.ownerHashId = ownerHashId; + this.indexOrder = indexOrder; + this.extendsListHashId = extendsListHashId; + this.parentHashId = parentHashId; + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + public TypeParameter() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.debug_message") + public String getDebugMessage() { + return debugMessage; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.debug_message") + public void setDebugMessage(String debugMessage) { + this.debugMessage = debugMessage == null ? null : debugMessage.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.owner_hash_id") + public Long getOwnerHashId() { + return ownerHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.owner_hash_id") + public void setOwnerHashId(Long ownerHashId) { + this.ownerHashId = ownerHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.index_order") + public Integer getIndexOrder() { + return indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.index_order") + public void setIndexOrder(Integer indexOrder) { + this.indexOrder = indexOrder; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.extends_list_hash_id") + public Long getExtendsListHashId() { + return extendsListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.extends_list_hash_id") + public void setExtendsListHashId(Long extendsListHashId) { + this.extendsListHashId = extendsListHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TypeParameter other = (TypeParameter) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getDebugMessage() == null ? other.getDebugMessage() == null : this.getDebugMessage().equals(other.getDebugMessage())) + && (this.getOwnerHashId() == null ? other.getOwnerHashId() == null : this.getOwnerHashId().equals(other.getOwnerHashId())) + && (this.getIndexOrder() == null ? other.getIndexOrder() == null : this.getIndexOrder().equals(other.getIndexOrder())) + && (this.getExtendsListHashId() == null ? other.getExtendsListHashId() == null : this.getExtendsListHashId().equals(other.getExtendsListHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getDebugMessage() == null) ? 0 : getDebugMessage().hashCode()); + result = prime * result + ((getOwnerHashId() == null) ? 0 : getOwnerHashId().hashCode()); + result = prime * result + ((getIndexOrder() == null) ? 0 : getIndexOrder().hashCode()); + result = prime * result + ((getExtendsListHashId() == null) ? 0 : getExtendsListHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", debugMessage=").append(debugMessage); + sb.append(", ownerHashId=").append(ownerHashId); + sb.append(", indexOrder=").append(indexOrder); + sb.append(", extendsListHashId=").append(extendsListHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/UnaryExpression.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/UnaryExpression.java new file mode 100644 index 00000000..4bd28e4f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/UnaryExpression.java @@ -0,0 +1,121 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class UnaryExpression implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.operand_hash_id") + private Long operandHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.opcode") + private String opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.is_postfix") + private Integer isPostfix; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + public UnaryExpression(Long elementHashId, Long operandHashId, String opcode, Integer isPostfix) { + this.elementHashId = elementHashId; + this.operandHashId = operandHashId; + this.opcode = opcode; + this.isPostfix = isPostfix; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + public UnaryExpression() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.operand_hash_id") + public Long getOperandHashId() { + return operandHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.operand_hash_id") + public void setOperandHashId(Long operandHashId) { + this.operandHashId = operandHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.opcode") + public String getOpcode() { + return opcode; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.opcode") + public void setOpcode(String opcode) { + this.opcode = opcode == null ? null : opcode.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.is_postfix") + public Integer getIsPostfix() { + return isPostfix; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.is_postfix") + public void setIsPostfix(Integer isPostfix) { + this.isPostfix = isPostfix; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UnaryExpression other = (UnaryExpression) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getOperandHashId() == null ? other.getOperandHashId() == null : this.getOperandHashId().equals(other.getOperandHashId())) + && (this.getOpcode() == null ? other.getOpcode() == null : this.getOpcode().equals(other.getOpcode())) + && (this.getIsPostfix() == null ? other.getIsPostfix() == null : this.getIsPostfix().equals(other.getIsPostfix())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getOperandHashId() == null) ? 0 : getOperandHashId().hashCode()); + result = prime * result + ((getOpcode() == null) ? 0 : getOpcode().hashCode()); + result = prime * result + ((getIsPostfix() == null) ? 0 : getIsPostfix().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", operandHashId=").append(operandHashId); + sb.append(", opcode=").append(opcode); + sb.append(", isPostfix=").append(isPostfix); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/WhileStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/WhileStatement.java new file mode 100644 index 00000000..70d16f42 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/WhileStatement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class WhileStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.condition_hash_id") + private Long conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.body_declaration_hash_id") + private Long bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + public WhileStatement(Long elementHashId, Long conditionHashId, Long bodyDeclarationHashId) { + this.elementHashId = elementHashId; + this.conditionHashId = conditionHashId; + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + public WhileStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.condition_hash_id") + public Long getConditionHashId() { + return conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.condition_hash_id") + public void setConditionHashId(Long conditionHashId) { + this.conditionHashId = conditionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.body_declaration_hash_id") + public Long getBodyDeclarationHashId() { + return bodyDeclarationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.body_declaration_hash_id") + public void setBodyDeclarationHashId(Long bodyDeclarationHashId) { + this.bodyDeclarationHashId = bodyDeclarationHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + WhileStatement other = (WhileStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getConditionHashId() == null ? other.getConditionHashId() == null : this.getConditionHashId().equals(other.getConditionHashId())) + && (this.getBodyDeclarationHashId() == null ? other.getBodyDeclarationHashId() == null : this.getBodyDeclarationHashId().equals(other.getBodyDeclarationHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getConditionHashId() == null) ? 0 : getConditionHashId().hashCode()); + result = prime * result + ((getBodyDeclarationHashId() == null) ? 0 : getBodyDeclarationHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", conditionHashId=").append(conditionHashId); + sb.append(", bodyDeclarationHashId=").append(bodyDeclarationHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/YieldStatement.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/YieldStatement.java new file mode 100644 index 00000000..b357fb33 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/YieldStatement.java @@ -0,0 +1,104 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class YieldStatement implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.expression_hash_id") + private Long expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.enclosing_expression_hash_id") + private Long enclosingExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + public YieldStatement(Long elementHashId, Long expressionHashId, Long enclosingExpressionHashId) { + this.elementHashId = elementHashId; + this.expressionHashId = expressionHashId; + this.enclosingExpressionHashId = enclosingExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + public YieldStatement() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.expression_hash_id") + public Long getExpressionHashId() { + return expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.expression_hash_id") + public void setExpressionHashId(Long expressionHashId) { + this.expressionHashId = expressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.enclosing_expression_hash_id") + public Long getEnclosingExpressionHashId() { + return enclosingExpressionHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.enclosing_expression_hash_id") + public void setEnclosingExpressionHashId(Long enclosingExpressionHashId) { + this.enclosingExpressionHashId = enclosingExpressionHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + YieldStatement other = (YieldStatement) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getExpressionHashId() == null ? other.getExpressionHashId() == null : this.getExpressionHashId().equals(other.getExpressionHashId())) + && (this.getEnclosingExpressionHashId() == null ? other.getEnclosingExpressionHashId() == null : this.getEnclosingExpressionHashId().equals(other.getEnclosingExpressionHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getExpressionHashId() == null) ? 0 : getExpressionHashId().hashCode()); + result = prime * result + ((getEnclosingExpressionHashId() == null) ? 0 : getEnclosingExpressionHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", expressionHashId=").append(expressionHashId); + sb.append(", enclosingExpressionHashId=").append(enclosingExpressionHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/clazz.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/clazz.java new file mode 100644 index 00000000..e6f6d089 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/domain/clazz.java @@ -0,0 +1,138 @@ +package com.alipay.codequery.dal.mybatis.domain; + +import java.io.Serializable; +import javax.annotation.Generated; + +public class clazz implements Serializable { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.element_hash_id") + private Long elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.qualified_name") + private String qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.identifier_hash_id") + private Long identifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.location_hash_id") + private Long locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.parent_hash_id") + private Long parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + private static final long serialVersionUID = 1L; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + public clazz(Long elementHashId, String qualifiedName, Long identifierHashId, Long locationHashId, Long parentHashId) { + this.elementHashId = elementHashId; + this.qualifiedName = qualifiedName; + this.identifierHashId = identifierHashId; + this.locationHashId = locationHashId; + this.parentHashId = parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + public clazz() { + super(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.element_hash_id") + public Long getElementHashId() { + return elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.element_hash_id") + public void setElementHashId(Long elementHashId) { + this.elementHashId = elementHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.qualified_name") + public String getQualifiedName() { + return qualifiedName; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.qualified_name") + public void setQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName == null ? null : qualifiedName.trim(); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.identifier_hash_id") + public Long getIdentifierHashId() { + return identifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.identifier_hash_id") + public void setIdentifierHashId(Long identifierHashId) { + this.identifierHashId = identifierHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.location_hash_id") + public Long getLocationHashId() { + return locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.location_hash_id") + public void setLocationHashId(Long locationHashId) { + this.locationHashId = locationHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.parent_hash_id") + public Long getParentHashId() { + return parentHashId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.parent_hash_id") + public void setParentHashId(Long parentHashId) { + this.parentHashId = parentHashId; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + clazz other = (clazz) that; + return (this.getElementHashId() == null ? other.getElementHashId() == null : this.getElementHashId().equals(other.getElementHashId())) + && (this.getQualifiedName() == null ? other.getQualifiedName() == null : this.getQualifiedName().equals(other.getQualifiedName())) + && (this.getIdentifierHashId() == null ? other.getIdentifierHashId() == null : this.getIdentifierHashId().equals(other.getIdentifierHashId())) + && (this.getLocationHashId() == null ? other.getLocationHashId() == null : this.getLocationHashId().equals(other.getLocationHashId())) + && (this.getParentHashId() == null ? other.getParentHashId() == null : this.getParentHashId().equals(other.getParentHashId())); + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getElementHashId() == null) ? 0 : getElementHashId().hashCode()); + result = prime * result + ((getQualifiedName() == null) ? 0 : getQualifiedName().hashCode()); + result = prime * result + ((getIdentifierHashId() == null) ? 0 : getIdentifierHashId().hashCode()); + result = prime * result + ((getLocationHashId() == null) ? 0 : getLocationHashId().hashCode()); + result = prime * result + ((getParentHashId() == null) ? 0 : getParentHashId().hashCode()); + return result; + } + + @Override + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", elementHashId=").append(elementHashId); + sb.append(", qualifiedName=").append(qualifiedName); + sb.append(", identifierHashId=").append(identifierHashId); + sb.append(", locationHashId=").append(locationHashId); + sb.append(", parentHashId=").append(parentHashId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationDynamicSqlSupport.java new file mode 100644 index 00000000..0de27a1f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotatedRelationDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + public static final AnnotatedRelation annotatedRelation = new AnnotatedRelation(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotation_hash_id") + public static final SqlColumn annotationHashId = annotatedRelation.annotationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotated_relation.annotated_item_hash_id") + public static final SqlColumn annotatedItemHashId = annotatedRelation.annotatedItemHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + public static final class AnnotatedRelation extends SqlTable { + public final SqlColumn annotationHashId = column("annotation_hash_id", JDBCType.BIGINT); + + public final SqlColumn annotatedItemHashId = column("annotated_item_hash_id", JDBCType.BIGINT); + + public AnnotatedRelation() { + super("annotated_relation"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationMapper.java new file mode 100644 index 00000000..3d822a16 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotatedRelationMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotatedRelationDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotatedRelation; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotatedRelationMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + BasicColumn[] selectList = BasicColumn.columnList(annotationHashId, annotatedItemHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="annotation_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotated_item_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="annotation_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotated_item_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotatedRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotatedRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default int insert(AnnotatedRelation record) { + return MyBatis3Utils.insert(this::insert, record, annotatedRelation, c -> + c.map(annotationHashId).toProperty("annotationHashId") + .map(annotatedItemHashId).toProperty("annotatedItemHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotatedRelation, c -> + c.map(annotationHashId).toProperty("annotationHashId") + .map(annotatedItemHashId).toProperty("annotatedItemHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default int insertSelective(AnnotatedRelation record) { + return MyBatis3Utils.insert(this::insert, record, annotatedRelation, c -> + c.map(annotationHashId).toPropertyWhenPresent("annotationHashId", record::getAnnotationHashId) + .map(annotatedItemHashId).toPropertyWhenPresent("annotatedItemHashId", record::getAnnotatedItemHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotatedRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotatedRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotatedRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotatedRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + static UpdateDSL updateAllColumns(AnnotatedRelation record, UpdateDSL dsl) { + return dsl.set(annotationHashId).equalTo(record::getAnnotationHashId) + .set(annotatedItemHashId).equalTo(record::getAnnotatedItemHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotated_relation") + static UpdateDSL updateSelectiveColumns(AnnotatedRelation record, UpdateDSL dsl) { + return dsl.set(annotationHashId).equalToWhenPresent(record::getAnnotationHashId) + .set(annotatedItemHashId).equalToWhenPresent(record::getAnnotatedItemHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameDynamicSqlSupport.java new file mode 100644 index 00000000..2d931539 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameDynamicSqlSupport.java @@ -0,0 +1,53 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationAccessArgumentWithNameDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + public static final AnnotationAccessArgumentWithName annotationAccessArgumentWithName = new AnnotationAccessArgumentWithName(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.element_hash_id") + public static final SqlColumn elementHashId = annotationAccessArgumentWithName.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.annotation_access_hash_id") + public static final SqlColumn annotationAccessHashId = annotationAccessArgumentWithName.annotationAccessHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.type_hash_id") + public static final SqlColumn typeHashId = annotationAccessArgumentWithName.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.argument_value_hash_id") + public static final SqlColumn argumentValueHashId = annotationAccessArgumentWithName.argumentValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.location_hash_id") + public static final SqlColumn locationHashId = annotationAccessArgumentWithName.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.index_order") + public static final SqlColumn indexOrder = annotationAccessArgumentWithName.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_with_name.debug_message") + public static final SqlColumn debugMessage = annotationAccessArgumentWithName.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + public static final class AnnotationAccessArgumentWithName extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn annotationAccessHashId = column("annotation_access_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public final SqlColumn argumentValueHashId = column("argument_value_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public AnnotationAccessArgumentWithName() { + super("annotation_access_argument_with_name"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameMapper.java new file mode 100644 index 00000000..e538db9b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithNameMapper.java @@ -0,0 +1,174 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationAccessArgumentWithNameDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationAccessArgumentWithName; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationAccessArgumentWithNameMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, annotationAccessHashId, typeHashId, argumentValueHashId, locationHashId, indexOrder, debugMessage); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotation_access_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotation_access_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationAccessArgumentWithName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationAccessArgumentWithName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default int insert(AnnotationAccessArgumentWithName record) { + return MyBatis3Utils.insert(this::insert, record, annotationAccessArgumentWithName, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(annotationAccessHashId).toProperty("annotationAccessHashId") + .map(typeHashId).toProperty("typeHashId") + .map(argumentValueHashId).toProperty("argumentValueHashId") + .map(locationHashId).toProperty("locationHashId") + .map(indexOrder).toProperty("indexOrder") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationAccessArgumentWithName, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(annotationAccessHashId).toProperty("annotationAccessHashId") + .map(typeHashId).toProperty("typeHashId") + .map(argumentValueHashId).toProperty("argumentValueHashId") + .map(locationHashId).toProperty("locationHashId") + .map(indexOrder).toProperty("indexOrder") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default int insertSelective(AnnotationAccessArgumentWithName record) { + return MyBatis3Utils.insert(this::insert, record, annotationAccessArgumentWithName, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(annotationAccessHashId).toPropertyWhenPresent("annotationAccessHashId", record::getAnnotationAccessHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + .map(argumentValueHashId).toPropertyWhenPresent("argumentValueHashId", record::getArgumentValueHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationAccessArgumentWithName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationAccessArgumentWithName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationAccessArgumentWithName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationAccessArgumentWithName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + static UpdateDSL updateAllColumns(AnnotationAccessArgumentWithName record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(annotationAccessHashId).equalTo(record::getAnnotationAccessHashId) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(argumentValueHashId).equalTo(record::getArgumentValueHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(debugMessage).equalTo(record::getDebugMessage); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_with_name") + static UpdateDSL updateSelectiveColumns(AnnotationAccessArgumentWithName record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(annotationAccessHashId).equalToWhenPresent(record::getAnnotationAccessHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(argumentValueHashId).equalToWhenPresent(record::getArgumentValueHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameDynamicSqlSupport.java new file mode 100644 index 00000000..68cdd691 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationAccessArgumentWithoutNameDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + public static final AnnotationAccessArgumentWithoutName annotationAccessArgumentWithoutName = new AnnotationAccessArgumentWithoutName(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.element_hash_id") + public static final SqlColumn elementHashId = annotationAccessArgumentWithoutName.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.annotation_access_hash_id") + public static final SqlColumn annotationAccessHashId = annotationAccessArgumentWithoutName.annotationAccessHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.argument_value_hash_id") + public static final SqlColumn argumentValueHashId = annotationAccessArgumentWithoutName.argumentValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.location_hash_id") + public static final SqlColumn locationHashId = annotationAccessArgumentWithoutName.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.index_order") + public static final SqlColumn indexOrder = annotationAccessArgumentWithoutName.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_access_argument_without_name.debug_message") + public static final SqlColumn debugMessage = annotationAccessArgumentWithoutName.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + public static final class AnnotationAccessArgumentWithoutName extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn annotationAccessHashId = column("annotation_access_hash_id", JDBCType.BIGINT); + + public final SqlColumn argumentValueHashId = column("argument_value_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public AnnotationAccessArgumentWithoutName() { + super("annotation_access_argument_without_name"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameMapper.java new file mode 100644 index 00000000..c4974132 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationAccessArgumentWithoutNameMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationAccessArgumentWithoutNameDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationAccessArgumentWithoutName; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationAccessArgumentWithoutNameMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, annotationAccessHashId, argumentValueHashId, locationHashId, indexOrder, debugMessage); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotation_access_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotation_access_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationAccessArgumentWithoutName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationAccessArgumentWithoutName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default int insert(AnnotationAccessArgumentWithoutName record) { + return MyBatis3Utils.insert(this::insert, record, annotationAccessArgumentWithoutName, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(annotationAccessHashId).toProperty("annotationAccessHashId") + .map(argumentValueHashId).toProperty("argumentValueHashId") + .map(locationHashId).toProperty("locationHashId") + .map(indexOrder).toProperty("indexOrder") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationAccessArgumentWithoutName, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(annotationAccessHashId).toProperty("annotationAccessHashId") + .map(argumentValueHashId).toProperty("argumentValueHashId") + .map(locationHashId).toProperty("locationHashId") + .map(indexOrder).toProperty("indexOrder") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default int insertSelective(AnnotationAccessArgumentWithoutName record) { + return MyBatis3Utils.insert(this::insert, record, annotationAccessArgumentWithoutName, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(annotationAccessHashId).toPropertyWhenPresent("annotationAccessHashId", record::getAnnotationAccessHashId) + .map(argumentValueHashId).toPropertyWhenPresent("argumentValueHashId", record::getArgumentValueHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationAccessArgumentWithoutName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationAccessArgumentWithoutName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationAccessArgumentWithoutName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationAccessArgumentWithoutName, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + static UpdateDSL updateAllColumns(AnnotationAccessArgumentWithoutName record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(annotationAccessHashId).equalTo(record::getAnnotationAccessHashId) + .set(argumentValueHashId).equalTo(record::getArgumentValueHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(debugMessage).equalTo(record::getDebugMessage); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_access_argument_without_name") + static UpdateDSL updateSelectiveColumns(AnnotationAccessArgumentWithoutName record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(annotationAccessHashId).equalToWhenPresent(record::getAnnotationAccessHashId) + .set(argumentValueHashId).equalToWhenPresent(record::getArgumentValueHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerDynamicSqlSupport.java new file mode 100644 index 00000000..5b98623d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationArrayInitializerDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + public static final AnnotationArrayInitializer annotationArrayInitializer = new AnnotationArrayInitializer(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.element_hash_id") + public static final SqlColumn elementHashId = annotationArrayInitializer.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.debug_message") + public static final SqlColumn debugMessage = annotationArrayInitializer.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.parent_hash_id") + public static final SqlColumn parentHashId = annotationArrayInitializer.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_array_initializer.location_hash_id") + public static final SqlColumn locationHashId = annotationArrayInitializer.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + public static final class AnnotationArrayInitializer extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public AnnotationArrayInitializer() { + super("annotation_array_initializer"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerMapper.java new file mode 100644 index 00000000..22460757 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationArrayInitializerMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationArrayInitializerDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationArrayInitializer; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationArrayInitializerMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, debugMessage, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationArrayInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationArrayInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default int insert(AnnotationArrayInitializer record) { + return MyBatis3Utils.insert(this::insert, record, annotationArrayInitializer, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationArrayInitializer, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default int insertSelective(AnnotationArrayInitializer record) { + return MyBatis3Utils.insert(this::insert, record, annotationArrayInitializer, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationArrayInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationArrayInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationArrayInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationArrayInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + static UpdateDSL updateAllColumns(AnnotationArrayInitializer record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_array_initializer") + static UpdateDSL updateSelectiveColumns(AnnotationArrayInitializer record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedDynamicSqlSupport.java new file mode 100644 index 00000000..0ba4a060 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationCanNotResolvedDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + public static final AnnotationCanNotResolved annotationCanNotResolved = new AnnotationCanNotResolved(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.element_hash_id") + public static final SqlColumn elementHashId = annotationCanNotResolved.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.name") + public static final SqlColumn name = annotationCanNotResolved.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.location_hash_id") + public static final SqlColumn locationHashId = annotationCanNotResolved.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.debug_message") + public static final SqlColumn debugMessage = annotationCanNotResolved.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_not_resolved.parent_hash_id") + public static final SqlColumn parentHashId = annotationCanNotResolved.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + public static final class AnnotationCanNotResolved extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public AnnotationCanNotResolved() { + super("annotation_can_not_resolved"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedMapper.java new file mode 100644 index 00000000..f1ff49db --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanNotResolvedMapper.java @@ -0,0 +1,197 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationCanNotResolvedDynamicSqlSupport.*; +import static org.mybatis.dynamic.sql.SqlBuilder.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationCanNotResolved; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationCanNotResolvedMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, locationHashId, debugMessage, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationCanNotResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationCanNotResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int deleteByPrimaryKey(Long elementHashId_) { + return delete(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int insert(AnnotationCanNotResolved record) { + return MyBatis3Utils.insert(this::insert, record, annotationCanNotResolved, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationCanNotResolved, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int insertSelective(AnnotationCanNotResolved record) { + return MyBatis3Utils.insert(this::insert, record, annotationCanNotResolved, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationCanNotResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationCanNotResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationCanNotResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default Optional selectByPrimaryKey(Long elementHashId_) { + return selectOne(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationCanNotResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + static UpdateDSL updateAllColumns(AnnotationCanNotResolved record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + static UpdateDSL updateSelectiveColumns(AnnotationCanNotResolved record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int updateByPrimaryKey(AnnotationCanNotResolved record) { + return update(c -> + c.set(name).equalTo(record::getName) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_not_resolved") + default int updateByPrimaryKeySelective(AnnotationCanNotResolved record) { + return update(c -> + c.set(name).equalToWhenPresent(record::getName) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedDynamicSqlSupport.java new file mode 100644 index 00000000..6e31af5a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationCanResolvedDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + public static final AnnotationCanResolved annotationCanResolved = new AnnotationCanResolved(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.element_hash_id") + public static final SqlColumn elementHashId = annotationCanResolved.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.name") + public static final SqlColumn name = annotationCanResolved.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.annotation_declaration_hash_id") + public static final SqlColumn annotationDeclarationHashId = annotationCanResolved.annotationDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.location_hash_id") + public static final SqlColumn locationHashId = annotationCanResolved.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.debug_message") + public static final SqlColumn debugMessage = annotationCanResolved.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_can_resolved.parent_hash_id") + public static final SqlColumn parentHashId = annotationCanResolved.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + public static final class AnnotationCanResolved extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn annotationDeclarationHashId = column("annotation_declaration_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public AnnotationCanResolved() { + super("annotation_can_resolved"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedMapper.java new file mode 100644 index 00000000..38886271 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationCanResolvedMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationCanResolvedDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationCanResolved; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationCanResolvedMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, annotationDeclarationHashId, locationHashId, debugMessage, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="annotation_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="annotation_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationCanResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationCanResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default int insert(AnnotationCanResolved record) { + return MyBatis3Utils.insert(this::insert, record, annotationCanResolved, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(annotationDeclarationHashId).toProperty("annotationDeclarationHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationCanResolved, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(annotationDeclarationHashId).toProperty("annotationDeclarationHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default int insertSelective(AnnotationCanResolved record) { + return MyBatis3Utils.insert(this::insert, record, annotationCanResolved, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(annotationDeclarationHashId).toPropertyWhenPresent("annotationDeclarationHashId", record::getAnnotationDeclarationHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationCanResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationCanResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationCanResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationCanResolved, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + static UpdateDSL updateAllColumns(AnnotationCanResolved record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(annotationDeclarationHashId).equalTo(record::getAnnotationDeclarationHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_can_resolved") + static UpdateDSL updateSelectiveColumns(AnnotationCanResolved record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(annotationDeclarationHashId).equalToWhenPresent(record::getAnnotationDeclarationHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationDynamicSqlSupport.java new file mode 100644 index 00000000..c7b667cd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationDeclarationDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + public static final AnnotationDeclaration annotationDeclaration = new AnnotationDeclaration(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.element_hash_id") + public static final SqlColumn elementHashId = annotationDeclaration.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration.qualified_name") + public static final SqlColumn qualifiedName = annotationDeclaration.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + public static final class AnnotationDeclaration extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public AnnotationDeclaration() { + super("annotation_declaration"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationMapper.java new file mode 100644 index 00000000..b98d3933 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationDeclarationDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationDeclaration; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationDeclarationMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifiedName); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationDeclaration, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationDeclaration, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default int insert(AnnotationDeclaration record) { + return MyBatis3Utils.insert(this::insert, record, annotationDeclaration, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationDeclaration, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default int insertSelective(AnnotationDeclaration record) { + return MyBatis3Utils.insert(this::insert, record, annotationDeclaration, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationDeclaration, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationDeclaration, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationDeclaration, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationDeclaration, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + static UpdateDSL updateAllColumns(AnnotationDeclaration record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifiedName).equalTo(record::getQualifiedName); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration") + static UpdateDSL updateSelectiveColumns(AnnotationDeclaration record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueDynamicSqlSupport.java new file mode 100644 index 00000000..f7827c9b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationDeclarationParameterDefaultValueDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + public static final AnnotationDeclarationParameterDefaultValue annotationDeclarationParameterDefaultValue = new AnnotationDeclarationParameterDefaultValue(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.element_hash_id") + public static final SqlColumn elementHashId = annotationDeclarationParameterDefaultValue.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter_default_value.default_value") + public static final SqlColumn defaultValue = annotationDeclarationParameterDefaultValue.defaultValue; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + public static final class AnnotationDeclarationParameterDefaultValue extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn defaultValue = column("default_value", JDBCType.VARCHAR); + + public AnnotationDeclarationParameterDefaultValue() { + super("annotation_declaration_parameter_default_value"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueMapper.java new file mode 100644 index 00000000..9055ce6d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDefaultValueMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationDeclarationParameterDefaultValueDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationDeclarationParameterDefaultValue; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationDeclarationParameterDefaultValueMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, defaultValue); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="default_value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="default_value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationDeclarationParameterDefaultValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationDeclarationParameterDefaultValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default int insert(AnnotationDeclarationParameterDefaultValue record) { + return MyBatis3Utils.insert(this::insert, record, annotationDeclarationParameterDefaultValue, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(defaultValue).toProperty("defaultValue") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationDeclarationParameterDefaultValue, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(defaultValue).toProperty("defaultValue") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default int insertSelective(AnnotationDeclarationParameterDefaultValue record) { + return MyBatis3Utils.insert(this::insert, record, annotationDeclarationParameterDefaultValue, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(defaultValue).toPropertyWhenPresent("defaultValue", record::getDefaultValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationDeclarationParameterDefaultValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationDeclarationParameterDefaultValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationDeclarationParameterDefaultValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationDeclarationParameterDefaultValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + static UpdateDSL updateAllColumns(AnnotationDeclarationParameterDefaultValue record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(defaultValue).equalTo(record::getDefaultValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter_default_value") + static UpdateDSL updateSelectiveColumns(AnnotationDeclarationParameterDefaultValue record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(defaultValue).equalToWhenPresent(record::getDefaultValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDynamicSqlSupport.java new file mode 100644 index 00000000..39dfaadd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnnotationDeclarationParameterDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + public static final AnnotationDeclarationParameter annotationDeclarationParameter = new AnnotationDeclarationParameter(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.element_hash_id") + public static final SqlColumn elementHashId = annotationDeclarationParameter.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.annotation_declaration_hash_id") + public static final SqlColumn annotationDeclarationHashId = annotationDeclarationParameter.annotationDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.type_hash_id") + public static final SqlColumn typeHashId = annotationDeclarationParameter.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.parameter_value_hash_id") + public static final SqlColumn parameterValueHashId = annotationDeclarationParameter.parameterValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.location_hash_id") + public static final SqlColumn locationHashId = annotationDeclarationParameter.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: annotation_declaration_parameter.debug_message") + public static final SqlColumn debugMessage = annotationDeclarationParameter.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + public static final class AnnotationDeclarationParameter extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn annotationDeclarationHashId = column("annotation_declaration_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public final SqlColumn parameterValueHashId = column("parameter_value_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public AnnotationDeclarationParameter() { + super("annotation_declaration_parameter"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterMapper.java new file mode 100644 index 00000000..00cb1e50 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnnotationDeclarationParameterMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnnotationDeclarationParameterDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnnotationDeclarationParameter; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnnotationDeclarationParameterMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, annotationDeclarationHashId, typeHashId, parameterValueHashId, locationHashId, debugMessage); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotation_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parameter_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="annotation_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parameter_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, annotationDeclarationParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, annotationDeclarationParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default int insert(AnnotationDeclarationParameter record) { + return MyBatis3Utils.insert(this::insert, record, annotationDeclarationParameter, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(annotationDeclarationHashId).toProperty("annotationDeclarationHashId") + .map(typeHashId).toProperty("typeHashId") + .map(parameterValueHashId).toProperty("parameterValueHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, annotationDeclarationParameter, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(annotationDeclarationHashId).toProperty("annotationDeclarationHashId") + .map(typeHashId).toProperty("typeHashId") + .map(parameterValueHashId).toProperty("parameterValueHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default int insertSelective(AnnotationDeclarationParameter record) { + return MyBatis3Utils.insert(this::insert, record, annotationDeclarationParameter, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(annotationDeclarationHashId).toPropertyWhenPresent("annotationDeclarationHashId", record::getAnnotationDeclarationHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + .map(parameterValueHashId).toPropertyWhenPresent("parameterValueHashId", record::getParameterValueHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, annotationDeclarationParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, annotationDeclarationParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, annotationDeclarationParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, annotationDeclarationParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + static UpdateDSL updateAllColumns(AnnotationDeclarationParameter record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(annotationDeclarationHashId).equalTo(record::getAnnotationDeclarationHashId) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(parameterValueHashId).equalTo(record::getParameterValueHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: annotation_declaration_parameter") + static UpdateDSL updateSelectiveColumns(AnnotationDeclarationParameter record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(annotationDeclarationHashId).equalToWhenPresent(record::getAnnotationDeclarationHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(parameterValueHashId).equalToWhenPresent(record::getParameterValueHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassDynamicSqlSupport.java new file mode 100644 index 00000000..132a1f04 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AnonymousClassDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + public static final AnonymousClass anonymousClass = new AnonymousClass(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.element_hash_id") + public static final SqlColumn elementHashId = anonymousClass.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_reference_hash_id") + public static final SqlColumn baseClassReferenceHashId = anonymousClass.baseClassReferenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.base_class_type_hash_id") + public static final SqlColumn baseClassTypeHashId = anonymousClass.baseClassTypeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.location_hash_id") + public static final SqlColumn locationHashId = anonymousClass.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: anonymous_class.parent_hash_id") + public static final SqlColumn parentHashId = anonymousClass.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + public static final class AnonymousClass extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn baseClassReferenceHashId = column("base_class_reference_hash_id", JDBCType.BIGINT); + + public final SqlColumn baseClassTypeHashId = column("base_class_type_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public AnonymousClass() { + super("anonymous_class"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassMapper.java new file mode 100644 index 00000000..858b4d67 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AnonymousClassMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AnonymousClassDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AnonymousClass; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AnonymousClassMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, baseClassReferenceHashId, baseClassTypeHashId, locationHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="base_class_reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="base_class_type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="base_class_reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="base_class_type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, anonymousClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, anonymousClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default int insert(AnonymousClass record) { + return MyBatis3Utils.insert(this::insert, record, anonymousClass, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(baseClassReferenceHashId).toProperty("baseClassReferenceHashId") + .map(baseClassTypeHashId).toProperty("baseClassTypeHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, anonymousClass, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(baseClassReferenceHashId).toProperty("baseClassReferenceHashId") + .map(baseClassTypeHashId).toProperty("baseClassTypeHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default int insertSelective(AnonymousClass record) { + return MyBatis3Utils.insert(this::insert, record, anonymousClass, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(baseClassReferenceHashId).toPropertyWhenPresent("baseClassReferenceHashId", record::getBaseClassReferenceHashId) + .map(baseClassTypeHashId).toPropertyWhenPresent("baseClassTypeHashId", record::getBaseClassTypeHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, anonymousClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, anonymousClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, anonymousClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, anonymousClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + static UpdateDSL updateAllColumns(AnonymousClass record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(baseClassReferenceHashId).equalTo(record::getBaseClassReferenceHashId) + .set(baseClassTypeHashId).equalTo(record::getBaseClassTypeHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: anonymous_class") + static UpdateDSL updateSelectiveColumns(AnonymousClass record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(baseClassReferenceHashId).equalToWhenPresent(record::getBaseClassReferenceHashId) + .set(baseClassTypeHashId).equalToWhenPresent(record::getBaseClassTypeHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..9e507faa --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ArrayAccessExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + public static final ArrayAccessExpression arrayAccessExpression = new ArrayAccessExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.element_hash_id") + public static final SqlColumn elementHashId = arrayAccessExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.index_expression_hash_id") + public static final SqlColumn indexExpressionHashId = arrayAccessExpression.indexExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_access_expression.array_expression_hash_id") + public static final SqlColumn arrayExpressionHashId = arrayAccessExpression.arrayExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + public static final class ArrayAccessExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexExpressionHashId = column("index_expression_hash_id", JDBCType.BIGINT); + + public final SqlColumn arrayExpressionHashId = column("array_expression_hash_id", JDBCType.BIGINT); + + public ArrayAccessExpression() { + super("array_access_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionMapper.java new file mode 100644 index 00000000..24cb6421 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayAccessExpressionMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ArrayAccessExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ArrayAccessExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ArrayAccessExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, indexExpressionHashId, arrayExpressionHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="array_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="array_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, arrayAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, arrayAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default int insert(ArrayAccessExpression record) { + return MyBatis3Utils.insert(this::insert, record, arrayAccessExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(indexExpressionHashId).toProperty("indexExpressionHashId") + .map(arrayExpressionHashId).toProperty("arrayExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, arrayAccessExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(indexExpressionHashId).toProperty("indexExpressionHashId") + .map(arrayExpressionHashId).toProperty("arrayExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default int insertSelective(ArrayAccessExpression record) { + return MyBatis3Utils.insert(this::insert, record, arrayAccessExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(indexExpressionHashId).toPropertyWhenPresent("indexExpressionHashId", record::getIndexExpressionHashId) + .map(arrayExpressionHashId).toPropertyWhenPresent("arrayExpressionHashId", record::getArrayExpressionHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, arrayAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, arrayAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, arrayAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, arrayAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + static UpdateDSL updateAllColumns(ArrayAccessExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(indexExpressionHashId).equalTo(record::getIndexExpressionHashId) + .set(arrayExpressionHashId).equalTo(record::getArrayExpressionHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_access_expression") + static UpdateDSL updateSelectiveColumns(ArrayAccessExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(indexExpressionHashId).equalToWhenPresent(record::getIndexExpressionHashId) + .set(arrayExpressionHashId).equalToWhenPresent(record::getArrayExpressionHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..4059fc2a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ArrayCreationExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + public static final ArrayCreationExpression arrayCreationExpression = new ArrayCreationExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.element_hash_id") + public static final SqlColumn elementHashId = arrayCreationExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.number_of_array_dimension") + public static final SqlColumn numberOfArrayDimension = arrayCreationExpression.numberOfArrayDimension; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_creation_expression.type_hash_id") + public static final SqlColumn typeHashId = arrayCreationExpression.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + public static final class ArrayCreationExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn numberOfArrayDimension = column("number_of_array_dimension", JDBCType.INTEGER); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public ArrayCreationExpression() { + super("array_creation_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionMapper.java new file mode 100644 index 00000000..9c5f1f03 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayCreationExpressionMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ArrayCreationExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ArrayCreationExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ArrayCreationExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, numberOfArrayDimension, typeHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="number_of_array_dimension", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="number_of_array_dimension", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, arrayCreationExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, arrayCreationExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default int insert(ArrayCreationExpression record) { + return MyBatis3Utils.insert(this::insert, record, arrayCreationExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(numberOfArrayDimension).toProperty("numberOfArrayDimension") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, arrayCreationExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(numberOfArrayDimension).toProperty("numberOfArrayDimension") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default int insertSelective(ArrayCreationExpression record) { + return MyBatis3Utils.insert(this::insert, record, arrayCreationExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(numberOfArrayDimension).toPropertyWhenPresent("numberOfArrayDimension", record::getNumberOfArrayDimension) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, arrayCreationExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, arrayCreationExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, arrayCreationExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, arrayCreationExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + static UpdateDSL updateAllColumns(ArrayCreationExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(numberOfArrayDimension).equalTo(record::getNumberOfArrayDimension) + .set(typeHashId).equalTo(record::getTypeHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_creation_expression") + static UpdateDSL updateSelectiveColumns(ArrayCreationExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(numberOfArrayDimension).equalToWhenPresent(record::getNumberOfArrayDimension) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayDynamicSqlSupport.java new file mode 100644 index 00000000..b023233f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ArrayDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + public static final Array array = new Array(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.element_hash_id") + public static final SqlColumn elementHashId = array.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array.name") + public static final SqlColumn name = array.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + public static final class Array extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public Array() { + super("array"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..560f3cd1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ArrayInitializerExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + public static final ArrayInitializerExpression arrayInitializerExpression = new ArrayInitializerExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.element_hash_id") + public static final SqlColumn elementHashId = arrayInitializerExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: array_initializer_expression.type_hash_id") + public static final SqlColumn typeHashId = arrayInitializerExpression.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + public static final class ArrayInitializerExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public ArrayInitializerExpression() { + super("array_initializer_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionMapper.java new file mode 100644 index 00000000..67101653 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayInitializerExpressionMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ArrayInitializerExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ArrayInitializerExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ArrayInitializerExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, typeHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, arrayInitializerExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, arrayInitializerExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default int insert(ArrayInitializerExpression record) { + return MyBatis3Utils.insert(this::insert, record, arrayInitializerExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, arrayInitializerExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default int insertSelective(ArrayInitializerExpression record) { + return MyBatis3Utils.insert(this::insert, record, arrayInitializerExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, arrayInitializerExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, arrayInitializerExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, arrayInitializerExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, arrayInitializerExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + static UpdateDSL updateAllColumns(ArrayInitializerExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(typeHashId).equalTo(record::getTypeHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array_initializer_expression") + static UpdateDSL updateSelectiveColumns(ArrayInitializerExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayMapper.java new file mode 100644 index 00000000..2db08734 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ArrayMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ArrayDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Array; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ArrayMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, array, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, array, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default int insert(Array record) { + return MyBatis3Utils.insert(this::insert, record, array, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, array, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default int insertSelective(Array record) { + return MyBatis3Utils.insert(this::insert, record, array, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, array, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, array, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, array, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, array, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + static UpdateDSL updateAllColumns(Array record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: array") + static UpdateDSL updateSelectiveColumns(Array record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementDynamicSqlSupport.java new file mode 100644 index 00000000..952904cd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AssertStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + public static final AssertStatement assertStatement = new AssertStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.element_hash_id") + public static final SqlColumn elementHashId = assertStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_condition_hash_id") + public static final SqlColumn assertConditionHashId = assertStatement.assertConditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assert_statement.assert_description_hash_id") + public static final SqlColumn assertDescriptionHashId = assertStatement.assertDescriptionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + public static final class AssertStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn assertConditionHashId = column("assert_condition_hash_id", JDBCType.BIGINT); + + public final SqlColumn assertDescriptionHashId = column("assert_description_hash_id", JDBCType.BIGINT); + + public AssertStatement() { + super("assert_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementMapper.java new file mode 100644 index 00000000..14090846 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssertStatementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AssertStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AssertStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AssertStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, assertConditionHashId, assertDescriptionHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="assert_condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="assert_description_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="assert_condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="assert_description_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, assertStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, assertStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default int insert(AssertStatement record) { + return MyBatis3Utils.insert(this::insert, record, assertStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(assertConditionHashId).toProperty("assertConditionHashId") + .map(assertDescriptionHashId).toProperty("assertDescriptionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, assertStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(assertConditionHashId).toProperty("assertConditionHashId") + .map(assertDescriptionHashId).toProperty("assertDescriptionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default int insertSelective(AssertStatement record) { + return MyBatis3Utils.insert(this::insert, record, assertStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(assertConditionHashId).toPropertyWhenPresent("assertConditionHashId", record::getAssertConditionHashId) + .map(assertDescriptionHashId).toPropertyWhenPresent("assertDescriptionHashId", record::getAssertDescriptionHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, assertStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, assertStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, assertStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, assertStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + static UpdateDSL updateAllColumns(AssertStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(assertConditionHashId).equalTo(record::getAssertConditionHashId) + .set(assertDescriptionHashId).equalTo(record::getAssertDescriptionHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assert_statement") + static UpdateDSL updateSelectiveColumns(AssertStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(assertConditionHashId).equalToWhenPresent(record::getAssertConditionHashId) + .set(assertDescriptionHashId).equalToWhenPresent(record::getAssertDescriptionHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..17e8f54f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class AssignmentExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + public static final AssignmentExpression assignmentExpression = new AssignmentExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.element_hash_id") + public static final SqlColumn elementHashId = assignmentExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.lhs_hash_id") + public static final SqlColumn lhsHashId = assignmentExpression.lhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.rhs_hash_id") + public static final SqlColumn rhsHashId = assignmentExpression.rhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: assignment_expression.opcode") + public static final SqlColumn opcode = assignmentExpression.opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + public static final class AssignmentExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn lhsHashId = column("lhs_hash_id", JDBCType.BIGINT); + + public final SqlColumn rhsHashId = column("rhs_hash_id", JDBCType.BIGINT); + + public final SqlColumn opcode = column("opcode", JDBCType.VARCHAR); + + public AssignmentExpression() { + super("assignment_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionMapper.java new file mode 100644 index 00000000..c3e6afc7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/AssignmentExpressionMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.AssignmentExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.AssignmentExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface AssignmentExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, lhsHashId, rhsHashId, opcode); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="lhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="rhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="lhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="rhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, assignmentExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, assignmentExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default int insert(AssignmentExpression record) { + return MyBatis3Utils.insert(this::insert, record, assignmentExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(lhsHashId).toProperty("lhsHashId") + .map(rhsHashId).toProperty("rhsHashId") + .map(opcode).toProperty("opcode") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, assignmentExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(lhsHashId).toProperty("lhsHashId") + .map(rhsHashId).toProperty("rhsHashId") + .map(opcode).toProperty("opcode") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default int insertSelective(AssignmentExpression record) { + return MyBatis3Utils.insert(this::insert, record, assignmentExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(lhsHashId).toPropertyWhenPresent("lhsHashId", record::getLhsHashId) + .map(rhsHashId).toPropertyWhenPresent("rhsHashId", record::getRhsHashId) + .map(opcode).toPropertyWhenPresent("opcode", record::getOpcode) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, assignmentExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, assignmentExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, assignmentExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, assignmentExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + static UpdateDSL updateAllColumns(AssignmentExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(lhsHashId).equalTo(record::getLhsHashId) + .set(rhsHashId).equalTo(record::getRhsHashId) + .set(opcode).equalTo(record::getOpcode); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: assignment_expression") + static UpdateDSL updateSelectiveColumns(AssignmentExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(lhsHashId).equalToWhenPresent(record::getLhsHashId) + .set(rhsHashId).equalToWhenPresent(record::getRhsHashId) + .set(opcode).equalToWhenPresent(record::getOpcode); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..588358ae --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class BinaryExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + public static final BinaryExpression binaryExpression = new BinaryExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.element_hash_id") + public static final SqlColumn elementHashId = binaryExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.lhs_hash_id") + public static final SqlColumn lhsHashId = binaryExpression.lhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.rhs_hash_id") + public static final SqlColumn rhsHashId = binaryExpression.rhsHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: binary_expression.opcode") + public static final SqlColumn opcode = binaryExpression.opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + public static final class BinaryExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn lhsHashId = column("lhs_hash_id", JDBCType.BIGINT); + + public final SqlColumn rhsHashId = column("rhs_hash_id", JDBCType.BIGINT); + + public final SqlColumn opcode = column("opcode", JDBCType.VARCHAR); + + public BinaryExpression() { + super("binary_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionMapper.java new file mode 100644 index 00000000..a78e6178 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BinaryExpressionMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.BinaryExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.BinaryExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface BinaryExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, lhsHashId, rhsHashId, opcode); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="lhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="rhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="lhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="rhs_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, binaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, binaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default int insert(BinaryExpression record) { + return MyBatis3Utils.insert(this::insert, record, binaryExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(lhsHashId).toProperty("lhsHashId") + .map(rhsHashId).toProperty("rhsHashId") + .map(opcode).toProperty("opcode") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, binaryExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(lhsHashId).toProperty("lhsHashId") + .map(rhsHashId).toProperty("rhsHashId") + .map(opcode).toProperty("opcode") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default int insertSelective(BinaryExpression record) { + return MyBatis3Utils.insert(this::insert, record, binaryExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(lhsHashId).toPropertyWhenPresent("lhsHashId", record::getLhsHashId) + .map(rhsHashId).toPropertyWhenPresent("rhsHashId", record::getRhsHashId) + .map(opcode).toPropertyWhenPresent("opcode", record::getOpcode) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, binaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, binaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, binaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, binaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + static UpdateDSL updateAllColumns(BinaryExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(lhsHashId).equalTo(record::getLhsHashId) + .set(rhsHashId).equalTo(record::getRhsHashId) + .set(opcode).equalTo(record::getOpcode); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: binary_expression") + static UpdateDSL updateSelectiveColumns(BinaryExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(lhsHashId).equalToWhenPresent(record::getLhsHashId) + .set(rhsHashId).equalToWhenPresent(record::getRhsHashId) + .set(opcode).equalToWhenPresent(record::getOpcode); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementDynamicSqlSupport.java new file mode 100644 index 00000000..41f119f6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class BlockStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + public static final BlockStatement blockStatement = new BlockStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.element_hash_id") + public static final SqlColumn elementHashId = blockStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: block_statement.code_block_hash_id") + public static final SqlColumn codeBlockHashId = blockStatement.codeBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + public static final class BlockStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn codeBlockHashId = column("code_block_hash_id", JDBCType.BIGINT); + + public BlockStatement() { + super("block_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementMapper.java new file mode 100644 index 00000000..a7d74634 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BlockStatementMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.BlockStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.BlockStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface BlockStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, codeBlockHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="code_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="code_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, blockStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, blockStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default int insert(BlockStatement record) { + return MyBatis3Utils.insert(this::insert, record, blockStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(codeBlockHashId).toProperty("codeBlockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, blockStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(codeBlockHashId).toProperty("codeBlockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default int insertSelective(BlockStatement record) { + return MyBatis3Utils.insert(this::insert, record, blockStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(codeBlockHashId).toPropertyWhenPresent("codeBlockHashId", record::getCodeBlockHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, blockStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, blockStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, blockStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, blockStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + static UpdateDSL updateAllColumns(BlockStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(codeBlockHashId).equalTo(record::getCodeBlockHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: block_statement") + static UpdateDSL updateSelectiveColumns(BlockStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(codeBlockHashId).equalToWhenPresent(record::getCodeBlockHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..72dc84ae --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class BooleanLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + public static final BooleanLiteral booleanLiteral = new BooleanLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.element_hash_id") + public static final SqlColumn elementHashId = booleanLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: boolean_literal.value") + public static final SqlColumn value = booleanLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + public static final class BooleanLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public BooleanLiteral() { + super("boolean_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralMapper.java new file mode 100644 index 00000000..e253b8f9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BooleanLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.BooleanLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.BooleanLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface BooleanLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, booleanLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, booleanLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default int insert(BooleanLiteral record) { + return MyBatis3Utils.insert(this::insert, record, booleanLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, booleanLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default int insertSelective(BooleanLiteral record) { + return MyBatis3Utils.insert(this::insert, record, booleanLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, booleanLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, booleanLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, booleanLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, booleanLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + static UpdateDSL updateAllColumns(BooleanLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: boolean_literal") + static UpdateDSL updateSelectiveColumns(BooleanLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementDynamicSqlSupport.java new file mode 100644 index 00000000..76407440 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class BreakStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + public static final BreakStatement breakStatement = new BreakStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.element_hash_id") + public static final SqlColumn elementHashId = breakStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: break_statement.exited_statement_hash_id") + public static final SqlColumn exitedStatementHashId = breakStatement.exitedStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + public static final class BreakStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn exitedStatementHashId = column("exited_statement_hash_id", JDBCType.BIGINT); + + public BreakStatement() { + super("break_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementMapper.java new file mode 100644 index 00000000..36de3b7d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/BreakStatementMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.BreakStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.BreakStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface BreakStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, exitedStatementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="exited_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="exited_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, breakStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, breakStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default int insert(BreakStatement record) { + return MyBatis3Utils.insert(this::insert, record, breakStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(exitedStatementHashId).toProperty("exitedStatementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, breakStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(exitedStatementHashId).toProperty("exitedStatementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default int insertSelective(BreakStatement record) { + return MyBatis3Utils.insert(this::insert, record, breakStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(exitedStatementHashId).toPropertyWhenPresent("exitedStatementHashId", record::getExitedStatementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, breakStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, breakStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, breakStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, breakStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + static UpdateDSL updateAllColumns(BreakStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(exitedStatementHashId).equalTo(record::getExitedStatementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: break_statement") + static UpdateDSL updateSelectiveColumns(BreakStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(exitedStatementHashId).equalToWhenPresent(record::getExitedStatementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingDynamicSqlSupport.java new file mode 100644 index 00000000..d46c4900 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CallableBindingDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + public static final CallableBinding callableBinding = new CallableBinding(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.caller_hash_id") + public static final SqlColumn callerHashId = callableBinding.callerHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_binding.callee_hash_id") + public static final SqlColumn calleeHashId = callableBinding.calleeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + public static final class CallableBinding extends SqlTable { + public final SqlColumn callerHashId = column("caller_hash_id", JDBCType.BIGINT); + + public final SqlColumn calleeHashId = column("callee_hash_id", JDBCType.BIGINT); + + public CallableBinding() { + super("callable_binding"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingMapper.java new file mode 100644 index 00000000..f8ad58ff --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableBindingMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CallableBindingDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.CallableBinding; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CallableBindingMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + BasicColumn[] selectList = BasicColumn.columnList(callerHashId, calleeHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="caller_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callee_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="caller_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callee_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, callableBinding, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, callableBinding, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default int insert(CallableBinding record) { + return MyBatis3Utils.insert(this::insert, record, callableBinding, c -> + c.map(callerHashId).toProperty("callerHashId") + .map(calleeHashId).toProperty("calleeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, callableBinding, c -> + c.map(callerHashId).toProperty("callerHashId") + .map(calleeHashId).toProperty("calleeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default int insertSelective(CallableBinding record) { + return MyBatis3Utils.insert(this::insert, record, callableBinding, c -> + c.map(callerHashId).toPropertyWhenPresent("callerHashId", record::getCallerHashId) + .map(calleeHashId).toPropertyWhenPresent("calleeHashId", record::getCalleeHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, callableBinding, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, callableBinding, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, callableBinding, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, callableBinding, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + static UpdateDSL updateAllColumns(CallableBinding record, UpdateDSL dsl) { + return dsl.set(callerHashId).equalTo(record::getCallerHashId) + .set(calleeHashId).equalTo(record::getCalleeHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_binding") + static UpdateDSL updateSelectiveColumns(CallableBinding record, UpdateDSL dsl) { + return dsl.set(callerHashId).equalToWhenPresent(record::getCallerHashId) + .set(calleeHashId).equalToWhenPresent(record::getCalleeHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..8a02c5d9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CallableEnclosingExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + public static final CallableEnclosingExpression callableEnclosingExpression = new CallableEnclosingExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.expression_hash_id") + public static final SqlColumn expressionHashId = callableEnclosingExpression.expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_expression.callable_hash_id") + public static final SqlColumn callableHashId = callableEnclosingExpression.callableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + public static final class CallableEnclosingExpression extends SqlTable { + public final SqlColumn expressionHashId = column("expression_hash_id", JDBCType.BIGINT); + + public final SqlColumn callableHashId = column("callable_hash_id", JDBCType.BIGINT); + + public CallableEnclosingExpression() { + super("callable_enclosing_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionMapper.java new file mode 100644 index 00000000..d2d73475 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingExpressionMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CallableEnclosingExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.CallableEnclosingExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CallableEnclosingExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + BasicColumn[] selectList = BasicColumn.columnList(expressionHashId, callableHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, callableEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, callableEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default int insert(CallableEnclosingExpression record) { + return MyBatis3Utils.insert(this::insert, record, callableEnclosingExpression, c -> + c.map(expressionHashId).toProperty("expressionHashId") + .map(callableHashId).toProperty("callableHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, callableEnclosingExpression, c -> + c.map(expressionHashId).toProperty("expressionHashId") + .map(callableHashId).toProperty("callableHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default int insertSelective(CallableEnclosingExpression record) { + return MyBatis3Utils.insert(this::insert, record, callableEnclosingExpression, c -> + c.map(expressionHashId).toPropertyWhenPresent("expressionHashId", record::getExpressionHashId) + .map(callableHashId).toPropertyWhenPresent("callableHashId", record::getCallableHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, callableEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, callableEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, callableEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, callableEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + static UpdateDSL updateAllColumns(CallableEnclosingExpression record, UpdateDSL dsl) { + return dsl.set(expressionHashId).equalTo(record::getExpressionHashId) + .set(callableHashId).equalTo(record::getCallableHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_expression") + static UpdateDSL updateSelectiveColumns(CallableEnclosingExpression record, UpdateDSL dsl) { + return dsl.set(expressionHashId).equalToWhenPresent(record::getExpressionHashId) + .set(callableHashId).equalToWhenPresent(record::getCallableHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementDynamicSqlSupport.java new file mode 100644 index 00000000..9150009e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CallableEnclosingStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + public static final CallableEnclosingStatement callableEnclosingStatement = new CallableEnclosingStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.statement_hash_id") + public static final SqlColumn statementHashId = callableEnclosingStatement.statementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: callable_enclosing_statement.callable_hash_id") + public static final SqlColumn callableHashId = callableEnclosingStatement.callableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + public static final class CallableEnclosingStatement extends SqlTable { + public final SqlColumn statementHashId = column("statement_hash_id", JDBCType.BIGINT); + + public final SqlColumn callableHashId = column("callable_hash_id", JDBCType.BIGINT); + + public CallableEnclosingStatement() { + super("callable_enclosing_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementMapper.java new file mode 100644 index 00000000..8129e584 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CallableEnclosingStatementMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CallableEnclosingStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.CallableEnclosingStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CallableEnclosingStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + BasicColumn[] selectList = BasicColumn.columnList(statementHashId, callableHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, callableEnclosingStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, callableEnclosingStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default int insert(CallableEnclosingStatement record) { + return MyBatis3Utils.insert(this::insert, record, callableEnclosingStatement, c -> + c.map(statementHashId).toProperty("statementHashId") + .map(callableHashId).toProperty("callableHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, callableEnclosingStatement, c -> + c.map(statementHashId).toProperty("statementHashId") + .map(callableHashId).toProperty("callableHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default int insertSelective(CallableEnclosingStatement record) { + return MyBatis3Utils.insert(this::insert, record, callableEnclosingStatement, c -> + c.map(statementHashId).toPropertyWhenPresent("statementHashId", record::getStatementHashId) + .map(callableHashId).toPropertyWhenPresent("callableHashId", record::getCallableHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, callableEnclosingStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, callableEnclosingStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, callableEnclosingStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, callableEnclosingStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + static UpdateDSL updateAllColumns(CallableEnclosingStatement record, UpdateDSL dsl) { + return dsl.set(statementHashId).equalTo(record::getStatementHashId) + .set(callableHashId).equalTo(record::getCallableHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: callable_enclosing_statement") + static UpdateDSL updateSelectiveColumns(CallableEnclosingStatement record, UpdateDSL dsl) { + return dsl.set(statementHashId).equalToWhenPresent(record::getStatementHashId) + .set(callableHashId).equalToWhenPresent(record::getCallableHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionDynamicSqlSupport.java new file mode 100644 index 00000000..caa126e9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionDynamicSqlSupport.java @@ -0,0 +1,53 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CatchSectionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + public static final CatchSection catchSection = new CatchSection(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.element_hash_id") + public static final SqlColumn elementHashId = catchSection.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.debug_message") + public static final SqlColumn debugMessage = catchSection.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.parameter_hash_id") + public static final SqlColumn parameterHashId = catchSection.parameterHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.type_hash_id") + public static final SqlColumn typeHashId = catchSection.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.location_hash_id") + public static final SqlColumn locationHashId = catchSection.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.try_statement_hash_id") + public static final SqlColumn tryStatementHashId = catchSection.tryStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: catch_section.index_order") + public static final SqlColumn indexOrder = catchSection.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + public static final class CatchSection extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parameterHashId = column("parameter_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn tryStatementHashId = column("try_statement_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public CatchSection() { + super("catch_section"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionMapper.java new file mode 100644 index 00000000..a8cb0c88 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CatchSectionMapper.java @@ -0,0 +1,174 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CatchSectionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.CatchSection; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CatchSectionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, debugMessage, parameterHashId, typeHashId, locationHashId, tryStatementHashId, indexOrder); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parameter_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="try_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parameter_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="try_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, catchSection, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, catchSection, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default int insert(CatchSection record) { + return MyBatis3Utils.insert(this::insert, record, catchSection, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parameterHashId).toProperty("parameterHashId") + .map(typeHashId).toProperty("typeHashId") + .map(locationHashId).toProperty("locationHashId") + .map(tryStatementHashId).toProperty("tryStatementHashId") + .map(indexOrder).toProperty("indexOrder") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, catchSection, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parameterHashId).toProperty("parameterHashId") + .map(typeHashId).toProperty("typeHashId") + .map(locationHashId).toProperty("locationHashId") + .map(tryStatementHashId).toProperty("tryStatementHashId") + .map(indexOrder).toProperty("indexOrder") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default int insertSelective(CatchSection record) { + return MyBatis3Utils.insert(this::insert, record, catchSection, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parameterHashId).toPropertyWhenPresent("parameterHashId", record::getParameterHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(tryStatementHashId).toPropertyWhenPresent("tryStatementHashId", record::getTryStatementHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, catchSection, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, catchSection, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, catchSection, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, catchSection, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + static UpdateDSL updateAllColumns(CatchSection record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parameterHashId).equalTo(record::getParameterHashId) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(tryStatementHashId).equalTo(record::getTryStatementHashId) + .set(indexOrder).equalTo(record::getIndexOrder); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: catch_section") + static UpdateDSL updateSelectiveColumns(CatchSection record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parameterHashId).equalToWhenPresent(record::getParameterHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(tryStatementHashId).equalToWhenPresent(record::getTryStatementHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..7762e82e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CharacterLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + public static final CharacterLiteral characterLiteral = new CharacterLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.element_hash_id") + public static final SqlColumn elementHashId = characterLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: character_literal.value") + public static final SqlColumn value = characterLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + public static final class CharacterLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public CharacterLiteral() { + super("character_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralMapper.java new file mode 100644 index 00000000..9fa55161 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CharacterLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CharacterLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.CharacterLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CharacterLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, characterLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, characterLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default int insert(CharacterLiteral record) { + return MyBatis3Utils.insert(this::insert, record, characterLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, characterLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default int insertSelective(CharacterLiteral record) { + return MyBatis3Utils.insert(this::insert, record, characterLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, characterLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, characterLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, characterLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, characterLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + static UpdateDSL updateAllColumns(CharacterLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: character_literal") + static UpdateDSL updateSelectiveColumns(CharacterLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyDynamicSqlSupport.java new file mode 100644 index 00000000..090320ee --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ClassHierarchyDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + public static final ClassHierarchy classHierarchy = new ClassHierarchy(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.child_hash_id") + public static final SqlColumn childHashId = classHierarchy.childHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_hierarchy.parent_hash_id") + public static final SqlColumn parentHashId = classHierarchy.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + public static final class ClassHierarchy extends SqlTable { + public final SqlColumn childHashId = column("child_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public ClassHierarchy() { + super("class_hierarchy"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyMapper.java new file mode 100644 index 00000000..8db1be1c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassHierarchyMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ClassHierarchyDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ClassHierarchy; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ClassHierarchyMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + BasicColumn[] selectList = BasicColumn.columnList(childHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="child_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="child_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, classHierarchy, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, classHierarchy, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default int insert(ClassHierarchy record) { + return MyBatis3Utils.insert(this::insert, record, classHierarchy, c -> + c.map(childHashId).toProperty("childHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, classHierarchy, c -> + c.map(childHashId).toProperty("childHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default int insertSelective(ClassHierarchy record) { + return MyBatis3Utils.insert(this::insert, record, classHierarchy, c -> + c.map(childHashId).toPropertyWhenPresent("childHashId", record::getChildHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, classHierarchy, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, classHierarchy, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, classHierarchy, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, classHierarchy, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + static UpdateDSL updateAllColumns(ClassHierarchy record, UpdateDSL dsl) { + return dsl.set(childHashId).equalTo(record::getChildHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_hierarchy") + static UpdateDSL updateSelectiveColumns(ClassHierarchy record, UpdateDSL dsl) { + return dsl.set(childHashId).equalToWhenPresent(record::getChildHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListDynamicSqlSupport.java new file mode 100644 index 00000000..a1953e8b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ClassImplementListDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + public static final ClassImplementList classImplementList = new ClassImplementList(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.element_hash_id") + public static final SqlColumn elementHashId = classImplementList.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_implement_list.implemented_element_hash_id") + public static final SqlColumn implementedElementHashId = classImplementList.implementedElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + public static final class ClassImplementList extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn implementedElementHashId = column("implemented_element_hash_id", JDBCType.BIGINT); + + public ClassImplementList() { + super("class_implement_list"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListMapper.java new file mode 100644 index 00000000..94be244f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassImplementListMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ClassImplementListDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ClassImplementList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ClassImplementListMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, implementedElementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="implemented_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="implemented_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, classImplementList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, classImplementList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default int insert(ClassImplementList record) { + return MyBatis3Utils.insert(this::insert, record, classImplementList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(implementedElementHashId).toProperty("implementedElementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, classImplementList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(implementedElementHashId).toProperty("implementedElementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default int insertSelective(ClassImplementList record) { + return MyBatis3Utils.insert(this::insert, record, classImplementList, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(implementedElementHashId).toPropertyWhenPresent("implementedElementHashId", record::getImplementedElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, classImplementList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, classImplementList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, classImplementList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, classImplementList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + static UpdateDSL updateAllColumns(ClassImplementList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(implementedElementHashId).equalTo(record::getImplementedElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_implement_list") + static UpdateDSL updateSelectiveColumns(ClassImplementList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(implementedElementHashId).equalToWhenPresent(record::getImplementedElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerDynamicSqlSupport.java new file mode 100644 index 00000000..1965397f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ClassInitializerDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + public static final ClassInitializer classInitializer = new ClassInitializer(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.element_hash_id") + public static final SqlColumn elementHashId = classInitializer.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.debug_message") + public static final SqlColumn debugMessage = classInitializer.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.parent_hash_id") + public static final SqlColumn parentHashId = classInitializer.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class_initializer.location_hash_id") + public static final SqlColumn locationHashId = classInitializer.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + public static final class ClassInitializer extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public ClassInitializer() { + super("class_initializer"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerMapper.java new file mode 100644 index 00000000..c3243c8a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ClassInitializerMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ClassInitializerDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ClassInitializer; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ClassInitializerMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, debugMessage, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, classInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, classInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default int insert(ClassInitializer record) { + return MyBatis3Utils.insert(this::insert, record, classInitializer, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, classInitializer, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default int insertSelective(ClassInitializer record) { + return MyBatis3Utils.insert(this::insert, record, classInitializer, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, classInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, classInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, classInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, classInitializer, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + static UpdateDSL updateAllColumns(ClassInitializer record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class_initializer") + static UpdateDSL updateSelectiveColumns(ClassInitializer record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockDynamicSqlSupport.java new file mode 100644 index 00000000..571e13df --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CodeBlockDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + public static final CodeBlock codeBlock = new CodeBlock(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.element_hash_id") + public static final SqlColumn elementHashId = codeBlock.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.number_of_statement") + public static final SqlColumn numberOfStatement = codeBlock.numberOfStatement; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.parent_hash_id") + public static final SqlColumn parentHashId = codeBlock.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.is_empty") + public static final SqlColumn isEmpty = codeBlock.isEmpty; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.location_hash_id") + public static final SqlColumn locationHashId = codeBlock.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: code_block.debug_message") + public static final SqlColumn debugMessage = codeBlock.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + public static final class CodeBlock extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn numberOfStatement = column("number_of_statement", JDBCType.INTEGER); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn isEmpty = column("is_empty", JDBCType.INTEGER); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public CodeBlock() { + super("code_block"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockMapper.java new file mode 100644 index 00000000..833d1b22 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CodeBlockMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CodeBlockDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.CodeBlock; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CodeBlockMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, numberOfStatement, parentHashId, isEmpty, locationHashId, debugMessage); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="number_of_statement", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="is_empty", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="number_of_statement", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="is_empty", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, codeBlock, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, codeBlock, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default int insert(CodeBlock record) { + return MyBatis3Utils.insert(this::insert, record, codeBlock, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(numberOfStatement).toProperty("numberOfStatement") + .map(parentHashId).toProperty("parentHashId") + .map(isEmpty).toProperty("isEmpty") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, codeBlock, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(numberOfStatement).toProperty("numberOfStatement") + .map(parentHashId).toProperty("parentHashId") + .map(isEmpty).toProperty("isEmpty") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default int insertSelective(CodeBlock record) { + return MyBatis3Utils.insert(this::insert, record, codeBlock, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(numberOfStatement).toPropertyWhenPresent("numberOfStatement", record::getNumberOfStatement) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(isEmpty).toPropertyWhenPresent("isEmpty", record::getIsEmpty) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, codeBlock, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, codeBlock, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, codeBlock, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, codeBlock, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + static UpdateDSL updateAllColumns(CodeBlock record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(numberOfStatement).equalTo(record::getNumberOfStatement) + .set(parentHashId).equalTo(record::getParentHashId) + .set(isEmpty).equalTo(record::getIsEmpty) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: code_block") + static UpdateDSL updateSelectiveColumns(CodeBlock record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(numberOfStatement).equalToWhenPresent(record::getNumberOfStatement) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(isEmpty).equalToWhenPresent(record::getIsEmpty) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentDynamicSqlSupport.java new file mode 100644 index 00000000..57517612 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CommentDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + public static final Comment comment = new Comment(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.element_hash_id") + public static final SqlColumn elementHashId = comment.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.text") + public static final SqlColumn text = comment.text; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.parent_hash_id") + public static final SqlColumn parentHashId = comment.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.location_hash_id") + public static final SqlColumn locationHashId = comment.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: comment.comment_type") + public static final SqlColumn commentType = comment.commentType; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + public static final class Comment extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn text = column("text", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn commentType = column("comment_type", JDBCType.VARCHAR); + + public Comment() { + super("comment"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentMapper.java new file mode 100644 index 00000000..f4b9bed4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CommentMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CommentDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Comment; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CommentMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, text, parentHashId, locationHashId, commentType); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="text", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="comment_type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="text", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="comment_type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, comment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, comment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default int insert(Comment record) { + return MyBatis3Utils.insert(this::insert, record, comment, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(text).toProperty("text") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(commentType).toProperty("commentType") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, comment, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(text).toProperty("text") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(commentType).toProperty("commentType") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default int insertSelective(Comment record) { + return MyBatis3Utils.insert(this::insert, record, comment, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(text).toPropertyWhenPresent("text", record::getText) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(commentType).toPropertyWhenPresent("commentType", record::getCommentType) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, comment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, comment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, comment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, comment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + static UpdateDSL updateAllColumns(Comment record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(text).equalTo(record::getText) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(commentType).equalTo(record::getCommentType); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: comment") + static UpdateDSL updateSelectiveColumns(Comment record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(text).equalToWhenPresent(record::getText) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(commentType).equalToWhenPresent(record::getCommentType); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..d1731f38 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ConditionalExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + public static final ConditionalExpression conditionalExpression = new ConditionalExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.element_hash_id") + public static final SqlColumn elementHashId = conditionalExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.condition_expression_hash_id") + public static final SqlColumn conditionExpressionHashId = conditionalExpression.conditionExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.then_part_hash_id") + public static final SqlColumn thenPartHashId = conditionalExpression.thenPartHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: conditional_expression.else_part_hash_id") + public static final SqlColumn elsePartHashId = conditionalExpression.elsePartHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + public static final class ConditionalExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn conditionExpressionHashId = column("condition_expression_hash_id", JDBCType.BIGINT); + + public final SqlColumn thenPartHashId = column("then_part_hash_id", JDBCType.BIGINT); + + public final SqlColumn elsePartHashId = column("else_part_hash_id", JDBCType.BIGINT); + + public ConditionalExpression() { + super("conditional_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionMapper.java new file mode 100644 index 00000000..e4a380e6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConditionalExpressionMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ConditionalExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ConditionalExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ConditionalExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, conditionExpressionHashId, thenPartHashId, elsePartHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="then_part_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="else_part_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="then_part_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="else_part_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, conditionalExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, conditionalExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default int insert(ConditionalExpression record) { + return MyBatis3Utils.insert(this::insert, record, conditionalExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionExpressionHashId).toProperty("conditionExpressionHashId") + .map(thenPartHashId).toProperty("thenPartHashId") + .map(elsePartHashId).toProperty("elsePartHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, conditionalExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionExpressionHashId).toProperty("conditionExpressionHashId") + .map(thenPartHashId).toProperty("thenPartHashId") + .map(elsePartHashId).toProperty("elsePartHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default int insertSelective(ConditionalExpression record) { + return MyBatis3Utils.insert(this::insert, record, conditionalExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(conditionExpressionHashId).toPropertyWhenPresent("conditionExpressionHashId", record::getConditionExpressionHashId) + .map(thenPartHashId).toPropertyWhenPresent("thenPartHashId", record::getThenPartHashId) + .map(elsePartHashId).toPropertyWhenPresent("elsePartHashId", record::getElsePartHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, conditionalExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, conditionalExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, conditionalExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, conditionalExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + static UpdateDSL updateAllColumns(ConditionalExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(conditionExpressionHashId).equalTo(record::getConditionExpressionHashId) + .set(thenPartHashId).equalTo(record::getThenPartHashId) + .set(elsePartHashId).equalTo(record::getElsePartHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: conditional_expression") + static UpdateDSL updateSelectiveColumns(ConditionalExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(conditionExpressionHashId).equalToWhenPresent(record::getConditionExpressionHashId) + .set(thenPartHashId).equalToWhenPresent(record::getThenPartHashId) + .set(elsePartHashId).equalToWhenPresent(record::getElsePartHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorDynamicSqlSupport.java new file mode 100644 index 00000000..2b16745e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ConstructorDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + public static final Constructor constructor = new Constructor(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.element_hash_id") + public static final SqlColumn elementHashId = constructor.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.name") + public static final SqlColumn name = constructor.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.signature") + public static final SqlColumn signature = constructor.signature; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.parent_hash_id") + public static final SqlColumn parentHashId = constructor.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.location_hash_id") + public static final SqlColumn locationHashId = constructor.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor.definition_body") + public static final SqlColumn definitionBody = constructor.definitionBody; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + public static final class Constructor extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn signature = column("signature", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn definitionBody = column("definition_body", JDBCType.VARCHAR); + + public Constructor() { + super("constructor"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationDynamicSqlSupport.java new file mode 100644 index 00000000..061e0a47 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ConstructorInvocationDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + public static final ConstructorInvocation constructorInvocation = new ConstructorInvocation(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.element_hash_id") + public static final SqlColumn elementHashId = constructorInvocation.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: constructor_invocation.class_reference_hash_id") + public static final SqlColumn classReferenceHashId = constructorInvocation.classReferenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + public static final class ConstructorInvocation extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn classReferenceHashId = column("class_reference_hash_id", JDBCType.BIGINT); + + public ConstructorInvocation() { + super("constructor_invocation"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationMapper.java new file mode 100644 index 00000000..0cd02820 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorInvocationMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ConstructorInvocationDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ConstructorInvocation; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ConstructorInvocationMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, classReferenceHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="class_reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="class_reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, constructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, constructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default int insert(ConstructorInvocation record) { + return MyBatis3Utils.insert(this::insert, record, constructorInvocation, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(classReferenceHashId).toProperty("classReferenceHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, constructorInvocation, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(classReferenceHashId).toProperty("classReferenceHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default int insertSelective(ConstructorInvocation record) { + return MyBatis3Utils.insert(this::insert, record, constructorInvocation, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(classReferenceHashId).toPropertyWhenPresent("classReferenceHashId", record::getClassReferenceHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, constructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, constructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, constructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, constructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + static UpdateDSL updateAllColumns(ConstructorInvocation record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(classReferenceHashId).equalTo(record::getClassReferenceHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor_invocation") + static UpdateDSL updateSelectiveColumns(ConstructorInvocation record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(classReferenceHashId).equalToWhenPresent(record::getClassReferenceHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorMapper.java new file mode 100644 index 00000000..7a528ef4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ConstructorMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ConstructorDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Constructor; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ConstructorMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, signature, parentHashId, locationHashId, definitionBody); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="signature", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="definition_body", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="signature", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="definition_body", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, constructor, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, constructor, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default int insert(Constructor record) { + return MyBatis3Utils.insert(this::insert, record, constructor, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(signature).toProperty("signature") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(definitionBody).toProperty("definitionBody") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, constructor, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(signature).toProperty("signature") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(definitionBody).toProperty("definitionBody") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default int insertSelective(Constructor record) { + return MyBatis3Utils.insert(this::insert, record, constructor, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(signature).toPropertyWhenPresent("signature", record::getSignature) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(definitionBody).toPropertyWhenPresent("definitionBody", record::getDefinitionBody) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, constructor, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, constructor, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, constructor, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, constructor, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + static UpdateDSL updateAllColumns(Constructor record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(signature).equalTo(record::getSignature) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(definitionBody).equalTo(record::getDefinitionBody); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: constructor") + static UpdateDSL updateSelectiveColumns(Constructor record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(signature).equalToWhenPresent(record::getSignature) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(definitionBody).equalToWhenPresent(record::getDefinitionBody); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentDynamicSqlSupport.java new file mode 100644 index 00000000..75a0e5c9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ContainerParentDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + public static final ContainerParent containerParent = new ContainerParent(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.child_hash_id") + public static final SqlColumn childHashId = containerParent.childHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: container_parent.parent_hash_id") + public static final SqlColumn parentHashId = containerParent.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + public static final class ContainerParent extends SqlTable { + public final SqlColumn childHashId = column("child_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public ContainerParent() { + super("container_parent"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentMapper.java new file mode 100644 index 00000000..9acef747 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContainerParentMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ContainerParentDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ContainerParent; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ContainerParentMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + BasicColumn[] selectList = BasicColumn.columnList(childHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="child_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="child_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, containerParent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, containerParent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default int insert(ContainerParent record) { + return MyBatis3Utils.insert(this::insert, record, containerParent, c -> + c.map(childHashId).toProperty("childHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, containerParent, c -> + c.map(childHashId).toProperty("childHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default int insertSelective(ContainerParent record) { + return MyBatis3Utils.insert(this::insert, record, containerParent, c -> + c.map(childHashId).toPropertyWhenPresent("childHashId", record::getChildHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, containerParent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, containerParent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, containerParent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, containerParent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + static UpdateDSL updateAllColumns(ContainerParent record, UpdateDSL dsl) { + return dsl.set(childHashId).equalTo(record::getChildHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: container_parent") + static UpdateDSL updateSelectiveColumns(ContainerParent record, UpdateDSL dsl) { + return dsl.set(childHashId).equalToWhenPresent(record::getChildHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementDynamicSqlSupport.java new file mode 100644 index 00000000..37ac6f80 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ContinueStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + public static final ContinueStatement continueStatement = new ContinueStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.element_hash_id") + public static final SqlColumn elementHashId = continueStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: continue_statement.continued_statement_hash_id") + public static final SqlColumn continuedStatementHashId = continueStatement.continuedStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + public static final class ContinueStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn continuedStatementHashId = column("continued_statement_hash_id", JDBCType.BIGINT); + + public ContinueStatement() { + super("continue_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementMapper.java new file mode 100644 index 00000000..46da12f8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ContinueStatementMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ContinueStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ContinueStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ContinueStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, continuedStatementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="continued_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="continued_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, continueStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, continueStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default int insert(ContinueStatement record) { + return MyBatis3Utils.insert(this::insert, record, continueStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(continuedStatementHashId).toProperty("continuedStatementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, continueStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(continuedStatementHashId).toProperty("continuedStatementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default int insertSelective(ContinueStatement record) { + return MyBatis3Utils.insert(this::insert, record, continueStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(continuedStatementHashId).toPropertyWhenPresent("continuedStatementHashId", record::getContinuedStatementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, continueStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, continueStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, continueStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, continueStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + static UpdateDSL updateAllColumns(ContinueStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(continuedStatementHashId).equalTo(record::getContinuedStatementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: continue_statement") + static UpdateDSL updateSelectiveColumns(ContinueStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(continuedStatementHashId).equalToWhenPresent(record::getContinuedStatementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageDynamicSqlSupport.java new file mode 100644 index 00000000..ef0d13f7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class CupackageDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + public static final Cupackage cupackage = new Cupackage(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.file_hash_id") + public static final SqlColumn fileHashId = cupackage.fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: cupackage.package_hash_id") + public static final SqlColumn packageHashId = cupackage.packageHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + public static final class Cupackage extends SqlTable { + public final SqlColumn fileHashId = column("file_hash_id", JDBCType.BIGINT); + + public final SqlColumn packageHashId = column("package_hash_id", JDBCType.BIGINT); + + public Cupackage() { + super("cupackage"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageMapper.java new file mode 100644 index 00000000..5a587c50 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/CupackageMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.CupackageDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Cupackage; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface CupackageMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + BasicColumn[] selectList = BasicColumn.columnList(fileHashId, packageHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="package_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="package_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, cupackage, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, cupackage, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default int insert(Cupackage record) { + return MyBatis3Utils.insert(this::insert, record, cupackage, c -> + c.map(fileHashId).toProperty("fileHashId") + .map(packageHashId).toProperty("packageHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, cupackage, c -> + c.map(fileHashId).toProperty("fileHashId") + .map(packageHashId).toProperty("packageHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default int insertSelective(Cupackage record) { + return MyBatis3Utils.insert(this::insert, record, cupackage, c -> + c.map(fileHashId).toPropertyWhenPresent("fileHashId", record::getFileHashId) + .map(packageHashId).toPropertyWhenPresent("packageHashId", record::getPackageHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, cupackage, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, cupackage, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, cupackage, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, cupackage, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + static UpdateDSL updateAllColumns(Cupackage record, UpdateDSL dsl) { + return dsl.set(fileHashId).equalTo(record::getFileHashId) + .set(packageHashId).equalTo(record::getPackageHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: cupackage") + static UpdateDSL updateSelectiveColumns(Cupackage record, UpdateDSL dsl) { + return dsl.set(fileHashId).equalToWhenPresent(record::getFileHashId) + .set(packageHashId).equalToWhenPresent(record::getPackageHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementDynamicSqlSupport.java new file mode 100644 index 00000000..dd25ef97 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class DeclarationElementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + public static final DeclarationElement declarationElement = new DeclarationElement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.element_hash_id") + public static final SqlColumn elementHashId = declarationElement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.index_order") + public static final SqlColumn indexOrder = declarationElement.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: declaration_element.declaration_statement_hash_id") + public static final SqlColumn declarationStatementHashId = declarationElement.declarationStatementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + public static final class DeclarationElement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn declarationStatementHashId = column("declaration_statement_hash_id", JDBCType.BIGINT); + + public DeclarationElement() { + super("declaration_element"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementMapper.java new file mode 100644 index 00000000..4fc9b12b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DeclarationElementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.DeclarationElementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.DeclarationElement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface DeclarationElementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, indexOrder, declarationStatementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="declaration_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="declaration_statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, declarationElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, declarationElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default int insert(DeclarationElement record) { + return MyBatis3Utils.insert(this::insert, record, declarationElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(indexOrder).toProperty("indexOrder") + .map(declarationStatementHashId).toProperty("declarationStatementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, declarationElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(indexOrder).toProperty("indexOrder") + .map(declarationStatementHashId).toProperty("declarationStatementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default int insertSelective(DeclarationElement record) { + return MyBatis3Utils.insert(this::insert, record, declarationElement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(declarationStatementHashId).toPropertyWhenPresent("declarationStatementHashId", record::getDeclarationStatementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, declarationElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, declarationElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, declarationElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, declarationElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + static UpdateDSL updateAllColumns(DeclarationElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(declarationStatementHashId).equalTo(record::getDeclarationStatementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: declaration_element") + static UpdateDSL updateSelectiveColumns(DeclarationElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(declarationStatementHashId).equalToWhenPresent(record::getDeclarationStatementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementDynamicSqlSupport.java new file mode 100644 index 00000000..0daca631 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class DoWhileStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + public static final DoWhileStatement doWhileStatement = new DoWhileStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.element_hash_id") + public static final SqlColumn elementHashId = doWhileStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.keyword") + public static final SqlColumn keyword = doWhileStatement.keyword; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.condition_hash_id") + public static final SqlColumn conditionHashId = doWhileStatement.conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: do_while_statement.body_declaration_hash_id") + public static final SqlColumn bodyDeclarationHashId = doWhileStatement.bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + public static final class DoWhileStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn keyword = column("keyword", JDBCType.VARCHAR); + + public final SqlColumn conditionHashId = column("condition_hash_id", JDBCType.BIGINT); + + public final SqlColumn bodyDeclarationHashId = column("body_declaration_hash_id", JDBCType.BIGINT); + + public DoWhileStatement() { + super("do_while_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementMapper.java new file mode 100644 index 00000000..eb5eee21 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoWhileStatementMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.DoWhileStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.DoWhileStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface DoWhileStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, keyword, conditionHashId, bodyDeclarationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="keyword", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="keyword", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, doWhileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, doWhileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default int insert(DoWhileStatement record) { + return MyBatis3Utils.insert(this::insert, record, doWhileStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(keyword).toProperty("keyword") + .map(conditionHashId).toProperty("conditionHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, doWhileStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(keyword).toProperty("keyword") + .map(conditionHashId).toProperty("conditionHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default int insertSelective(DoWhileStatement record) { + return MyBatis3Utils.insert(this::insert, record, doWhileStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(keyword).toPropertyWhenPresent("keyword", record::getKeyword) + .map(conditionHashId).toPropertyWhenPresent("conditionHashId", record::getConditionHashId) + .map(bodyDeclarationHashId).toPropertyWhenPresent("bodyDeclarationHashId", record::getBodyDeclarationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, doWhileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, doWhileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, doWhileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, doWhileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + static UpdateDSL updateAllColumns(DoWhileStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(keyword).equalTo(record::getKeyword) + .set(conditionHashId).equalTo(record::getConditionHashId) + .set(bodyDeclarationHashId).equalTo(record::getBodyDeclarationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: do_while_statement") + static UpdateDSL updateSelectiveColumns(DoWhileStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(keyword).equalToWhenPresent(record::getKeyword) + .set(conditionHashId).equalToWhenPresent(record::getConditionHashId) + .set(bodyDeclarationHashId).equalToWhenPresent(record::getBodyDeclarationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..2a62a088 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class DoubleLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + public static final DoubleLiteral doubleLiteral = new DoubleLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.element_hash_id") + public static final SqlColumn elementHashId = doubleLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: double_literal.value") + public static final SqlColumn value = doubleLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + public static final class DoubleLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public DoubleLiteral() { + super("double_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralMapper.java new file mode 100644 index 00000000..8d116652 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/DoubleLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.DoubleLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.DoubleLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface DoubleLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, doubleLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, doubleLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default int insert(DoubleLiteral record) { + return MyBatis3Utils.insert(this::insert, record, doubleLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, doubleLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default int insertSelective(DoubleLiteral record) { + return MyBatis3Utils.insert(this::insert, record, doubleLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, doubleLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, doubleLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, doubleLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, doubleLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + static UpdateDSL updateAllColumns(DoubleLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: double_literal") + static UpdateDSL updateSelectiveColumns(DoubleLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementDynamicSqlSupport.java new file mode 100644 index 00000000..add45312 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ElementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + public static final Element element = new Element(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.element_hash_id") + public static final SqlColumn elementHashId = element.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.type") + public static final SqlColumn type = element.type; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_id") + public static final SqlColumn parentId = element.parentId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: element.parent_type") + public static final SqlColumn parentType = element.parentType; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + public static final class Element extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn type = column("type", JDBCType.VARCHAR); + + public final SqlColumn parentId = column("parent_id", JDBCType.BIGINT); + + public final SqlColumn parentType = column("parent_type", JDBCType.VARCHAR); + + public Element() { + super("element"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementMapper.java new file mode 100644 index 00000000..f65d96ec --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ElementMapper.java @@ -0,0 +1,188 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ElementDynamicSqlSupport.*; +import static org.mybatis.dynamic.sql.SqlBuilder.*; + +import com.alipay.codequery.dal.mybatis.domain.Element; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ElementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, type, parentId, parentType); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, element, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, element, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int deleteByPrimaryKey(Long elementHashId_) { + return delete(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int insert(Element record) { + return MyBatis3Utils.insert(this::insert, record, element, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(type).toProperty("type") + .map(parentId).toProperty("parentId") + .map(parentType).toProperty("parentType") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, element, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(type).toProperty("type") + .map(parentId).toProperty("parentId") + .map(parentType).toProperty("parentType") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int insertSelective(Element record) { + return MyBatis3Utils.insert(this::insert, record, element, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(type).toPropertyWhenPresent("type", record::getType) + .map(parentId).toPropertyWhenPresent("parentId", record::getParentId) + .map(parentType).toPropertyWhenPresent("parentType", record::getParentType) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, element, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, element, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, element, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default Optional selectByPrimaryKey(Long elementHashId_) { + return selectOne(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, element, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + static UpdateDSL updateAllColumns(Element record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(type).equalTo(record::getType) + .set(parentId).equalTo(record::getParentId) + .set(parentType).equalTo(record::getParentType); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + static UpdateDSL updateSelectiveColumns(Element record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(type).equalToWhenPresent(record::getType) + .set(parentId).equalToWhenPresent(record::getParentId) + .set(parentType).equalToWhenPresent(record::getParentType); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int updateByPrimaryKey(Element record) { + return update(c -> + c.set(type).equalTo(record::getType) + .set(parentId).equalTo(record::getParentId) + .set(parentType).equalTo(record::getParentType) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: element") + default int updateByPrimaryKeySelective(Element record) { + return update(c -> + c.set(type).equalToWhenPresent(record::getType) + .set(parentId).equalToWhenPresent(record::getParentId) + .set(parentType).equalToWhenPresent(record::getParentType) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListDynamicSqlSupport.java new file mode 100644 index 00000000..2a6af29a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class EmptyReferenceParameterListDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + public static final EmptyReferenceParameterList emptyReferenceParameterList = new EmptyReferenceParameterList(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.list_hash_id") + public static final SqlColumn listHashId = emptyReferenceParameterList.listHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.parent_hash_id") + public static final SqlColumn parentHashId = emptyReferenceParameterList.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.debug_message") + public static final SqlColumn debugMessage = emptyReferenceParameterList.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_reference_parameter_list.location_hash_id") + public static final SqlColumn locationHashId = emptyReferenceParameterList.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + public static final class EmptyReferenceParameterList extends SqlTable { + public final SqlColumn listHashId = column("list_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public EmptyReferenceParameterList() { + super("empty_reference_parameter_list"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListMapper.java new file mode 100644 index 00000000..6f18babd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyReferenceParameterListMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.EmptyReferenceParameterListDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.EmptyReferenceParameterList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface EmptyReferenceParameterListMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + BasicColumn[] selectList = BasicColumn.columnList(listHashId, parentHashId, debugMessage, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, emptyReferenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, emptyReferenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default int insert(EmptyReferenceParameterList record) { + return MyBatis3Utils.insert(this::insert, record, emptyReferenceParameterList, c -> + c.map(listHashId).toProperty("listHashId") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, emptyReferenceParameterList, c -> + c.map(listHashId).toProperty("listHashId") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default int insertSelective(EmptyReferenceParameterList record) { + return MyBatis3Utils.insert(this::insert, record, emptyReferenceParameterList, c -> + c.map(listHashId).toPropertyWhenPresent("listHashId", record::getListHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, emptyReferenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, emptyReferenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, emptyReferenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, emptyReferenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + static UpdateDSL updateAllColumns(EmptyReferenceParameterList record, UpdateDSL dsl) { + return dsl.set(listHashId).equalTo(record::getListHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_reference_parameter_list") + static UpdateDSL updateSelectiveColumns(EmptyReferenceParameterList record, UpdateDSL dsl) { + return dsl.set(listHashId).equalToWhenPresent(record::getListHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementDynamicSqlSupport.java new file mode 100644 index 00000000..68cf3c1e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementDynamicSqlSupport.java @@ -0,0 +1,23 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class EmptyStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + public static final EmptyStatement emptyStatement = new EmptyStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: empty_statement.element_hash_id") + public static final SqlColumn elementHashId = emptyStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + public static final class EmptyStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public EmptyStatement() { + super("empty_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementMapper.java new file mode 100644 index 00000000..ccc6c183 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EmptyStatementMapper.java @@ -0,0 +1,132 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.EmptyStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.EmptyStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface EmptyStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, emptyStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, emptyStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default int insert(EmptyStatement record) { + return MyBatis3Utils.insert(this::insert, record, emptyStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, emptyStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default int insertSelective(EmptyStatement record) { + return MyBatis3Utils.insert(this::insert, record, emptyStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, emptyStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, emptyStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, emptyStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, emptyStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + static UpdateDSL updateAllColumns(EmptyStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: empty_statement") + static UpdateDSL updateSelectiveColumns(EmptyStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantDynamicSqlSupport.java new file mode 100644 index 00000000..4ed15acd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class EnumConstantDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + public static final EnumConstant enumConstant = new EnumConstant(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.element_hash_id") + public static final SqlColumn elementHashId = enumConstant.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.name") + public static final SqlColumn name = enumConstant.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.parent_hash_id") + public static final SqlColumn parentHashId = enumConstant.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.location_hash_id") + public static final SqlColumn locationHashId = enumConstant.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: enum_constant.debug_message") + public static final SqlColumn debugMessage = enumConstant.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + public static final class EnumConstant extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public EnumConstant() { + super("enum_constant"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantMapper.java new file mode 100644 index 00000000..e0b2d0fe --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/EnumConstantMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.EnumConstantDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.EnumConstant; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface EnumConstantMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, parentHashId, locationHashId, debugMessage); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, enumConstant, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, enumConstant, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default int insert(EnumConstant record) { + return MyBatis3Utils.insert(this::insert, record, enumConstant, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, enumConstant, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default int insertSelective(EnumConstant record) { + return MyBatis3Utils.insert(this::insert, record, enumConstant, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, enumConstant, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, enumConstant, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, enumConstant, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, enumConstant, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + static UpdateDSL updateAllColumns(EnumConstant record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: enum_constant") + static UpdateDSL updateSelectiveColumns(EnumConstant record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionDynamicSqlSupport.java new file mode 100644 index 00000000..4664156a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ExceptionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + public static final Exception exception = new Exception(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.element_hash_id") + public static final SqlColumn elementHashId = exception.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.type_hash_id") + public static final SqlColumn typeHashId = exception.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.callable_hash_id") + public static final SqlColumn callableHashId = exception.callableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: exception.name") + public static final SqlColumn name = exception.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + public static final class Exception extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public final SqlColumn callableHashId = column("callable_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public Exception() { + super("exception"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionMapper.java new file mode 100644 index 00000000..4da85cba --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExceptionMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ExceptionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Exception; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ExceptionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, typeHashId, callableHashId, name); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="callable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, exception, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, exception, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default int insert(Exception record) { + return MyBatis3Utils.insert(this::insert, record, exception, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeHashId).toProperty("typeHashId") + .map(callableHashId).toProperty("callableHashId") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, exception, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeHashId).toProperty("typeHashId") + .map(callableHashId).toProperty("callableHashId") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default int insertSelective(Exception record) { + return MyBatis3Utils.insert(this::insert, record, exception, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + .map(callableHashId).toPropertyWhenPresent("callableHashId", record::getCallableHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, exception, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, exception, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, exception, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, exception, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + static UpdateDSL updateAllColumns(Exception record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(callableHashId).equalTo(record::getCallableHashId) + .set(name).equalTo(record::getName); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: exception") + static UpdateDSL updateSelectiveColumns(Exception record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(callableHashId).equalToWhenPresent(record::getCallableHashId) + .set(name).equalToWhenPresent(record::getName); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..433313ec --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + public static final Expression expression = new Expression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.element_hash_id") + public static final SqlColumn elementHashId = expression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.name") + public static final SqlColumn name = expression.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.parent_hash_id") + public static final SqlColumn parentHashId = expression.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.index_order") + public static final SqlColumn indexOrder = expression.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.location_hash_id") + public static final SqlColumn locationHashId = expression.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression.debug_message") + public static final SqlColumn debugMessage = expression.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + public static final class Expression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public Expression() { + super("expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListDynamicSqlSupport.java new file mode 100644 index 00000000..54a19aab --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ExpressionListDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + public static final ExpressionList expressionList = new ExpressionList(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.element_hash_id") + public static final SqlColumn elementHashId = expressionList.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.parent_hash_id") + public static final SqlColumn parentHashId = expressionList.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.location_hash_id") + public static final SqlColumn locationHashId = expressionList.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.debug_message") + public static final SqlColumn debugMessage = expressionList.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list.size") + public static final SqlColumn size = expressionList.size; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + public static final class ExpressionList extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn size = column("size", JDBCType.INTEGER); + + public ExpressionList() { + super("expression_list"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationDynamicSqlSupport.java new file mode 100644 index 00000000..3691d84a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ExpressionListExpressionRelationDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + public static final ExpressionListExpressionRelation expressionListExpressionRelation = new ExpressionListExpressionRelation(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_list_hash_id") + public static final SqlColumn expressionListHashId = expressionListExpressionRelation.expressionListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.expression_hash_id") + public static final SqlColumn expressionHashId = expressionListExpressionRelation.expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_list_expression_relation.position") + public static final SqlColumn position = expressionListExpressionRelation.position; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + public static final class ExpressionListExpressionRelation extends SqlTable { + public final SqlColumn expressionListHashId = column("expression_list_hash_id", JDBCType.BIGINT); + + public final SqlColumn expressionHashId = column("expression_hash_id", JDBCType.BIGINT); + + public final SqlColumn position = column("position", JDBCType.INTEGER); + + public ExpressionListExpressionRelation() { + super("expression_list_expression_relation"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationMapper.java new file mode 100644 index 00000000..25828afd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListExpressionRelationMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ExpressionListExpressionRelationDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ExpressionListExpressionRelation; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ExpressionListExpressionRelationMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + BasicColumn[] selectList = BasicColumn.columnList(expressionListHashId, expressionHashId, position); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="expression_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="position", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="expression_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="position", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, expressionListExpressionRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, expressionListExpressionRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default int insert(ExpressionListExpressionRelation record) { + return MyBatis3Utils.insert(this::insert, record, expressionListExpressionRelation, c -> + c.map(expressionListHashId).toProperty("expressionListHashId") + .map(expressionHashId).toProperty("expressionHashId") + .map(position).toProperty("position") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, expressionListExpressionRelation, c -> + c.map(expressionListHashId).toProperty("expressionListHashId") + .map(expressionHashId).toProperty("expressionHashId") + .map(position).toProperty("position") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default int insertSelective(ExpressionListExpressionRelation record) { + return MyBatis3Utils.insert(this::insert, record, expressionListExpressionRelation, c -> + c.map(expressionListHashId).toPropertyWhenPresent("expressionListHashId", record::getExpressionListHashId) + .map(expressionHashId).toPropertyWhenPresent("expressionHashId", record::getExpressionHashId) + .map(position).toPropertyWhenPresent("position", record::getPosition) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, expressionListExpressionRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, expressionListExpressionRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, expressionListExpressionRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, expressionListExpressionRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + static UpdateDSL updateAllColumns(ExpressionListExpressionRelation record, UpdateDSL dsl) { + return dsl.set(expressionListHashId).equalTo(record::getExpressionListHashId) + .set(expressionHashId).equalTo(record::getExpressionHashId) + .set(position).equalTo(record::getPosition); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list_expression_relation") + static UpdateDSL updateSelectiveColumns(ExpressionListExpressionRelation record, UpdateDSL dsl) { + return dsl.set(expressionListHashId).equalToWhenPresent(record::getExpressionListHashId) + .set(expressionHashId).equalToWhenPresent(record::getExpressionHashId) + .set(position).equalToWhenPresent(record::getPosition); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListMapper.java new file mode 100644 index 00000000..7fe5a07a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionListMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ExpressionListDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ExpressionList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ExpressionListMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, parentHashId, locationHashId, debugMessage, size); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="size", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="size", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, expressionList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, expressionList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default int insert(ExpressionList record) { + return MyBatis3Utils.insert(this::insert, record, expressionList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(size).toProperty("size") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, expressionList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(size).toProperty("size") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default int insertSelective(ExpressionList record) { + return MyBatis3Utils.insert(this::insert, record, expressionList, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(size).toPropertyWhenPresent("size", record::getSize) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, expressionList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, expressionList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, expressionList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, expressionList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + static UpdateDSL updateAllColumns(ExpressionList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(size).equalTo(record::getSize); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_list") + static UpdateDSL updateSelectiveColumns(ExpressionList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(size).equalToWhenPresent(record::getSize); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionMapper.java new file mode 100644 index 00000000..e8bb312c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Expression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, parentHashId, indexOrder, locationHashId, debugMessage); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, expression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, expression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default int insert(Expression record) { + return MyBatis3Utils.insert(this::insert, record, expression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, expression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default int insertSelective(Expression record) { + return MyBatis3Utils.insert(this::insert, record, expression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, expression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, expression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, expression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, expression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + static UpdateDSL updateAllColumns(Expression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression") + static UpdateDSL updateSelectiveColumns(Expression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementDynamicSqlSupport.java new file mode 100644 index 00000000..a06cd551 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ExpressionStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + public static final ExpressionStatement expressionStatement = new ExpressionStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.element_hash_id") + public static final SqlColumn elementHashId = expressionStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: expression_statement.expression_hash_id") + public static final SqlColumn expressionHashId = expressionStatement.expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + public static final class ExpressionStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn expressionHashId = column("expression_hash_id", JDBCType.BIGINT); + + public ExpressionStatement() { + super("expression_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementMapper.java new file mode 100644 index 00000000..6db1526e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ExpressionStatementMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ExpressionStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ExpressionStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ExpressionStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, expressionHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, expressionStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, expressionStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default int insert(ExpressionStatement record) { + return MyBatis3Utils.insert(this::insert, record, expressionStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(expressionHashId).toProperty("expressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, expressionStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(expressionHashId).toProperty("expressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default int insertSelective(ExpressionStatement record) { + return MyBatis3Utils.insert(this::insert, record, expressionStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(expressionHashId).toPropertyWhenPresent("expressionHashId", record::getExpressionHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, expressionStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, expressionStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, expressionStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, expressionStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + static UpdateDSL updateAllColumns(ExpressionStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(expressionHashId).equalTo(record::getExpressionHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: expression_statement") + static UpdateDSL updateSelectiveColumns(ExpressionStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(expressionHashId).equalToWhenPresent(record::getExpressionHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldDynamicSqlSupport.java new file mode 100644 index 00000000..a600f19a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class FieldDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + public static final Field field = new Field(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.element_hash_id") + public static final SqlColumn elementHashId = field.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.name") + public static final SqlColumn name = field.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.parent_hash_id") + public static final SqlColumn parentHashId = field.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.debug_message") + public static final SqlColumn debugMessage = field.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: field.location_hash_id") + public static final SqlColumn locationHashId = field.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + public static final class Field extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public Field() { + super("field"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldMapper.java new file mode 100644 index 00000000..3232aeb7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FieldMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.FieldDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Field; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface FieldMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, parentHashId, debugMessage, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, field, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, field, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default int insert(Field record) { + return MyBatis3Utils.insert(this::insert, record, field, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, field, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default int insertSelective(Field record) { + return MyBatis3Utils.insert(this::insert, record, field, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, field, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, field, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, field, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, field, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + static UpdateDSL updateAllColumns(Field record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: field") + static UpdateDSL updateSelectiveColumns(Field record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileDynamicSqlSupport.java new file mode 100644 index 00000000..74d3478a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class FileDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + public static final File file = new File(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.element_hash_id") + public static final SqlColumn elementHashId = file.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.qualified_name") + public static final SqlColumn qualifiedName = file.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.extension") + public static final SqlColumn extension = file.extension; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.name") + public static final SqlColumn name = file.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file.number_of_lines_hash_id") + public static final SqlColumn numberOfLinesHashId = file.numberOfLinesHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + public static final class File extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn extension = column("extension", JDBCType.VARCHAR); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn numberOfLinesHashId = column("number_of_lines_hash_id", JDBCType.BIGINT); + + public File() { + super("file"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMapper.java new file mode 100644 index 00000000..4ae90107 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.FileDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.File; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface FileMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifiedName, extension, name, numberOfLinesHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="extension", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="number_of_lines_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="extension", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="number_of_lines_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, file, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, file, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default int insert(File record) { + return MyBatis3Utils.insert(this::insert, record, file, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(extension).toProperty("extension") + .map(name).toProperty("name") + .map(numberOfLinesHashId).toProperty("numberOfLinesHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, file, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(extension).toProperty("extension") + .map(name).toProperty("name") + .map(numberOfLinesHashId).toProperty("numberOfLinesHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default int insertSelective(File record) { + return MyBatis3Utils.insert(this::insert, record, file, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(extension).toPropertyWhenPresent("extension", record::getExtension) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(numberOfLinesHashId).toPropertyWhenPresent("numberOfLinesHashId", record::getNumberOfLinesHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, file, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, file, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, file, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, file, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + static UpdateDSL updateAllColumns(File record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(extension).equalTo(record::getExtension) + .set(name).equalTo(record::getName) + .set(numberOfLinesHashId).equalTo(record::getNumberOfLinesHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file") + static UpdateDSL updateSelectiveColumns(File record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(extension).equalToWhenPresent(record::getExtension) + .set(name).equalToWhenPresent(record::getName) + .set(numberOfLinesHashId).equalToWhenPresent(record::getNumberOfLinesHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumDynamicSqlSupport.java new file mode 100644 index 00000000..164246e9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class FileMd5SumDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + public static final FileMd5Sum fileMd5Sum = new FileMd5Sum(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.file_hash_id") + public static final SqlColumn fileHashId = fileMd5Sum.fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_md5_sum.value") + public static final SqlColumn value = fileMd5Sum.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + public static final class FileMd5Sum extends SqlTable { + public final SqlColumn fileHashId = column("file_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public FileMd5Sum() { + super("file_md5_sum"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumMapper.java new file mode 100644 index 00000000..1b2a0bcd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileMd5SumMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.FileMd5SumDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.FileMd5Sum; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface FileMd5SumMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + BasicColumn[] selectList = BasicColumn.columnList(fileHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, fileMd5Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, fileMd5Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default int insert(FileMd5Sum record) { + return MyBatis3Utils.insert(this::insert, record, fileMd5Sum, c -> + c.map(fileHashId).toProperty("fileHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, fileMd5Sum, c -> + c.map(fileHashId).toProperty("fileHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default int insertSelective(FileMd5Sum record) { + return MyBatis3Utils.insert(this::insert, record, fileMd5Sum, c -> + c.map(fileHashId).toPropertyWhenPresent("fileHashId", record::getFileHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, fileMd5Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, fileMd5Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, fileMd5Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, fileMd5Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + static UpdateDSL updateAllColumns(FileMd5Sum record, UpdateDSL dsl) { + return dsl.set(fileHashId).equalTo(record::getFileHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_md5_sum") + static UpdateDSL updateSelectiveColumns(FileMd5Sum record, UpdateDSL dsl) { + return dsl.set(fileHashId).equalToWhenPresent(record::getFileHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumDynamicSqlSupport.java new file mode 100644 index 00000000..51e86751 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class FileSha256SumDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + public static final FileSha256Sum fileSha256Sum = new FileSha256Sum(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.file_hash_id") + public static final SqlColumn fileHashId = fileSha256Sum.fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: file_sha256_sum.value") + public static final SqlColumn value = fileSha256Sum.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + public static final class FileSha256Sum extends SqlTable { + public final SqlColumn fileHashId = column("file_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public FileSha256Sum() { + super("file_sha256_sum"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumMapper.java new file mode 100644 index 00000000..1406390f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FileSha256SumMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.FileSha256SumDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.FileSha256Sum; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface FileSha256SumMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + BasicColumn[] selectList = BasicColumn.columnList(fileHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, fileSha256Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, fileSha256Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default int insert(FileSha256Sum record) { + return MyBatis3Utils.insert(this::insert, record, fileSha256Sum, c -> + c.map(fileHashId).toProperty("fileHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, fileSha256Sum, c -> + c.map(fileHashId).toProperty("fileHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default int insertSelective(FileSha256Sum record) { + return MyBatis3Utils.insert(this::insert, record, fileSha256Sum, c -> + c.map(fileHashId).toPropertyWhenPresent("fileHashId", record::getFileHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, fileSha256Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, fileSha256Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, fileSha256Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, fileSha256Sum, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + static UpdateDSL updateAllColumns(FileSha256Sum record, UpdateDSL dsl) { + return dsl.set(fileHashId).equalTo(record::getFileHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: file_sha256_sum") + static UpdateDSL updateSelectiveColumns(FileSha256Sum record, UpdateDSL dsl) { + return dsl.set(fileHashId).equalToWhenPresent(record::getFileHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..dfb765af --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class FloatingPointLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + public static final FloatingPointLiteral floatingPointLiteral = new FloatingPointLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.element_hash_id") + public static final SqlColumn elementHashId = floatingPointLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: floating_point_literal.value") + public static final SqlColumn value = floatingPointLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + public static final class FloatingPointLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public FloatingPointLiteral() { + super("floating_point_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralMapper.java new file mode 100644 index 00000000..0c47a967 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FloatingPointLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.FloatingPointLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.FloatingPointLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface FloatingPointLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, floatingPointLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, floatingPointLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default int insert(FloatingPointLiteral record) { + return MyBatis3Utils.insert(this::insert, record, floatingPointLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, floatingPointLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default int insertSelective(FloatingPointLiteral record) { + return MyBatis3Utils.insert(this::insert, record, floatingPointLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, floatingPointLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, floatingPointLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, floatingPointLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, floatingPointLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + static UpdateDSL updateAllColumns(FloatingPointLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: floating_point_literal") + static UpdateDSL updateSelectiveColumns(FloatingPointLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderDynamicSqlSupport.java new file mode 100644 index 00000000..3ba4af92 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class FolderDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + public static final Folder folder = new Folder(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.element_hash_id") + public static final SqlColumn elementHashId = folder.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.qualified_name") + public static final SqlColumn qualifiedName = folder.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.name") + public static final SqlColumn name = folder.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: folder.parent_hash_id") + public static final SqlColumn parentHashId = folder.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + public static final class Folder extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public Folder() { + super("folder"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderMapper.java new file mode 100644 index 00000000..ac33a7a0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/FolderMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.FolderDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Folder; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface FolderMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifiedName, name, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, folder, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, folder, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default int insert(Folder record) { + return MyBatis3Utils.insert(this::insert, record, folder, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, folder, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default int insertSelective(Folder record) { + return MyBatis3Utils.insert(this::insert, record, folder, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, folder, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, folder, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, folder, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, folder, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + static UpdateDSL updateAllColumns(Folder record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: folder") + static UpdateDSL updateSelectiveColumns(Folder record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementDynamicSqlSupport.java new file mode 100644 index 00000000..31017162 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ForStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + public static final ForStatement forStatement = new ForStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.element_hash_id") + public static final SqlColumn elementHashId = forStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.initialization_hash_id") + public static final SqlColumn initializationHashId = forStatement.initializationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.condition_hash_id") + public static final SqlColumn conditionHashId = forStatement.conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.update_hash_id") + public static final SqlColumn updateHashId = forStatement.updateHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: for_statement.body_hash_id") + public static final SqlColumn bodyHashId = forStatement.bodyHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + public static final class ForStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn initializationHashId = column("initialization_hash_id", JDBCType.BIGINT); + + public final SqlColumn conditionHashId = column("condition_hash_id", JDBCType.BIGINT); + + public final SqlColumn updateHashId = column("update_hash_id", JDBCType.BIGINT); + + public final SqlColumn bodyHashId = column("body_hash_id", JDBCType.BIGINT); + + public ForStatement() { + super("for_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementMapper.java new file mode 100644 index 00000000..e44c081d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForStatementMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ForStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ForStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ForStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, initializationHashId, conditionHashId, updateHashId, bodyHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="initialization_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="update_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="initialization_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="update_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, forStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, forStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default int insert(ForStatement record) { + return MyBatis3Utils.insert(this::insert, record, forStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(initializationHashId).toProperty("initializationHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(updateHashId).toProperty("updateHashId") + .map(bodyHashId).toProperty("bodyHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, forStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(initializationHashId).toProperty("initializationHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(updateHashId).toProperty("updateHashId") + .map(bodyHashId).toProperty("bodyHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default int insertSelective(ForStatement record) { + return MyBatis3Utils.insert(this::insert, record, forStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(initializationHashId).toPropertyWhenPresent("initializationHashId", record::getInitializationHashId) + .map(conditionHashId).toPropertyWhenPresent("conditionHashId", record::getConditionHashId) + .map(updateHashId).toPropertyWhenPresent("updateHashId", record::getUpdateHashId) + .map(bodyHashId).toPropertyWhenPresent("bodyHashId", record::getBodyHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, forStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, forStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, forStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, forStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + static UpdateDSL updateAllColumns(ForStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(initializationHashId).equalTo(record::getInitializationHashId) + .set(conditionHashId).equalTo(record::getConditionHashId) + .set(updateHashId).equalTo(record::getUpdateHashId) + .set(bodyHashId).equalTo(record::getBodyHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: for_statement") + static UpdateDSL updateSelectiveColumns(ForStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(initializationHashId).equalToWhenPresent(record::getInitializationHashId) + .set(conditionHashId).equalToWhenPresent(record::getConditionHashId) + .set(updateHashId).equalToWhenPresent(record::getUpdateHashId) + .set(bodyHashId).equalToWhenPresent(record::getBodyHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementDynamicSqlSupport.java new file mode 100644 index 00000000..db6c634a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ForeachStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + public static final ForeachStatement foreachStatement = new ForeachStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.element_hash_id") + public static final SqlColumn elementHashId = foreachStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iterated_value_hash_id") + public static final SqlColumn iteratedValueHashId = foreachStatement.iteratedValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.iteration_parameter_hash_id") + public static final SqlColumn iterationParameterHashId = foreachStatement.iterationParameterHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: foreach_statement.body_hash_id") + public static final SqlColumn bodyHashId = foreachStatement.bodyHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + public static final class ForeachStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn iteratedValueHashId = column("iterated_value_hash_id", JDBCType.BIGINT); + + public final SqlColumn iterationParameterHashId = column("iteration_parameter_hash_id", JDBCType.BIGINT); + + public final SqlColumn bodyHashId = column("body_hash_id", JDBCType.BIGINT); + + public ForeachStatement() { + super("foreach_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementMapper.java new file mode 100644 index 00000000..e3afc7bf --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ForeachStatementMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ForeachStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ForeachStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ForeachStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, iteratedValueHashId, iterationParameterHashId, bodyHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="iterated_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="iteration_parameter_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="iterated_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="iteration_parameter_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, foreachStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, foreachStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default int insert(ForeachStatement record) { + return MyBatis3Utils.insert(this::insert, record, foreachStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(iteratedValueHashId).toProperty("iteratedValueHashId") + .map(iterationParameterHashId).toProperty("iterationParameterHashId") + .map(bodyHashId).toProperty("bodyHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, foreachStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(iteratedValueHashId).toProperty("iteratedValueHashId") + .map(iterationParameterHashId).toProperty("iterationParameterHashId") + .map(bodyHashId).toProperty("bodyHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default int insertSelective(ForeachStatement record) { + return MyBatis3Utils.insert(this::insert, record, foreachStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(iteratedValueHashId).toPropertyWhenPresent("iteratedValueHashId", record::getIteratedValueHashId) + .map(iterationParameterHashId).toPropertyWhenPresent("iterationParameterHashId", record::getIterationParameterHashId) + .map(bodyHashId).toPropertyWhenPresent("bodyHashId", record::getBodyHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, foreachStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, foreachStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, foreachStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, foreachStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + static UpdateDSL updateAllColumns(ForeachStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(iteratedValueHashId).equalTo(record::getIteratedValueHashId) + .set(iterationParameterHashId).equalTo(record::getIterationParameterHashId) + .set(bodyHashId).equalTo(record::getBodyHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: foreach_statement") + static UpdateDSL updateSelectiveColumns(ForeachStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(iteratedValueHashId).equalToWhenPresent(record::getIteratedValueHashId) + .set(iterationParameterHashId).equalToWhenPresent(record::getIterationParameterHashId) + .set(bodyHashId).equalToWhenPresent(record::getBodyHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierDynamicSqlSupport.java new file mode 100644 index 00000000..7a1c20f5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class IdentifierDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + public static final Identifier identifier = new Identifier(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.element_hash_id") + public static final SqlColumn elementHashId = identifier.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.location_hash_id") + public static final SqlColumn locationHashId = identifier.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.name") + public static final SqlColumn name = identifier.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: identifier.parent_hash_id") + public static final SqlColumn parentHashId = identifier.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + public static final class Identifier extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public Identifier() { + super("identifier"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierMapper.java new file mode 100644 index 00000000..fc1e221e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IdentifierMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.IdentifierDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Identifier; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface IdentifierMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, locationHashId, name, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, identifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, identifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default int insert(Identifier record) { + return MyBatis3Utils.insert(this::insert, record, identifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(locationHashId).toProperty("locationHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, identifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(locationHashId).toProperty("locationHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default int insertSelective(Identifier record) { + return MyBatis3Utils.insert(this::insert, record, identifier, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, identifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, identifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, identifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, identifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + static UpdateDSL updateAllColumns(Identifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: identifier") + static UpdateDSL updateSelectiveColumns(Identifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseDynamicSqlSupport.java new file mode 100644 index 00000000..6b38b277 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class IfStatementWithElseDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + public static final IfStatementWithElse ifStatementWithElse = new IfStatementWithElse(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.element_hash_id") + public static final SqlColumn elementHashId = ifStatementWithElse.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.condition_hash_id") + public static final SqlColumn conditionHashId = ifStatementWithElse.conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.consequent_hash_id") + public static final SqlColumn consequentHashId = ifStatementWithElse.consequentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_with_else.alternate_hash_id") + public static final SqlColumn alternateHashId = ifStatementWithElse.alternateHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + public static final class IfStatementWithElse extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn conditionHashId = column("condition_hash_id", JDBCType.BIGINT); + + public final SqlColumn consequentHashId = column("consequent_hash_id", JDBCType.BIGINT); + + public final SqlColumn alternateHashId = column("alternate_hash_id", JDBCType.BIGINT); + + public IfStatementWithElse() { + super("if_statement_with_else"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseMapper.java new file mode 100644 index 00000000..2655361a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithElseMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.IfStatementWithElseDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.IfStatementWithElse; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface IfStatementWithElseMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, conditionHashId, consequentHashId, alternateHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="consequent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="alternate_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="consequent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="alternate_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, ifStatementWithElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, ifStatementWithElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default int insert(IfStatementWithElse record) { + return MyBatis3Utils.insert(this::insert, record, ifStatementWithElse, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(consequentHashId).toProperty("consequentHashId") + .map(alternateHashId).toProperty("alternateHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, ifStatementWithElse, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(consequentHashId).toProperty("consequentHashId") + .map(alternateHashId).toProperty("alternateHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default int insertSelective(IfStatementWithElse record) { + return MyBatis3Utils.insert(this::insert, record, ifStatementWithElse, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(conditionHashId).toPropertyWhenPresent("conditionHashId", record::getConditionHashId) + .map(consequentHashId).toPropertyWhenPresent("consequentHashId", record::getConsequentHashId) + .map(alternateHashId).toPropertyWhenPresent("alternateHashId", record::getAlternateHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, ifStatementWithElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, ifStatementWithElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, ifStatementWithElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, ifStatementWithElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + static UpdateDSL updateAllColumns(IfStatementWithElse record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(conditionHashId).equalTo(record::getConditionHashId) + .set(consequentHashId).equalTo(record::getConsequentHashId) + .set(alternateHashId).equalTo(record::getAlternateHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_with_else") + static UpdateDSL updateSelectiveColumns(IfStatementWithElse record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(conditionHashId).equalToWhenPresent(record::getConditionHashId) + .set(consequentHashId).equalToWhenPresent(record::getConsequentHashId) + .set(alternateHashId).equalToWhenPresent(record::getAlternateHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseDynamicSqlSupport.java new file mode 100644 index 00000000..3d539d14 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class IfStatementWithoutElseDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + public static final IfStatementWithoutElse ifStatementWithoutElse = new IfStatementWithoutElse(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.element_hash_id") + public static final SqlColumn elementHashId = ifStatementWithoutElse.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.condition_hash_id") + public static final SqlColumn conditionHashId = ifStatementWithoutElse.conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: if_statement_without_else.consequent_hash_id") + public static final SqlColumn consequentHashId = ifStatementWithoutElse.consequentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + public static final class IfStatementWithoutElse extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn conditionHashId = column("condition_hash_id", JDBCType.BIGINT); + + public final SqlColumn consequentHashId = column("consequent_hash_id", JDBCType.BIGINT); + + public IfStatementWithoutElse() { + super("if_statement_without_else"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseMapper.java new file mode 100644 index 00000000..4560925c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IfStatementWithoutElseMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.IfStatementWithoutElseDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.IfStatementWithoutElse; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface IfStatementWithoutElseMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, conditionHashId, consequentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="consequent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="consequent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, ifStatementWithoutElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, ifStatementWithoutElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default int insert(IfStatementWithoutElse record) { + return MyBatis3Utils.insert(this::insert, record, ifStatementWithoutElse, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(consequentHashId).toProperty("consequentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, ifStatementWithoutElse, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(consequentHashId).toProperty("consequentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default int insertSelective(IfStatementWithoutElse record) { + return MyBatis3Utils.insert(this::insert, record, ifStatementWithoutElse, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(conditionHashId).toPropertyWhenPresent("conditionHashId", record::getConditionHashId) + .map(consequentHashId).toPropertyWhenPresent("consequentHashId", record::getConsequentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, ifStatementWithoutElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, ifStatementWithoutElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, ifStatementWithoutElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, ifStatementWithoutElse, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + static UpdateDSL updateAllColumns(IfStatementWithoutElse record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(conditionHashId).equalTo(record::getConditionHashId) + .set(consequentHashId).equalTo(record::getConsequentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: if_statement_without_else") + static UpdateDSL updateSelectiveColumns(IfStatementWithoutElse record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(conditionHashId).equalToWhenPresent(record::getConditionHashId) + .set(consequentHashId).equalToWhenPresent(record::getConsequentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoDynamicSqlSupport.java new file mode 100644 index 00000000..3893eec1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ImportInfoDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + public static final ImportInfo importInfo = new ImportInfo(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.element_hash_id") + public static final SqlColumn elementHashId = importInfo.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.reference_hash_id") + public static final SqlColumn referenceHashId = importInfo.referenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.name") + public static final SqlColumn name = importInfo.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.parent_hash_id") + public static final SqlColumn parentHashId = importInfo.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.location_hash_id") + public static final SqlColumn locationHashId = importInfo.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import.is_foreign_import") + public static final SqlColumn isForeignImport = importInfo.isForeignImport; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + public static final class ImportInfo extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn referenceHashId = column("reference_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn isForeignImport = column("is_foreign_import", JDBCType.INTEGER); + + public ImportInfo() { + super("import"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoMapper.java new file mode 100644 index 00000000..8afbff59 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportInfoMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ImportInfoDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ImportInfo; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ImportInfoMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, referenceHashId, name, parentHashId, locationHashId, isForeignImport); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="is_foreign_import", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="is_foreign_import", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, importInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, importInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default int insert(ImportInfo record) { + return MyBatis3Utils.insert(this::insert, record, importInfo, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceHashId).toProperty("referenceHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(isForeignImport).toProperty("isForeignImport") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, importInfo, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceHashId).toProperty("referenceHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(isForeignImport).toProperty("isForeignImport") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default int insertSelective(ImportInfo record) { + return MyBatis3Utils.insert(this::insert, record, importInfo, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(referenceHashId).toPropertyWhenPresent("referenceHashId", record::getReferenceHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(isForeignImport).toPropertyWhenPresent("isForeignImport", record::getIsForeignImport) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, importInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, importInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, importInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, importInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + static UpdateDSL updateAllColumns(ImportInfo record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(referenceHashId).equalTo(record::getReferenceHashId) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(isForeignImport).equalTo(record::getIsForeignImport); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import") + static UpdateDSL updateSelectiveColumns(ImportInfo record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(referenceHashId).equalToWhenPresent(record::getReferenceHashId) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(isForeignImport).equalToWhenPresent(record::getIsForeignImport); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementDynamicSqlSupport.java new file mode 100644 index 00000000..af73289a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ImportStaticReferenceElementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + public static final ImportStaticReferenceElement importStaticReferenceElement = new ImportStaticReferenceElement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.element_hash_id") + public static final SqlColumn elementHashId = importStaticReferenceElement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.debug_message") + public static final SqlColumn debugMessage = importStaticReferenceElement.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.parent_hash_id") + public static final SqlColumn parentHashId = importStaticReferenceElement.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_reference_element.location_hash_id") + public static final SqlColumn locationHashId = importStaticReferenceElement.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + public static final class ImportStaticReferenceElement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public ImportStaticReferenceElement() { + super("import_static_reference_element"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementMapper.java new file mode 100644 index 00000000..0181bc06 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticReferenceElementMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ImportStaticReferenceElementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ImportStaticReferenceElement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ImportStaticReferenceElementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, debugMessage, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, importStaticReferenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, importStaticReferenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default int insert(ImportStaticReferenceElement record) { + return MyBatis3Utils.insert(this::insert, record, importStaticReferenceElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, importStaticReferenceElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default int insertSelective(ImportStaticReferenceElement record) { + return MyBatis3Utils.insert(this::insert, record, importStaticReferenceElement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, importStaticReferenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, importStaticReferenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, importStaticReferenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, importStaticReferenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + static UpdateDSL updateAllColumns(ImportStaticReferenceElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_reference_element") + static UpdateDSL updateSelectiveColumns(ImportStaticReferenceElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementDynamicSqlSupport.java new file mode 100644 index 00000000..248a615a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ImportStaticStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + public static final ImportStaticStatement importStaticStatement = new ImportStaticStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.element_hash_id") + public static final SqlColumn elementHashId = importStaticStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.reference_hash_id") + public static final SqlColumn referenceHashId = importStaticStatement.referenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.name") + public static final SqlColumn name = importStaticStatement.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.parent_hash_id") + public static final SqlColumn parentHashId = importStaticStatement.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: import_static_statement.location_hash_id") + public static final SqlColumn locationHashId = importStaticStatement.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + public static final class ImportStaticStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn referenceHashId = column("reference_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public ImportStaticStatement() { + super("import_static_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementMapper.java new file mode 100644 index 00000000..b0869e2d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ImportStaticStatementMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ImportStaticStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ImportStaticStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ImportStaticStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, referenceHashId, name, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, importStaticStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, importStaticStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default int insert(ImportStaticStatement record) { + return MyBatis3Utils.insert(this::insert, record, importStaticStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceHashId).toProperty("referenceHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, importStaticStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceHashId).toProperty("referenceHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default int insertSelective(ImportStaticStatement record) { + return MyBatis3Utils.insert(this::insert, record, importStaticStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(referenceHashId).toPropertyWhenPresent("referenceHashId", record::getReferenceHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, importStaticStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, importStaticStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, importStaticStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, importStaticStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + static UpdateDSL updateAllColumns(ImportStaticStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(referenceHashId).equalTo(record::getReferenceHashId) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: import_static_statement") + static UpdateDSL updateSelectiveColumns(ImportStaticStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(referenceHashId).equalToWhenPresent(record::getReferenceHashId) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..009eead8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class InstanceofExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + public static final InstanceofExpression instanceofExpression = new InstanceofExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.element_hash_id") + public static final SqlColumn elementHashId = instanceofExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.operand_hash_id") + public static final SqlColumn operandHashId = instanceofExpression.operandHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.check_type_hash_id") + public static final SqlColumn checkTypeHashId = instanceofExpression.checkTypeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: instanceof_expression.pattern_hash_id") + public static final SqlColumn patternHashId = instanceofExpression.patternHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + public static final class InstanceofExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn operandHashId = column("operand_hash_id", JDBCType.BIGINT); + + public final SqlColumn checkTypeHashId = column("check_type_hash_id", JDBCType.BIGINT); + + public final SqlColumn patternHashId = column("pattern_hash_id", JDBCType.BIGINT); + + public InstanceofExpression() { + super("instanceof_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionMapper.java new file mode 100644 index 00000000..d8448c36 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InstanceofExpressionMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.InstanceofExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.InstanceofExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface InstanceofExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, operandHashId, checkTypeHashId, patternHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="operand_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="check_type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="pattern_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="operand_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="check_type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="pattern_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, instanceofExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, instanceofExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default int insert(InstanceofExpression record) { + return MyBatis3Utils.insert(this::insert, record, instanceofExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(operandHashId).toProperty("operandHashId") + .map(checkTypeHashId).toProperty("checkTypeHashId") + .map(patternHashId).toProperty("patternHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, instanceofExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(operandHashId).toProperty("operandHashId") + .map(checkTypeHashId).toProperty("checkTypeHashId") + .map(patternHashId).toProperty("patternHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default int insertSelective(InstanceofExpression record) { + return MyBatis3Utils.insert(this::insert, record, instanceofExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(operandHashId).toPropertyWhenPresent("operandHashId", record::getOperandHashId) + .map(checkTypeHashId).toPropertyWhenPresent("checkTypeHashId", record::getCheckTypeHashId) + .map(patternHashId).toPropertyWhenPresent("patternHashId", record::getPatternHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, instanceofExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, instanceofExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, instanceofExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, instanceofExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + static UpdateDSL updateAllColumns(InstanceofExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(operandHashId).equalTo(record::getOperandHashId) + .set(checkTypeHashId).equalTo(record::getCheckTypeHashId) + .set(patternHashId).equalTo(record::getPatternHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: instanceof_expression") + static UpdateDSL updateSelectiveColumns(InstanceofExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(operandHashId).equalToWhenPresent(record::getOperandHashId) + .set(checkTypeHashId).equalToWhenPresent(record::getCheckTypeHashId) + .set(patternHashId).equalToWhenPresent(record::getPatternHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..a1b410e3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class IntegerLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + public static final IntegerLiteral integerLiteral = new IntegerLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.element_hash_id") + public static final SqlColumn elementHashId = integerLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: integer_literal.value") + public static final SqlColumn value = integerLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + public static final class IntegerLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public IntegerLiteral() { + super("integer_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralMapper.java new file mode 100644 index 00000000..97b979d3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/IntegerLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.IntegerLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.IntegerLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface IntegerLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, integerLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, integerLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default int insert(IntegerLiteral record) { + return MyBatis3Utils.insert(this::insert, record, integerLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, integerLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default int insertSelective(IntegerLiteral record) { + return MyBatis3Utils.insert(this::insert, record, integerLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, integerLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, integerLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, integerLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, integerLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + static UpdateDSL updateAllColumns(IntegerLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: integer_literal") + static UpdateDSL updateSelectiveColumns(IntegerLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoDynamicSqlSupport.java new file mode 100644 index 00000000..6a22ee34 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class InterfaceInfoDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + public static final InterfaceInfo interfaceInfo = new InterfaceInfo(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.element_hash_id") + public static final SqlColumn elementHashId = interfaceInfo.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.qualified_name") + public static final SqlColumn qualifiedName = interfaceInfo.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.identifier_hash_id") + public static final SqlColumn identifierHashId = interfaceInfo.identifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.location_hash_id") + public static final SqlColumn locationHashId = interfaceInfo.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: interface.parent_hash_id") + public static final SqlColumn parentHashId = interfaceInfo.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + public static final class InterfaceInfo extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn identifierHashId = column("identifier_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public InterfaceInfo() { + super("interface"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoMapper.java new file mode 100644 index 00000000..c805a8de --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/InterfaceInfoMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.InterfaceInfoDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.InterfaceInfo; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface InterfaceInfoMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifiedName, identifierHashId, locationHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="identifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="identifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, interfaceInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, interfaceInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default int insert(InterfaceInfo record) { + return MyBatis3Utils.insert(this::insert, record, interfaceInfo, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(identifierHashId).toProperty("identifierHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, interfaceInfo, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(identifierHashId).toProperty("identifierHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default int insertSelective(InterfaceInfo record) { + return MyBatis3Utils.insert(this::insert, record, interfaceInfo, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(identifierHashId).toPropertyWhenPresent("identifierHashId", record::getIdentifierHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, interfaceInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, interfaceInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, interfaceInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, interfaceInfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + static UpdateDSL updateAllColumns(InterfaceInfo record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(identifierHashId).equalTo(record::getIdentifierHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: interface") + static UpdateDSL updateSelectiveColumns(InterfaceInfo record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(identifierHashId).equalToWhenPresent(record::getIdentifierHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentDynamicSqlSupport.java new file mode 100644 index 00000000..cc6bd083 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class JavadocCommentDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + public static final JavadocComment javadocComment = new JavadocComment(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.element_hash_id") + public static final SqlColumn elementHashId = javadocComment.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.documentable_hash_id") + public static final SqlColumn documentableHashId = javadocComment.documentableHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.text") + public static final SqlColumn text = javadocComment.text; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.location_hash_id") + public static final SqlColumn locationHashId = javadocComment.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_comment.parent_hash_id") + public static final SqlColumn parentHashId = javadocComment.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + public static final class JavadocComment extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn documentableHashId = column("documentable_hash_id", JDBCType.BIGINT); + + public final SqlColumn text = column("text", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public JavadocComment() { + super("javadoc_comment"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentMapper.java new file mode 100644 index 00000000..63eb75e1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocCommentMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.JavadocCommentDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.JavadocComment; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface JavadocCommentMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, documentableHashId, text, locationHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="documentable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="text", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="documentable_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="text", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, javadocComment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, javadocComment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default int insert(JavadocComment record) { + return MyBatis3Utils.insert(this::insert, record, javadocComment, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(documentableHashId).toProperty("documentableHashId") + .map(text).toProperty("text") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, javadocComment, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(documentableHashId).toProperty("documentableHashId") + .map(text).toProperty("text") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default int insertSelective(JavadocComment record) { + return MyBatis3Utils.insert(this::insert, record, javadocComment, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(documentableHashId).toPropertyWhenPresent("documentableHashId", record::getDocumentableHashId) + .map(text).toPropertyWhenPresent("text", record::getText) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, javadocComment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, javadocComment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, javadocComment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, javadocComment, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + static UpdateDSL updateAllColumns(JavadocComment record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(documentableHashId).equalTo(record::getDocumentableHashId) + .set(text).equalTo(record::getText) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_comment") + static UpdateDSL updateSelectiveColumns(JavadocComment record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(documentableHashId).equalToWhenPresent(record::getDocumentableHashId) + .set(text).equalToWhenPresent(record::getText) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenDynamicSqlSupport.java new file mode 100644 index 00000000..1d30fe2d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class JavadocDataTokenDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + public static final JavadocDataToken javadocDataToken = new JavadocDataToken(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.element_hash_id") + public static final SqlColumn elementHashId = javadocDataToken.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.value") + public static final SqlColumn value = javadocDataToken.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.parent_hash_id") + public static final SqlColumn parentHashId = javadocDataToken.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.index_order") + public static final SqlColumn indexOrder = javadocDataToken.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_data_token.location_hash_id") + public static final SqlColumn locationHashId = javadocDataToken.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + public static final class JavadocDataToken extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public JavadocDataToken() { + super("javadoc_data_token"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenMapper.java new file mode 100644 index 00000000..4535e625 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocDataTokenMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.JavadocDataTokenDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.JavadocDataToken; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface JavadocDataTokenMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value, parentHashId, indexOrder, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, javadocDataToken, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, javadocDataToken, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default int insert(JavadocDataToken record) { + return MyBatis3Utils.insert(this::insert, record, javadocDataToken, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + .map(parentHashId).toProperty("parentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, javadocDataToken, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + .map(parentHashId).toProperty("parentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default int insertSelective(JavadocDataToken record) { + return MyBatis3Utils.insert(this::insert, record, javadocDataToken, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, javadocDataToken, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, javadocDataToken, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, javadocDataToken, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, javadocDataToken, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + static UpdateDSL updateAllColumns(JavadocDataToken record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue) + .set(parentHashId).equalTo(record::getParentHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_data_token") + static UpdateDSL updateSelectiveColumns(JavadocDataToken record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagDynamicSqlSupport.java new file mode 100644 index 00000000..89f2bf92 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class JavadocTagDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + public static final JavadocTag javadocTag = new JavadocTag(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.element_hash_id") + public static final SqlColumn elementHashId = javadocTag.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.name") + public static final SqlColumn name = javadocTag.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.value") + public static final SqlColumn value = javadocTag.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.containing_comment_hash_id") + public static final SqlColumn containingCommentHashId = javadocTag.containingCommentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.index_order") + public static final SqlColumn indexOrder = javadocTag.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag.location_hash_id") + public static final SqlColumn locationHashId = javadocTag.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + public static final class JavadocTag extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public final SqlColumn containingCommentHashId = column("containing_comment_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public JavadocTag() { + super("javadoc_tag"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagMapper.java new file mode 100644 index 00000000..b6bf3050 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.JavadocTagDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.JavadocTag; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface JavadocTagMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, value, containingCommentHashId, indexOrder, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="containing_comment_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="containing_comment_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, javadocTag, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, javadocTag, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default int insert(JavadocTag record) { + return MyBatis3Utils.insert(this::insert, record, javadocTag, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(value).toProperty("value") + .map(containingCommentHashId).toProperty("containingCommentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, javadocTag, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(value).toProperty("value") + .map(containingCommentHashId).toProperty("containingCommentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default int insertSelective(JavadocTag record) { + return MyBatis3Utils.insert(this::insert, record, javadocTag, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(value).toPropertyWhenPresent("value", record::getValue) + .map(containingCommentHashId).toPropertyWhenPresent("containingCommentHashId", record::getContainingCommentHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, javadocTag, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, javadocTag, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, javadocTag, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, javadocTag, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + static UpdateDSL updateAllColumns(JavadocTag record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(value).equalTo(record::getValue) + .set(containingCommentHashId).equalTo(record::getContainingCommentHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag") + static UpdateDSL updateSelectiveColumns(JavadocTag record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(value).equalToWhenPresent(record::getValue) + .set(containingCommentHashId).equalToWhenPresent(record::getContainingCommentHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueDynamicSqlSupport.java new file mode 100644 index 00000000..68726199 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class JavadocTagValueDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + public static final JavadocTagValue javadocTagValue = new JavadocTagValue(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.element_hash_id") + public static final SqlColumn elementHashId = javadocTagValue.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.value") + public static final SqlColumn value = javadocTagValue.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.parent_hash_id") + public static final SqlColumn parentHashId = javadocTagValue.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: javadoc_tag_value.location_hash_id") + public static final SqlColumn locationHashId = javadocTagValue.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + public static final class JavadocTagValue extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public JavadocTagValue() { + super("javadoc_tag_value"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueMapper.java new file mode 100644 index 00000000..4a16f3fa --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/JavadocTagValueMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.JavadocTagValueDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.JavadocTagValue; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface JavadocTagValueMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, javadocTagValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, javadocTagValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default int insert(JavadocTagValue record) { + return MyBatis3Utils.insert(this::insert, record, javadocTagValue, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, javadocTagValue, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default int insertSelective(JavadocTagValue record) { + return MyBatis3Utils.insert(this::insert, record, javadocTagValue, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, javadocTagValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, javadocTagValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, javadocTagValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, javadocTagValue, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + static UpdateDSL updateAllColumns(JavadocTagValue record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: javadoc_tag_value") + static UpdateDSL updateSelectiveColumns(JavadocTagValue record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementDynamicSqlSupport.java new file mode 100644 index 00000000..10ff480b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class LabeledStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + public static final LabeledStatement labeledStatement = new LabeledStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.element_hash_id") + public static final SqlColumn elementHashId = labeledStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.labeled_hash_identifier_hash_id") + public static final SqlColumn labeledHashIdentifierHashId = labeledStatement.labeledHashIdentifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: labeled_statement.statement_hash_id") + public static final SqlColumn statementHashId = labeledStatement.statementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + public static final class LabeledStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn labeledHashIdentifierHashId = column("labeled_hash_identifier_hash_id", JDBCType.BIGINT); + + public final SqlColumn statementHashId = column("statement_hash_id", JDBCType.BIGINT); + + public LabeledStatement() { + super("labeled_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementMapper.java new file mode 100644 index 00000000..b6915417 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LabeledStatementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.LabeledStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.LabeledStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface LabeledStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, labeledHashIdentifierHashId, statementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="labeled_hash_identifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="labeled_hash_identifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, labeledStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, labeledStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default int insert(LabeledStatement record) { + return MyBatis3Utils.insert(this::insert, record, labeledStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(labeledHashIdentifierHashId).toProperty("labeledHashIdentifierHashId") + .map(statementHashId).toProperty("statementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, labeledStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(labeledHashIdentifierHashId).toProperty("labeledHashIdentifierHashId") + .map(statementHashId).toProperty("statementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default int insertSelective(LabeledStatement record) { + return MyBatis3Utils.insert(this::insert, record, labeledStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(labeledHashIdentifierHashId).toPropertyWhenPresent("labeledHashIdentifierHashId", record::getLabeledHashIdentifierHashId) + .map(statementHashId).toPropertyWhenPresent("statementHashId", record::getStatementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, labeledStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, labeledStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, labeledStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, labeledStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + static UpdateDSL updateAllColumns(LabeledStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(labeledHashIdentifierHashId).equalTo(record::getLabeledHashIdentifierHashId) + .set(statementHashId).equalTo(record::getStatementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: labeled_statement") + static UpdateDSL updateSelectiveColumns(LabeledStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(labeledHashIdentifierHashId).equalToWhenPresent(record::getLabeledHashIdentifierHashId) + .set(statementHashId).equalToWhenPresent(record::getStatementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..eef00d8b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class LambdaExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + public static final LambdaExpression lambdaExpression = new LambdaExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.element_hash_id") + public static final SqlColumn elementHashId = lambdaExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.parameter_list_hash_id") + public static final SqlColumn parameterListHashId = lambdaExpression.parameterListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.body_hash_id") + public static final SqlColumn bodyHashId = lambdaExpression.bodyHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_void_compatible") + public static final SqlColumn isVoidCompatible = lambdaExpression.isVoidCompatible; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: lambda_expression.is_value_compatible") + public static final SqlColumn isValueCompatible = lambdaExpression.isValueCompatible; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + public static final class LambdaExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn parameterListHashId = column("parameter_list_hash_id", JDBCType.BIGINT); + + public final SqlColumn bodyHashId = column("body_hash_id", JDBCType.BIGINT); + + public final SqlColumn isVoidCompatible = column("is_void_compatible", JDBCType.INTEGER); + + public final SqlColumn isValueCompatible = column("is_value_compatible", JDBCType.INTEGER); + + public LambdaExpression() { + super("lambda_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionMapper.java new file mode 100644 index 00000000..9f21f1dd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LambdaExpressionMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.LambdaExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.LambdaExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface LambdaExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, parameterListHashId, bodyHashId, isVoidCompatible, isValueCompatible); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parameter_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="is_void_compatible", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="is_value_compatible", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parameter_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="is_void_compatible", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="is_value_compatible", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, lambdaExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, lambdaExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default int insert(LambdaExpression record) { + return MyBatis3Utils.insert(this::insert, record, lambdaExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parameterListHashId).toProperty("parameterListHashId") + .map(bodyHashId).toProperty("bodyHashId") + .map(isVoidCompatible).toProperty("isVoidCompatible") + .map(isValueCompatible).toProperty("isValueCompatible") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, lambdaExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parameterListHashId).toProperty("parameterListHashId") + .map(bodyHashId).toProperty("bodyHashId") + .map(isVoidCompatible).toProperty("isVoidCompatible") + .map(isValueCompatible).toProperty("isValueCompatible") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default int insertSelective(LambdaExpression record) { + return MyBatis3Utils.insert(this::insert, record, lambdaExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(parameterListHashId).toPropertyWhenPresent("parameterListHashId", record::getParameterListHashId) + .map(bodyHashId).toPropertyWhenPresent("bodyHashId", record::getBodyHashId) + .map(isVoidCompatible).toPropertyWhenPresent("isVoidCompatible", record::getIsVoidCompatible) + .map(isValueCompatible).toPropertyWhenPresent("isValueCompatible", record::getIsValueCompatible) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, lambdaExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, lambdaExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, lambdaExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, lambdaExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + static UpdateDSL updateAllColumns(LambdaExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(parameterListHashId).equalTo(record::getParameterListHashId) + .set(bodyHashId).equalTo(record::getBodyHashId) + .set(isVoidCompatible).equalTo(record::getIsVoidCompatible) + .set(isValueCompatible).equalTo(record::getIsValueCompatible); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: lambda_expression") + static UpdateDSL updateSelectiveColumns(LambdaExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(parameterListHashId).equalToWhenPresent(record::getParameterListHashId) + .set(bodyHashId).equalToWhenPresent(record::getBodyHashId) + .set(isVoidCompatible).equalToWhenPresent(record::getIsVoidCompatible) + .set(isValueCompatible).equalToWhenPresent(record::getIsValueCompatible); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassDynamicSqlSupport.java new file mode 100644 index 00000000..25b6bcf9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class LocalClassDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + public static final LocalClass localClass = new LocalClass(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.element_hash_id") + public static final SqlColumn elementHashId = localClass.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.name") + public static final SqlColumn name = localClass.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.debug_message") + public static final SqlColumn debugMessage = localClass.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.location_hash_id") + public static final SqlColumn locationHashId = localClass.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_class.parent_hash_id") + public static final SqlColumn parentHashId = localClass.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + public static final class LocalClass extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public LocalClass() { + super("local_class"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassMapper.java new file mode 100644 index 00000000..e6cd66e9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalClassMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.LocalClassDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.LocalClass; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface LocalClassMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, debugMessage, locationHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, localClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, localClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default int insert(LocalClass record) { + return MyBatis3Utils.insert(this::insert, record, localClass, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, localClass, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default int insertSelective(LocalClass record) { + return MyBatis3Utils.insert(this::insert, record, localClass, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, localClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, localClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, localClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, localClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + static UpdateDSL updateAllColumns(LocalClass record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_class") + static UpdateDSL updateSelectiveColumns(LocalClass record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableDynamicSqlSupport.java new file mode 100644 index 00000000..eeff8f11 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class LocalVariableDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + public static final LocalVariable localVariable = new LocalVariable(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.element_hash_id") + public static final SqlColumn elementHashId = localVariable.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.parent_hash_id") + public static final SqlColumn parentHashId = localVariable.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.location_hash_id") + public static final SqlColumn locationHashId = localVariable.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.debug_message") + public static final SqlColumn debugMessage = localVariable.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.name") + public static final SqlColumn name = localVariable.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: local_variable.index_order") + public static final SqlColumn indexOrder = localVariable.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + public static final class LocalVariable extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public LocalVariable() { + super("local_variable"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableMapper.java new file mode 100644 index 00000000..1039970f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocalVariableMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.LocalVariableDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.LocalVariable; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface LocalVariableMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, parentHashId, locationHashId, debugMessage, name, indexOrder); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, localVariable, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, localVariable, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default int insert(LocalVariable record) { + return MyBatis3Utils.insert(this::insert, record, localVariable, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(name).toProperty("name") + .map(indexOrder).toProperty("indexOrder") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, localVariable, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(name).toProperty("name") + .map(indexOrder).toProperty("indexOrder") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default int insertSelective(LocalVariable record) { + return MyBatis3Utils.insert(this::insert, record, localVariable, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, localVariable, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, localVariable, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, localVariable, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, localVariable, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + static UpdateDSL updateAllColumns(LocalVariable record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(name).equalTo(record::getName) + .set(indexOrder).equalTo(record::getIndexOrder); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: local_variable") + static UpdateDSL updateSelectiveColumns(LocalVariable record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(name).equalToWhenPresent(record::getName) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationDynamicSqlSupport.java new file mode 100644 index 00000000..d326baae --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class LocationDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + public static final Location location = new Location(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.element_hash_id") + public static final SqlColumn elementHashId = location.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.file_hash_id") + public static final SqlColumn fileHashId = location.fileHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_line_number") + public static final SqlColumn startLineNumber = location.startLineNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.start_column_number") + public static final SqlColumn startColumnNumber = location.startColumnNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_line_number") + public static final SqlColumn endLineNumber = location.endLineNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: location.end_column_number") + public static final SqlColumn endColumnNumber = location.endColumnNumber; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + public static final class Location extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn fileHashId = column("file_hash_id", JDBCType.BIGINT); + + public final SqlColumn startLineNumber = column("start_line_number", JDBCType.INTEGER); + + public final SqlColumn startColumnNumber = column("start_column_number", JDBCType.INTEGER); + + public final SqlColumn endLineNumber = column("end_line_number", JDBCType.INTEGER); + + public final SqlColumn endColumnNumber = column("end_column_number", JDBCType.INTEGER); + + public Location() { + super("location"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationMapper.java new file mode 100644 index 00000000..0e280206 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LocationMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.LocationDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Location; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface LocationMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, fileHashId, startLineNumber, startColumnNumber, endLineNumber, endColumnNumber); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="start_line_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="start_column_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="end_line_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="end_column_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="file_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="start_line_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="start_column_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="end_line_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="end_column_number", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, location, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, location, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default int insert(Location record) { + return MyBatis3Utils.insert(this::insert, record, location, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(fileHashId).toProperty("fileHashId") + .map(startLineNumber).toProperty("startLineNumber") + .map(startColumnNumber).toProperty("startColumnNumber") + .map(endLineNumber).toProperty("endLineNumber") + .map(endColumnNumber).toProperty("endColumnNumber") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, location, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(fileHashId).toProperty("fileHashId") + .map(startLineNumber).toProperty("startLineNumber") + .map(startColumnNumber).toProperty("startColumnNumber") + .map(endLineNumber).toProperty("endLineNumber") + .map(endColumnNumber).toProperty("endColumnNumber") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default int insertSelective(Location record) { + return MyBatis3Utils.insert(this::insert, record, location, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(fileHashId).toPropertyWhenPresent("fileHashId", record::getFileHashId) + .map(startLineNumber).toPropertyWhenPresent("startLineNumber", record::getStartLineNumber) + .map(startColumnNumber).toPropertyWhenPresent("startColumnNumber", record::getStartColumnNumber) + .map(endLineNumber).toPropertyWhenPresent("endLineNumber", record::getEndLineNumber) + .map(endColumnNumber).toPropertyWhenPresent("endColumnNumber", record::getEndColumnNumber) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, location, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, location, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, location, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, location, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + static UpdateDSL updateAllColumns(Location record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(fileHashId).equalTo(record::getFileHashId) + .set(startLineNumber).equalTo(record::getStartLineNumber) + .set(startColumnNumber).equalTo(record::getStartColumnNumber) + .set(endLineNumber).equalTo(record::getEndLineNumber) + .set(endColumnNumber).equalTo(record::getEndColumnNumber); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: location") + static UpdateDSL updateSelectiveColumns(Location record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(fileHashId).equalToWhenPresent(record::getFileHashId) + .set(startLineNumber).equalToWhenPresent(record::getStartLineNumber) + .set(startColumnNumber).equalToWhenPresent(record::getStartColumnNumber) + .set(endLineNumber).equalToWhenPresent(record::getEndLineNumber) + .set(endColumnNumber).equalToWhenPresent(record::getEndColumnNumber); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..850a64d0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class LongLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + public static final LongLiteral longLiteral = new LongLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.element_hash_id") + public static final SqlColumn elementHashId = longLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: long_literal.value") + public static final SqlColumn value = longLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + public static final class LongLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public LongLiteral() { + super("long_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralMapper.java new file mode 100644 index 00000000..e394c9e8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/LongLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.LongLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.LongLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface LongLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, longLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, longLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default int insert(LongLiteral record) { + return MyBatis3Utils.insert(this::insert, record, longLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, longLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default int insertSelective(LongLiteral record) { + return MyBatis3Utils.insert(this::insert, record, longLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, longLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, longLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, longLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, longLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + static UpdateDSL updateAllColumns(LongLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: long_literal") + static UpdateDSL updateSelectiveColumns(LongLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoDynamicSqlSupport.java new file mode 100644 index 00000000..f3db017c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class MetainfoDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + public static final Metainfo metainfo = new Metainfo(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.oid") + public static final SqlColumn oid = metainfo.oid; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.kind") + public static final SqlColumn kind = metainfo.kind; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.value") + public static final SqlColumn value = metainfo.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: metainfo.program_hash_id") + public static final SqlColumn programHashId = metainfo.programHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + public static final class Metainfo extends SqlTable { + public final SqlColumn oid = column("oid", JDBCType.BIGINT); + + public final SqlColumn kind = column("kind", JDBCType.VARCHAR); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public final SqlColumn programHashId = column("program_hash_id", JDBCType.BIGINT); + + public Metainfo() { + super("metainfo"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoMapper.java new file mode 100644 index 00000000..88cbf465 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MetainfoMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.MetainfoDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Metainfo; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface MetainfoMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + BasicColumn[] selectList = BasicColumn.columnList(oid, kind, value, programHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="oid", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="kind", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="program_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="oid", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="kind", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="program_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, metainfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, metainfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default int insert(Metainfo record) { + return MyBatis3Utils.insert(this::insert, record, metainfo, c -> + c.map(oid).toProperty("oid") + .map(kind).toProperty("kind") + .map(value).toProperty("value") + .map(programHashId).toProperty("programHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, metainfo, c -> + c.map(oid).toProperty("oid") + .map(kind).toProperty("kind") + .map(value).toProperty("value") + .map(programHashId).toProperty("programHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default int insertSelective(Metainfo record) { + return MyBatis3Utils.insert(this::insert, record, metainfo, c -> + c.map(oid).toPropertyWhenPresent("oid", record::getOid) + .map(kind).toPropertyWhenPresent("kind", record::getKind) + .map(value).toPropertyWhenPresent("value", record::getValue) + .map(programHashId).toPropertyWhenPresent("programHashId", record::getProgramHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, metainfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, metainfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, metainfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, metainfo, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + static UpdateDSL updateAllColumns(Metainfo record, UpdateDSL dsl) { + return dsl.set(oid).equalTo(record::getOid) + .set(kind).equalTo(record::getKind) + .set(value).equalTo(record::getValue) + .set(programHashId).equalTo(record::getProgramHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: metainfo") + static UpdateDSL updateSelectiveColumns(Metainfo record, UpdateDSL dsl) { + return dsl.set(oid).equalToWhenPresent(record::getOid) + .set(kind).equalToWhenPresent(record::getKind) + .set(value).equalToWhenPresent(record::getValue) + .set(programHashId).equalToWhenPresent(record::getProgramHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeDynamicSqlSupport.java new file mode 100644 index 00000000..f85404bc --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class MethodAccessExpressionWithTypeDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + public static final MethodAccessExpressionWithType methodAccessExpressionWithType = new MethodAccessExpressionWithType(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.element_hash_id") + public static final SqlColumn elementHashId = methodAccessExpressionWithType.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.type_hash_id") + public static final SqlColumn typeHashId = methodAccessExpressionWithType.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.referen_method_hash_id") + public static final SqlColumn referenMethodHashId = methodAccessExpressionWithType.referenMethodHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_with_type.argument_list_hash_id") + public static final SqlColumn argumentListHashId = methodAccessExpressionWithType.argumentListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + public static final class MethodAccessExpressionWithType extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public final SqlColumn referenMethodHashId = column("referen_method_hash_id", JDBCType.BIGINT); + + public final SqlColumn argumentListHashId = column("argument_list_hash_id", JDBCType.BIGINT); + + public MethodAccessExpressionWithType() { + super("method_access_expression_with_type"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeMapper.java new file mode 100644 index 00000000..4b9e6461 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithTypeMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.MethodAccessExpressionWithTypeDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.MethodAccessExpressionWithType; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface MethodAccessExpressionWithTypeMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, typeHashId, referenMethodHashId, argumentListHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="referen_method_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="referen_method_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, methodAccessExpressionWithType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, methodAccessExpressionWithType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default int insert(MethodAccessExpressionWithType record) { + return MyBatis3Utils.insert(this::insert, record, methodAccessExpressionWithType, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeHashId).toProperty("typeHashId") + .map(referenMethodHashId).toProperty("referenMethodHashId") + .map(argumentListHashId).toProperty("argumentListHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, methodAccessExpressionWithType, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeHashId).toProperty("typeHashId") + .map(referenMethodHashId).toProperty("referenMethodHashId") + .map(argumentListHashId).toProperty("argumentListHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default int insertSelective(MethodAccessExpressionWithType record) { + return MyBatis3Utils.insert(this::insert, record, methodAccessExpressionWithType, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + .map(referenMethodHashId).toPropertyWhenPresent("referenMethodHashId", record::getReferenMethodHashId) + .map(argumentListHashId).toPropertyWhenPresent("argumentListHashId", record::getArgumentListHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, methodAccessExpressionWithType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, methodAccessExpressionWithType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, methodAccessExpressionWithType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, methodAccessExpressionWithType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + static UpdateDSL updateAllColumns(MethodAccessExpressionWithType record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(referenMethodHashId).equalTo(record::getReferenMethodHashId) + .set(argumentListHashId).equalTo(record::getArgumentListHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_with_type") + static UpdateDSL updateSelectiveColumns(MethodAccessExpressionWithType record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(referenMethodHashId).equalToWhenPresent(record::getReferenMethodHashId) + .set(argumentListHashId).equalToWhenPresent(record::getArgumentListHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeDynamicSqlSupport.java new file mode 100644 index 00000000..e2f8ba36 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class MethodAccessExpressionWithoutTypeDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + public static final MethodAccessExpressionWithoutType methodAccessExpressionWithoutType = new MethodAccessExpressionWithoutType(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.element_hash_id") + public static final SqlColumn elementHashId = methodAccessExpressionWithoutType.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.referen_method_hash_id") + public static final SqlColumn referenMethodHashId = methodAccessExpressionWithoutType.referenMethodHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_access_expression_without_type.argument_list_hash_id") + public static final SqlColumn argumentListHashId = methodAccessExpressionWithoutType.argumentListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + public static final class MethodAccessExpressionWithoutType extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn referenMethodHashId = column("referen_method_hash_id", JDBCType.BIGINT); + + public final SqlColumn argumentListHashId = column("argument_list_hash_id", JDBCType.BIGINT); + + public MethodAccessExpressionWithoutType() { + super("method_access_expression_without_type"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeMapper.java new file mode 100644 index 00000000..44e07cc4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodAccessExpressionWithoutTypeMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.MethodAccessExpressionWithoutTypeDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.MethodAccessExpressionWithoutType; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface MethodAccessExpressionWithoutTypeMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, referenMethodHashId, argumentListHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="referen_method_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="referen_method_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="argument_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, methodAccessExpressionWithoutType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, methodAccessExpressionWithoutType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default int insert(MethodAccessExpressionWithoutType record) { + return MyBatis3Utils.insert(this::insert, record, methodAccessExpressionWithoutType, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenMethodHashId).toProperty("referenMethodHashId") + .map(argumentListHashId).toProperty("argumentListHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, methodAccessExpressionWithoutType, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenMethodHashId).toProperty("referenMethodHashId") + .map(argumentListHashId).toProperty("argumentListHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default int insertSelective(MethodAccessExpressionWithoutType record) { + return MyBatis3Utils.insert(this::insert, record, methodAccessExpressionWithoutType, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(referenMethodHashId).toPropertyWhenPresent("referenMethodHashId", record::getReferenMethodHashId) + .map(argumentListHashId).toPropertyWhenPresent("argumentListHashId", record::getArgumentListHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, methodAccessExpressionWithoutType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, methodAccessExpressionWithoutType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, methodAccessExpressionWithoutType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, methodAccessExpressionWithoutType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + static UpdateDSL updateAllColumns(MethodAccessExpressionWithoutType record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(referenMethodHashId).equalTo(record::getReferenMethodHashId) + .set(argumentListHashId).equalTo(record::getArgumentListHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_access_expression_without_type") + static UpdateDSL updateSelectiveColumns(MethodAccessExpressionWithoutType record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(referenMethodHashId).equalToWhenPresent(record::getReferenMethodHashId) + .set(argumentListHashId).equalToWhenPresent(record::getArgumentListHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodDynamicSqlSupport.java new file mode 100644 index 00000000..c281601e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodDynamicSqlSupport.java @@ -0,0 +1,53 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class MethodDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + public static final Method method = new Method(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.element_hash_id") + public static final SqlColumn elementHashId = method.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.name") + public static final SqlColumn name = method.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.signature") + public static final SqlColumn signature = method.signature; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.type_hash_id") + public static final SqlColumn typeHashId = method.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.parent_hash_id") + public static final SqlColumn parentHashId = method.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.location_hash_id") + public static final SqlColumn locationHashId = method.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method.definition_body") + public static final SqlColumn definitionBody = method.definitionBody; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + public static final class Method extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn signature = column("signature", JDBCType.VARCHAR); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn definitionBody = column("definition_body", JDBCType.VARCHAR); + + public Method() { + super("method"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodMapper.java new file mode 100644 index 00000000..c43debf8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodMapper.java @@ -0,0 +1,215 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.MethodDynamicSqlSupport.*; +import static org.mybatis.dynamic.sql.SqlBuilder.*; + +import com.alipay.codequery.dal.mybatis.domain.Method; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface MethodMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, signature, typeHashId, parentHashId, locationHashId, definitionBody); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="signature", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="definition_body", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="signature", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="definition_body", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, method, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, method, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int deleteByPrimaryKey(Long elementHashId_) { + return delete(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int insert(Method record) { + return MyBatis3Utils.insert(this::insert, record, method, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(signature).toProperty("signature") + .map(typeHashId).toProperty("typeHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(definitionBody).toProperty("definitionBody") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, method, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(signature).toProperty("signature") + .map(typeHashId).toProperty("typeHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(definitionBody).toProperty("definitionBody") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int insertSelective(Method record) { + return MyBatis3Utils.insert(this::insert, record, method, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(signature).toPropertyWhenPresent("signature", record::getSignature) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(definitionBody).toPropertyWhenPresent("definitionBody", record::getDefinitionBody) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, method, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, method, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, method, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default Optional selectByPrimaryKey(Long elementHashId_) { + return selectOne(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, method, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + static UpdateDSL updateAllColumns(Method record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(signature).equalTo(record::getSignature) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(definitionBody).equalTo(record::getDefinitionBody); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + static UpdateDSL updateSelectiveColumns(Method record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(signature).equalToWhenPresent(record::getSignature) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(definitionBody).equalToWhenPresent(record::getDefinitionBody); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int updateByPrimaryKey(Method record) { + return update(c -> + c.set(name).equalTo(record::getName) + .set(signature).equalTo(record::getSignature) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(definitionBody).equalTo(record::getDefinitionBody) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method") + default int updateByPrimaryKeySelective(Method record) { + return update(c -> + c.set(name).equalToWhenPresent(record::getName) + .set(signature).equalToWhenPresent(record::getSignature) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(definitionBody).equalToWhenPresent(record::getDefinitionBody) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..d9386103 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class MethodReferenceExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + public static final MethodReferenceExpression methodReferenceExpression = new MethodReferenceExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.element_hash_id") + public static final SqlColumn elementHashId = methodReferenceExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: method_reference_expression.is_constructor") + public static final SqlColumn isConstructor = methodReferenceExpression.isConstructor; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + public static final class MethodReferenceExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn isConstructor = column("is_constructor", JDBCType.INTEGER); + + public MethodReferenceExpression() { + super("method_reference_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionMapper.java new file mode 100644 index 00000000..13a0ea05 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/MethodReferenceExpressionMapper.java @@ -0,0 +1,170 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.MethodReferenceExpressionDynamicSqlSupport.*; +import static org.mybatis.dynamic.sql.SqlBuilder.*; + +import com.alipay.codequery.dal.mybatis.domain.MethodReferenceExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface MethodReferenceExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, isConstructor); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="is_constructor", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="is_constructor", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, methodReferenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, methodReferenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int deleteByPrimaryKey(Long elementHashId_) { + return delete(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int insert(MethodReferenceExpression record) { + return MyBatis3Utils.insert(this::insert, record, methodReferenceExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(isConstructor).toProperty("isConstructor") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, methodReferenceExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(isConstructor).toProperty("isConstructor") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int insertSelective(MethodReferenceExpression record) { + return MyBatis3Utils.insert(this::insert, record, methodReferenceExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(isConstructor).toPropertyWhenPresent("isConstructor", record::getIsConstructor) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, methodReferenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, methodReferenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, methodReferenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default Optional selectByPrimaryKey(Long elementHashId_) { + return selectOne(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, methodReferenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + static UpdateDSL updateAllColumns(MethodReferenceExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(isConstructor).equalTo(record::getIsConstructor); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + static UpdateDSL updateSelectiveColumns(MethodReferenceExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(isConstructor).equalToWhenPresent(record::getIsConstructor); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int updateByPrimaryKey(MethodReferenceExpression record) { + return update(c -> + c.set(isConstructor).equalTo(record::getIsConstructor) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: method_reference_expression") + default int updateByPrimaryKeySelective(MethodReferenceExpression record) { + return update(c -> + c.set(isConstructor).equalToWhenPresent(record::getIsConstructor) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierDynamicSqlSupport.java new file mode 100644 index 00000000..8f09181f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ModifierDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + public static final Modifier modifier = new Modifier(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.element_hash_id") + public static final SqlColumn elementHashId = modifier.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.name") + public static final SqlColumn name = modifier.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.parent_hash_id") + public static final SqlColumn parentHashId = modifier.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier.location_hash_id") + public static final SqlColumn locationHashId = modifier.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + public static final class Modifier extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public Modifier() { + super("modifier"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListDynamicSqlSupport.java new file mode 100644 index 00000000..c5f7943f --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ModifierListDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + public static final ModifierList modifierList = new ModifierList(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.element_hash_id") + public static final SqlColumn elementHashId = modifierList.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.parent_hash_id") + public static final SqlColumn parentHashId = modifierList.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: modifier_list.location_hash_id") + public static final SqlColumn locationHashId = modifierList.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + public static final class ModifierList extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public ModifierList() { + super("modifier_list"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListMapper.java new file mode 100644 index 00000000..318192ed --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierListMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ModifierListDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ModifierList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ModifierListMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, modifierList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, modifierList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default int insert(ModifierList record) { + return MyBatis3Utils.insert(this::insert, record, modifierList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, modifierList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default int insertSelective(ModifierList record) { + return MyBatis3Utils.insert(this::insert, record, modifierList, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, modifierList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, modifierList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, modifierList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, modifierList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + static UpdateDSL updateAllColumns(ModifierList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier_list") + static UpdateDSL updateSelectiveColumns(ModifierList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierMapper.java new file mode 100644 index 00000000..fc6853fb --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModifierMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ModifierDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Modifier; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ModifierMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, modifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, modifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default int insert(Modifier record) { + return MyBatis3Utils.insert(this::insert, record, modifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, modifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default int insertSelective(Modifier record) { + return MyBatis3Utils.insert(this::insert, record, modifier, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, modifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, modifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, modifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, modifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + static UpdateDSL updateAllColumns(Modifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: modifier") + static UpdateDSL updateSelectiveColumns(Modifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleDynamicSqlSupport.java new file mode 100644 index 00000000..0c85001c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ModuleDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + public static final Module module = new Module(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.element_hash_id") + public static final SqlColumn elementHashId = module.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: module.name") + public static final SqlColumn name = module.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + public static final class Module extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public Module() { + super("module"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleMapper.java new file mode 100644 index 00000000..7ffeebdd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ModuleMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ModuleDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Module; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ModuleMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, module, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, module, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default int insert(Module record) { + return MyBatis3Utils.insert(this::insert, record, module, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, module, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default int insertSelective(Module record) { + return MyBatis3Utils.insert(this::insert, record, module, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, module, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, module, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, module, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, module, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + static UpdateDSL updateAllColumns(Module record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: module") + static UpdateDSL updateSelectiveColumns(Module record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringDynamicSqlSupport.java new file mode 100644 index 00000000..4f5a7cdd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NameStringDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + public static final NameString nameString = new NameString(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.parent_hash_id") + public static final SqlColumn parentHashId = nameString.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.name_element_hash_id") + public static final SqlColumn nameElementHashId = nameString.nameElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: name_string.value_element_hash_id") + public static final SqlColumn valueElementHashId = nameString.valueElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + public static final class NameString extends SqlTable { + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn nameElementHashId = column("name_element_hash_id", JDBCType.BIGINT); + + public final SqlColumn valueElementHashId = column("value_element_hash_id", JDBCType.BIGINT); + + public NameString() { + super("name_string"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringMapper.java new file mode 100644 index 00000000..fa85b7fe --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NameStringMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NameStringDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NameString; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NameStringMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + BasicColumn[] selectList = BasicColumn.columnList(parentHashId, nameElementHashId, valueElementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, nameString, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, nameString, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default int insert(NameString record) { + return MyBatis3Utils.insert(this::insert, record, nameString, c -> + c.map(parentHashId).toProperty("parentHashId") + .map(nameElementHashId).toProperty("nameElementHashId") + .map(valueElementHashId).toProperty("valueElementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, nameString, c -> + c.map(parentHashId).toProperty("parentHashId") + .map(nameElementHashId).toProperty("nameElementHashId") + .map(valueElementHashId).toProperty("valueElementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default int insertSelective(NameString record) { + return MyBatis3Utils.insert(this::insert, record, nameString, c -> + c.map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(nameElementHashId).toPropertyWhenPresent("nameElementHashId", record::getNameElementHashId) + .map(valueElementHashId).toPropertyWhenPresent("valueElementHashId", record::getValueElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, nameString, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, nameString, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, nameString, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, nameString, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + static UpdateDSL updateAllColumns(NameString record, UpdateDSL dsl) { + return dsl.set(parentHashId).equalTo(record::getParentHashId) + .set(nameElementHashId).equalTo(record::getNameElementHashId) + .set(valueElementHashId).equalTo(record::getValueElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: name_string") + static UpdateDSL updateSelectiveColumns(NameString record, UpdateDSL dsl) { + return dsl.set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(nameElementHashId).equalToWhenPresent(record::getNameElementHashId) + .set(valueElementHashId).equalToWhenPresent(record::getValueElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..edb3beb2 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NewExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + public static final NewExpression newExpression = new NewExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.element_hash_id") + public static final SqlColumn elementHashId = newExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.reference_hash_id") + public static final SqlColumn referenceHashId = newExpression.referenceHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: new_expression.type_hash_id") + public static final SqlColumn typeHashId = newExpression.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + public static final class NewExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn referenceHashId = column("reference_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public NewExpression() { + super("new_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionMapper.java new file mode 100644 index 00000000..69bb074e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NewExpressionMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NewExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NewExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NewExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, referenceHashId, typeHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, newExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, newExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default int insert(NewExpression record) { + return MyBatis3Utils.insert(this::insert, record, newExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceHashId).toProperty("referenceHashId") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, newExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceHashId).toProperty("referenceHashId") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default int insertSelective(NewExpression record) { + return MyBatis3Utils.insert(this::insert, record, newExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(referenceHashId).toPropertyWhenPresent("referenceHashId", record::getReferenceHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, newExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, newExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, newExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, newExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + static UpdateDSL updateAllColumns(NewExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(referenceHashId).equalTo(record::getReferenceHashId) + .set(typeHashId).equalTo(record::getTypeHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: new_expression") + static UpdateDSL updateSelectiveColumns(NewExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(referenceHashId).equalToWhenPresent(record::getReferenceHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassDynamicSqlSupport.java new file mode 100644 index 00000000..d501e7a6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NpClassDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + public static final NpClass npClass = new NpClass(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.element_hash_id") + public static final SqlColumn elementHashId = npClass.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.name") + public static final SqlColumn name = npClass.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.qualified_name") + public static final SqlColumn qualifiedName = npClass.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_class.parent_hash_id") + public static final SqlColumn parentHashId = npClass.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + public static final class NpClass extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public NpClass() { + super("np_class"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassMapper.java new file mode 100644 index 00000000..fa172dc1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpClassMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NpClassDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NpClass; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NpClassMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, qualifiedName, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, npClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, npClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default int insert(NpClass record) { + return MyBatis3Utils.insert(this::insert, record, npClass, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(qualifiedName).toProperty("qualifiedName") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, npClass, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(qualifiedName).toProperty("qualifiedName") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default int insertSelective(NpClass record) { + return MyBatis3Utils.insert(this::insert, record, npClass, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, npClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, npClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, npClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, npClass, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + static UpdateDSL updateAllColumns(NpClass record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_class") + static UpdateDSL updateSelectiveColumns(NpClass record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileDynamicSqlSupport.java new file mode 100644 index 00000000..02cbc991 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NpFileDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + public static final NpFile npFile = new NpFile(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.element_hash_id") + public static final SqlColumn elementHashId = npFile.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.qualified_name") + public static final SqlColumn qualifiedName = npFile.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.name") + public static final SqlColumn name = npFile.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_file.project_hash_id") + public static final SqlColumn projectHashId = npFile.projectHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + public static final class NpFile extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn projectHashId = column("project_hash_id", JDBCType.BIGINT); + + public NpFile() { + super("np_file"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileMapper.java new file mode 100644 index 00000000..d25d274c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpFileMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NpFileDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NpFile; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NpFileMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifiedName, name, projectHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="project_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="project_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, npFile, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, npFile, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default int insert(NpFile record) { + return MyBatis3Utils.insert(this::insert, record, npFile, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(name).toProperty("name") + .map(projectHashId).toProperty("projectHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, npFile, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(name).toProperty("name") + .map(projectHashId).toProperty("projectHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default int insertSelective(NpFile record) { + return MyBatis3Utils.insert(this::insert, record, npFile, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(projectHashId).toPropertyWhenPresent("projectHashId", record::getProjectHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, npFile, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, npFile, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, npFile, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, npFile, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + static UpdateDSL updateAllColumns(NpFile record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(name).equalTo(record::getName) + .set(projectHashId).equalTo(record::getProjectHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_file") + static UpdateDSL updateSelectiveColumns(NpFile record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(name).equalToWhenPresent(record::getName) + .set(projectHashId).equalToWhenPresent(record::getProjectHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceDynamicSqlSupport.java new file mode 100644 index 00000000..176b5399 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NpInterfaceDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + public static final NpInterface npInterface = new NpInterface(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.element_hash_id") + public static final SqlColumn elementHashId = npInterface.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.name") + public static final SqlColumn name = npInterface.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.qualified_name") + public static final SqlColumn qualifiedName = npInterface.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_interface.parent_hash_id") + public static final SqlColumn parentHashId = npInterface.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + public static final class NpInterface extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public NpInterface() { + super("np_interface"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceMapper.java new file mode 100644 index 00000000..281a0691 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpInterfaceMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NpInterfaceDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NpInterface; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NpInterfaceMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, qualifiedName, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, npInterface, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, npInterface, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default int insert(NpInterface record) { + return MyBatis3Utils.insert(this::insert, record, npInterface, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(qualifiedName).toProperty("qualifiedName") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, npInterface, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(qualifiedName).toProperty("qualifiedName") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default int insertSelective(NpInterface record) { + return MyBatis3Utils.insert(this::insert, record, npInterface, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, npInterface, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, npInterface, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, npInterface, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, npInterface, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + static UpdateDSL updateAllColumns(NpInterface record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_interface") + static UpdateDSL updateSelectiveColumns(NpInterface record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodDynamicSqlSupport.java new file mode 100644 index 00000000..80dccdef --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NpMethodDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + public static final NpMethod npMethod = new NpMethod(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.element_hash_id") + public static final SqlColumn elementHashId = npMethod.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.name") + public static final SqlColumn name = npMethod.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.signature") + public static final SqlColumn signature = npMethod.signature; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.type_hash_id") + public static final SqlColumn typeHashId = npMethod.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_method.parent_hash_id") + public static final SqlColumn parentHashId = npMethod.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + public static final class NpMethod extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn signature = column("signature", JDBCType.VARCHAR); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public NpMethod() { + super("np_method"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodMapper.java new file mode 100644 index 00000000..e9a0e83d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpMethodMapper.java @@ -0,0 +1,197 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NpMethodDynamicSqlSupport.*; +import static org.mybatis.dynamic.sql.SqlBuilder.*; + +import com.alipay.codequery.dal.mybatis.domain.NpMethod; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NpMethodMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, signature, typeHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="signature", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="signature", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, npMethod, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, npMethod, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int deleteByPrimaryKey(Long elementHashId_) { + return delete(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int insert(NpMethod record) { + return MyBatis3Utils.insert(this::insert, record, npMethod, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(signature).toProperty("signature") + .map(typeHashId).toProperty("typeHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, npMethod, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(signature).toProperty("signature") + .map(typeHashId).toProperty("typeHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int insertSelective(NpMethod record) { + return MyBatis3Utils.insert(this::insert, record, npMethod, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(signature).toPropertyWhenPresent("signature", record::getSignature) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, npMethod, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, npMethod, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, npMethod, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default Optional selectByPrimaryKey(Long elementHashId_) { + return selectOne(c -> + c.where(elementHashId, isEqualTo(elementHashId_)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, npMethod, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + static UpdateDSL updateAllColumns(NpMethod record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(signature).equalTo(record::getSignature) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + static UpdateDSL updateSelectiveColumns(NpMethod record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(signature).equalToWhenPresent(record::getSignature) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int updateByPrimaryKey(NpMethod record) { + return update(c -> + c.set(name).equalTo(record::getName) + .set(signature).equalTo(record::getSignature) + .set(typeHashId).equalTo(record::getTypeHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_method") + default int updateByPrimaryKeySelective(NpMethod record) { + return update(c -> + c.set(name).equalToWhenPresent(record::getName) + .set(signature).equalToWhenPresent(record::getSignature) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .where(elementHashId, isEqualTo(record::getElementHashId)) + ); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectDynamicSqlSupport.java new file mode 100644 index 00000000..7b0dc269 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NpProjectDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + public static final NpProject npProject = new NpProject(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.element_hash_id") + public static final SqlColumn elementHashId = npProject.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.extension") + public static final SqlColumn extension = npProject.extension; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: np_project.name") + public static final SqlColumn name = npProject.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + public static final class NpProject extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn extension = column("extension", JDBCType.VARCHAR); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public NpProject() { + super("np_project"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectMapper.java new file mode 100644 index 00000000..a27fddee --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NpProjectMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NpProjectDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NpProject; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NpProjectMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, extension, name); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="extension", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="extension", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, npProject, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, npProject, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default int insert(NpProject record) { + return MyBatis3Utils.insert(this::insert, record, npProject, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(extension).toProperty("extension") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, npProject, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(extension).toProperty("extension") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default int insertSelective(NpProject record) { + return MyBatis3Utils.insert(this::insert, record, npProject, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(extension).toPropertyWhenPresent("extension", record::getExtension) + .map(name).toPropertyWhenPresent("name", record::getName) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, npProject, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, npProject, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, npProject, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, npProject, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + static UpdateDSL updateAllColumns(NpProject record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(extension).equalTo(record::getExtension) + .set(name).equalTo(record::getName); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: np_project") + static UpdateDSL updateSelectiveColumns(NpProject record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(extension).equalToWhenPresent(record::getExtension) + .set(name).equalToWhenPresent(record::getName); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..44e9b4e4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NullLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + public static final NullLiteral nullLiteral = new NullLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.element_hash_id") + public static final SqlColumn elementHashId = nullLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: null_literal.value") + public static final SqlColumn value = nullLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + public static final class NullLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public NullLiteral() { + super("null_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralMapper.java new file mode 100644 index 00000000..982c59d0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NullLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NullLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NullLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NullLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, nullLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, nullLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default int insert(NullLiteral record) { + return MyBatis3Utils.insert(this::insert, record, nullLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, nullLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default int insertSelective(NullLiteral record) { + return MyBatis3Utils.insert(this::insert, record, nullLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, nullLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, nullLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, nullLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, nullLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + static UpdateDSL updateAllColumns(NullLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: null_literal") + static UpdateDSL updateSelectiveColumns(NullLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesDynamicSqlSupport.java new file mode 100644 index 00000000..11c0545d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class NumberOfLinesDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + public static final NumberOfLines numberOfLines = new NumberOfLines(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.element_hash_id") + public static final SqlColumn elementHashId = numberOfLines.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_total_lines") + public static final SqlColumn numberOfTotalLines = numberOfLines.numberOfTotalLines; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_valid_lines") + public static final SqlColumn numberOfValidLines = numberOfLines.numberOfValidLines; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: number_of_lines.number_of_comment_lines") + public static final SqlColumn numberOfCommentLines = numberOfLines.numberOfCommentLines; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + public static final class NumberOfLines extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn numberOfTotalLines = column("number_of_total_lines", JDBCType.INTEGER); + + public final SqlColumn numberOfValidLines = column("number_of_valid_lines", JDBCType.INTEGER); + + public final SqlColumn numberOfCommentLines = column("number_of_comment_lines", JDBCType.INTEGER); + + public NumberOfLines() { + super("number_of_lines"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesMapper.java new file mode 100644 index 00000000..8b807217 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/NumberOfLinesMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.NumberOfLinesDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.NumberOfLines; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface NumberOfLinesMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, numberOfTotalLines, numberOfValidLines, numberOfCommentLines); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="number_of_total_lines", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="number_of_valid_lines", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="number_of_comment_lines", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="number_of_total_lines", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="number_of_valid_lines", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="number_of_comment_lines", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, numberOfLines, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, numberOfLines, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default int insert(NumberOfLines record) { + return MyBatis3Utils.insert(this::insert, record, numberOfLines, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(numberOfTotalLines).toProperty("numberOfTotalLines") + .map(numberOfValidLines).toProperty("numberOfValidLines") + .map(numberOfCommentLines).toProperty("numberOfCommentLines") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, numberOfLines, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(numberOfTotalLines).toProperty("numberOfTotalLines") + .map(numberOfValidLines).toProperty("numberOfValidLines") + .map(numberOfCommentLines).toProperty("numberOfCommentLines") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default int insertSelective(NumberOfLines record) { + return MyBatis3Utils.insert(this::insert, record, numberOfLines, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(numberOfTotalLines).toPropertyWhenPresent("numberOfTotalLines", record::getNumberOfTotalLines) + .map(numberOfValidLines).toPropertyWhenPresent("numberOfValidLines", record::getNumberOfValidLines) + .map(numberOfCommentLines).toPropertyWhenPresent("numberOfCommentLines", record::getNumberOfCommentLines) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, numberOfLines, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, numberOfLines, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, numberOfLines, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, numberOfLines, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + static UpdateDSL updateAllColumns(NumberOfLines record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(numberOfTotalLines).equalTo(record::getNumberOfTotalLines) + .set(numberOfValidLines).equalTo(record::getNumberOfValidLines) + .set(numberOfCommentLines).equalTo(record::getNumberOfCommentLines); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: number_of_lines") + static UpdateDSL updateSelectiveColumns(NumberOfLines record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(numberOfTotalLines).equalToWhenPresent(record::getNumberOfTotalLines) + .set(numberOfValidLines).equalToWhenPresent(record::getNumberOfValidLines) + .set(numberOfCommentLines).equalToWhenPresent(record::getNumberOfCommentLines); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementDynamicSqlSupport.java new file mode 100644 index 00000000..0606d7cf --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class PackageStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + public static final PackageStatement packageStatement = new PackageStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.element_hash_id") + public static final SqlColumn elementHashId = packageStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.qualified_name") + public static final SqlColumn qualifiedName = packageStatement.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.location_hash_id") + public static final SqlColumn locationHashId = packageStatement.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.package_hash_id") + public static final SqlColumn packageHashId = packageStatement.packageHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: package_statement.parent_hash_id") + public static final SqlColumn parentHashId = packageStatement.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + public static final class PackageStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn packageHashId = column("package_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public PackageStatement() { + super("package_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementMapper.java new file mode 100644 index 00000000..426b7422 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PackageStatementMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.PackageStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.PackageStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface PackageStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifiedName, locationHashId, packageHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="package_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="package_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, packageStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, packageStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default int insert(PackageStatement record) { + return MyBatis3Utils.insert(this::insert, record, packageStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(locationHashId).toProperty("locationHashId") + .map(packageHashId).toProperty("packageHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, packageStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(locationHashId).toProperty("locationHashId") + .map(packageHashId).toProperty("packageHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default int insertSelective(PackageStatement record) { + return MyBatis3Utils.insert(this::insert, record, packageStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(packageHashId).toPropertyWhenPresent("packageHashId", record::getPackageHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, packageStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, packageStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, packageStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, packageStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + static UpdateDSL updateAllColumns(PackageStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(packageHashId).equalTo(record::getPackageHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: package_statement") + static UpdateDSL updateSelectiveColumns(PackageStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(packageHashId).equalToWhenPresent(record::getPackageHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterDynamicSqlSupport.java new file mode 100644 index 00000000..343640e7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterDynamicSqlSupport.java @@ -0,0 +1,53 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ParameterDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + public static final Parameter parameter = new Parameter(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.element_hash_id") + public static final SqlColumn elementHashId = parameter.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.name") + public static final SqlColumn name = parameter.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.index_order") + public static final SqlColumn indexOrder = parameter.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.parent_hash_id") + public static final SqlColumn parentHashId = parameter.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.location_hash_id") + public static final SqlColumn locationHashId = parameter.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.debug_message") + public static final SqlColumn debugMessage = parameter.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parameter.type_hash_id") + public static final SqlColumn typeHashId = parameter.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + public static final class Parameter extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public Parameter() { + super("parameter"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterMapper.java new file mode 100644 index 00000000..600aa953 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParameterMapper.java @@ -0,0 +1,174 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ParameterDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Parameter; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ParameterMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, name, indexOrder, parentHashId, locationHashId, debugMessage, typeHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, parameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, parameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default int insert(Parameter record) { + return MyBatis3Utils.insert(this::insert, record, parameter, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(indexOrder).toProperty("indexOrder") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, parameter, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(name).toProperty("name") + .map(indexOrder).toProperty("indexOrder") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default int insertSelective(Parameter record) { + return MyBatis3Utils.insert(this::insert, record, parameter, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, parameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, parameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, parameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, parameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + static UpdateDSL updateAllColumns(Parameter record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(name).equalTo(record::getName) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(typeHashId).equalTo(record::getTypeHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parameter") + static UpdateDSL updateSelectiveColumns(Parameter record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(name).equalToWhenPresent(record::getName) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentDynamicSqlSupport.java new file mode 100644 index 00000000..08a817dd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ParentDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + public static final Parent parent = new Parent(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_hash_id") + public static final SqlColumn parentHashId = parent.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: parent.parent_type") + public static final SqlColumn parentType = parent.parentType; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + public static final class Parent extends SqlTable { + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentType = column("parent_type", JDBCType.VARCHAR); + + public Parent() { + super("parent"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentMapper.java new file mode 100644 index 00000000..72f7fbcb --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ParentMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ParentDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Parent; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ParentMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + BasicColumn[] selectList = BasicColumn.columnList(parentHashId, parentType); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, parent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, parent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default int insert(Parent record) { + return MyBatis3Utils.insert(this::insert, record, parent, c -> + c.map(parentHashId).toProperty("parentHashId") + .map(parentType).toProperty("parentType") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, parent, c -> + c.map(parentHashId).toProperty("parentHashId") + .map(parentType).toProperty("parentType") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default int insertSelective(Parent record) { + return MyBatis3Utils.insert(this::insert, record, parent, c -> + c.map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(parentType).toPropertyWhenPresent("parentType", record::getParentType) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, parent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, parent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, parent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, parent, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + static UpdateDSL updateAllColumns(Parent record, UpdateDSL dsl) { + return dsl.set(parentHashId).equalTo(record::getParentHashId) + .set(parentType).equalTo(record::getParentType); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: parent") + static UpdateDSL updateSelectiveColumns(Parent record, UpdateDSL dsl) { + return dsl.set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(parentType).equalToWhenPresent(record::getParentType); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..ae8bfd05 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class PolyadicExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + public static final PolyadicExpression polyadicExpression = new PolyadicExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.element_hash_id") + public static final SqlColumn elementHashId = polyadicExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.size") + public static final SqlColumn size = polyadicExpression.size; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: polyadic_expression.opcode") + public static final SqlColumn opcode = polyadicExpression.opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + public static final class PolyadicExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn size = column("size", JDBCType.INTEGER); + + public final SqlColumn opcode = column("opcode", JDBCType.VARCHAR); + + public PolyadicExpression() { + super("polyadic_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionMapper.java new file mode 100644 index 00000000..5f4459cd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PolyadicExpressionMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.PolyadicExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.PolyadicExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface PolyadicExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, size, opcode); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="size", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="size", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, polyadicExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, polyadicExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default int insert(PolyadicExpression record) { + return MyBatis3Utils.insert(this::insert, record, polyadicExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(size).toProperty("size") + .map(opcode).toProperty("opcode") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, polyadicExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(size).toProperty("size") + .map(opcode).toProperty("opcode") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default int insertSelective(PolyadicExpression record) { + return MyBatis3Utils.insert(this::insert, record, polyadicExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(size).toPropertyWhenPresent("size", record::getSize) + .map(opcode).toPropertyWhenPresent("opcode", record::getOpcode) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, polyadicExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, polyadicExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, polyadicExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, polyadicExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + static UpdateDSL updateAllColumns(PolyadicExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(size).equalTo(record::getSize) + .set(opcode).equalTo(record::getOpcode); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: polyadic_expression") + static UpdateDSL updateSelectiveColumns(PolyadicExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(size).equalToWhenPresent(record::getSize) + .set(opcode).equalToWhenPresent(record::getOpcode); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveDynamicSqlSupport.java new file mode 100644 index 00000000..a4d4a74d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class PrimitiveDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + public static final Primitive primitive = new Primitive(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.oid") + public static final SqlColumn oid = primitive.oid; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: primitive.name") + public static final SqlColumn name = primitive.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + public static final class Primitive extends SqlTable { + public final SqlColumn oid = column("oid", JDBCType.INTEGER); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public Primitive() { + super("primitive"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveMapper.java new file mode 100644 index 00000000..d5112a5a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/PrimitiveMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.PrimitiveDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Primitive; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface PrimitiveMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + BasicColumn[] selectList = BasicColumn.columnList(oid, name); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="oid", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="oid", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, primitive, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, primitive, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default int insert(Primitive record) { + return MyBatis3Utils.insert(this::insert, record, primitive, c -> + c.map(oid).toProperty("oid") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, primitive, c -> + c.map(oid).toProperty("oid") + .map(name).toProperty("name") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default int insertSelective(Primitive record) { + return MyBatis3Utils.insert(this::insert, record, primitive, c -> + c.map(oid).toPropertyWhenPresent("oid", record::getOid) + .map(name).toPropertyWhenPresent("name", record::getName) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, primitive, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, primitive, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, primitive, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, primitive, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + static UpdateDSL updateAllColumns(Primitive record, UpdateDSL dsl) { + return dsl.set(oid).equalTo(record::getOid) + .set(name).equalTo(record::getName); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: primitive") + static UpdateDSL updateSelectiveColumns(Primitive record, UpdateDSL dsl) { + return dsl.set(oid).equalToWhenPresent(record::getOid) + .set(name).equalToWhenPresent(record::getName); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramDynamicSqlSupport.java new file mode 100644 index 00000000..e0be1f86 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ProgramDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + public static final Program program = new Program(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.program_hash_id") + public static final SqlColumn programHashId = program.programHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: program.absolute_prefix_path") + public static final SqlColumn absolutePrefixPath = program.absolutePrefixPath; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + public static final class Program extends SqlTable { + public final SqlColumn programHashId = column("program_hash_id", JDBCType.BIGINT); + + public final SqlColumn absolutePrefixPath = column("absolute_prefix_path", JDBCType.VARCHAR); + + public Program() { + super("program"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramMapper.java new file mode 100644 index 00000000..6b2ca12a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ProgramMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ProgramDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Program; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ProgramMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + BasicColumn[] selectList = BasicColumn.columnList(programHashId, absolutePrefixPath); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="program_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="absolute_prefix_path", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="program_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="absolute_prefix_path", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, program, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, program, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default int insert(Program record) { + return MyBatis3Utils.insert(this::insert, record, program, c -> + c.map(programHashId).toProperty("programHashId") + .map(absolutePrefixPath).toProperty("absolutePrefixPath") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, program, c -> + c.map(programHashId).toProperty("programHashId") + .map(absolutePrefixPath).toProperty("absolutePrefixPath") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default int insertSelective(Program record) { + return MyBatis3Utils.insert(this::insert, record, program, c -> + c.map(programHashId).toPropertyWhenPresent("programHashId", record::getProgramHashId) + .map(absolutePrefixPath).toPropertyWhenPresent("absolutePrefixPath", record::getAbsolutePrefixPath) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, program, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, program, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, program, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, program, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + static UpdateDSL updateAllColumns(Program record, UpdateDSL dsl) { + return dsl.set(programHashId).equalTo(record::getProgramHashId) + .set(absolutePrefixPath).equalTo(record::getAbsolutePrefixPath); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: program") + static UpdateDSL updateSelectiveColumns(Program record, UpdateDSL dsl) { + return dsl.set(programHashId).equalToWhenPresent(record::getProgramHashId) + .set(absolutePrefixPath).equalToWhenPresent(record::getAbsolutePrefixPath); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementDynamicSqlSupport.java new file mode 100644 index 00000000..995eba94 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ReferenceElementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + public static final ReferenceElement referenceElement = new ReferenceElement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.element_hash_id") + public static final SqlColumn elementHashId = referenceElement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.debug_message") + public static final SqlColumn debugMessage = referenceElement.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.parent_hash_id") + public static final SqlColumn parentHashId = referenceElement.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_element.location_hash_id") + public static final SqlColumn locationHashId = referenceElement.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + public static final class ReferenceElement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public ReferenceElement() { + super("reference_element"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementMapper.java new file mode 100644 index 00000000..11a02a1b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceElementMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ReferenceElementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ReferenceElement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ReferenceElementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, debugMessage, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, referenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, referenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default int insert(ReferenceElement record) { + return MyBatis3Utils.insert(this::insert, record, referenceElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, referenceElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default int insertSelective(ReferenceElement record) { + return MyBatis3Utils.insert(this::insert, record, referenceElement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, referenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, referenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, referenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, referenceElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + static UpdateDSL updateAllColumns(ReferenceElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_element") + static UpdateDSL updateSelectiveColumns(ReferenceElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..e39cda45 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionDynamicSqlSupport.java @@ -0,0 +1,23 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ReferenceExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + public static final ReferenceExpression referenceExpression = new ReferenceExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_expression.element_hash_id") + public static final SqlColumn elementHashId = referenceExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + public static final class ReferenceExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public ReferenceExpression() { + super("reference_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionMapper.java new file mode 100644 index 00000000..7fd2343b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceExpressionMapper.java @@ -0,0 +1,132 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ReferenceExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ReferenceExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ReferenceExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, referenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, referenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default int insert(ReferenceExpression record) { + return MyBatis3Utils.insert(this::insert, record, referenceExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, referenceExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default int insertSelective(ReferenceExpression record) { + return MyBatis3Utils.insert(this::insert, record, referenceExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, referenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, referenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, referenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, referenceExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + static UpdateDSL updateAllColumns(ReferenceExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_expression") + static UpdateDSL updateSelectiveColumns(ReferenceExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListDynamicSqlSupport.java new file mode 100644 index 00000000..01dae017 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ReferenceListDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + public static final ReferenceList referenceList = new ReferenceList(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.element_hash_id") + public static final SqlColumn elementHashId = referenceList.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.location_hash_id") + public static final SqlColumn locationHashId = referenceList.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.parent_hash_id") + public static final SqlColumn parentHashId = referenceList.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.debug_message") + public static final SqlColumn debugMessage = referenceList.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_list.role") + public static final SqlColumn role = referenceList.role; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + public static final class ReferenceList extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn role = column("role", JDBCType.VARCHAR); + + public ReferenceList() { + super("reference_list"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListMapper.java new file mode 100644 index 00000000..942a6966 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceListMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ReferenceListDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ReferenceList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ReferenceListMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, locationHashId, parentHashId, debugMessage, role); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="role", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="role", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, referenceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, referenceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default int insert(ReferenceList record) { + return MyBatis3Utils.insert(this::insert, record, referenceList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(role).toProperty("role") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, referenceList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(role).toProperty("role") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default int insertSelective(ReferenceList record) { + return MyBatis3Utils.insert(this::insert, record, referenceList, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(role).toPropertyWhenPresent("role", record::getRole) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, referenceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, referenceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, referenceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, referenceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + static UpdateDSL updateAllColumns(ReferenceList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(role).equalTo(record::getRole); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_list") + static UpdateDSL updateSelectiveColumns(ReferenceList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(role).equalToWhenPresent(record::getRole); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListDynamicSqlSupport.java new file mode 100644 index 00000000..f6c3c753 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ReferenceParameterListDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + public static final ReferenceParameterList referenceParameterList = new ReferenceParameterList(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.type_element_hash_id") + public static final SqlColumn typeElementHashId = referenceParameterList.typeElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.list_hash_id") + public static final SqlColumn listHashId = referenceParameterList.listHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.index_order") + public static final SqlColumn indexOrder = referenceParameterList.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.parent_hash_id") + public static final SqlColumn parentHashId = referenceParameterList.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.debug_message") + public static final SqlColumn debugMessage = referenceParameterList.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_parameter_list.location_hash_id") + public static final SqlColumn locationHashId = referenceParameterList.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + public static final class ReferenceParameterList extends SqlTable { + public final SqlColumn typeElementHashId = column("type_element_hash_id", JDBCType.BIGINT); + + public final SqlColumn listHashId = column("list_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public ReferenceParameterList() { + super("reference_parameter_list"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListMapper.java new file mode 100644 index 00000000..1386583e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceParameterListMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ReferenceParameterListDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ReferenceParameterList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ReferenceParameterListMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + BasicColumn[] selectList = BasicColumn.columnList(typeElementHashId, listHashId, indexOrder, parentHashId, debugMessage, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="type_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="type_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, referenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, referenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default int insert(ReferenceParameterList record) { + return MyBatis3Utils.insert(this::insert, record, referenceParameterList, c -> + c.map(typeElementHashId).toProperty("typeElementHashId") + .map(listHashId).toProperty("listHashId") + .map(indexOrder).toProperty("indexOrder") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, referenceParameterList, c -> + c.map(typeElementHashId).toProperty("typeElementHashId") + .map(listHashId).toProperty("listHashId") + .map(indexOrder).toProperty("indexOrder") + .map(parentHashId).toProperty("parentHashId") + .map(debugMessage).toProperty("debugMessage") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default int insertSelective(ReferenceParameterList record) { + return MyBatis3Utils.insert(this::insert, record, referenceParameterList, c -> + c.map(typeElementHashId).toPropertyWhenPresent("typeElementHashId", record::getTypeElementHashId) + .map(listHashId).toPropertyWhenPresent("listHashId", record::getListHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, referenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, referenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, referenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, referenceParameterList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + static UpdateDSL updateAllColumns(ReferenceParameterList record, UpdateDSL dsl) { + return dsl.set(typeElementHashId).equalTo(record::getTypeElementHashId) + .set(listHashId).equalTo(record::getListHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(parentHashId).equalTo(record::getParentHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_parameter_list") + static UpdateDSL updateSelectiveColumns(ReferenceParameterList record, UpdateDSL dsl) { + return dsl.set(typeElementHashId).equalToWhenPresent(record::getTypeElementHashId) + .set(listHashId).equalToWhenPresent(record::getListHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationDynamicSqlSupport.java new file mode 100644 index 00000000..611b3b22 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ReferenceRelationDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + public static final ReferenceRelation referenceRelation = new ReferenceRelation(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.reference_element_hash_id") + public static final SqlColumn referenceElementHashId = referenceRelation.referenceElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_relation.definition_element_hash_id") + public static final SqlColumn definitionElementHashId = referenceRelation.definitionElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + public static final class ReferenceRelation extends SqlTable { + public final SqlColumn referenceElementHashId = column("reference_element_hash_id", JDBCType.BIGINT); + + public final SqlColumn definitionElementHashId = column("definition_element_hash_id", JDBCType.BIGINT); + + public ReferenceRelation() { + super("reference_relation"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationMapper.java new file mode 100644 index 00000000..9deb3707 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceRelationMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ReferenceRelationDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ReferenceRelation; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ReferenceRelationMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + BasicColumn[] selectList = BasicColumn.columnList(referenceElementHashId, definitionElementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="reference_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="definition_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="reference_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="definition_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, referenceRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, referenceRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default int insert(ReferenceRelation record) { + return MyBatis3Utils.insert(this::insert, record, referenceRelation, c -> + c.map(referenceElementHashId).toProperty("referenceElementHashId") + .map(definitionElementHashId).toProperty("definitionElementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, referenceRelation, c -> + c.map(referenceElementHashId).toProperty("referenceElementHashId") + .map(definitionElementHashId).toProperty("definitionElementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default int insertSelective(ReferenceRelation record) { + return MyBatis3Utils.insert(this::insert, record, referenceRelation, c -> + c.map(referenceElementHashId).toPropertyWhenPresent("referenceElementHashId", record::getReferenceElementHashId) + .map(definitionElementHashId).toPropertyWhenPresent("definitionElementHashId", record::getDefinitionElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, referenceRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, referenceRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, referenceRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, referenceRelation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + static UpdateDSL updateAllColumns(ReferenceRelation record, UpdateDSL dsl) { + return dsl.set(referenceElementHashId).equalTo(record::getReferenceElementHashId) + .set(definitionElementHashId).equalTo(record::getDefinitionElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_relation") + static UpdateDSL updateSelectiveColumns(ReferenceRelation record, UpdateDSL dsl) { + return dsl.set(referenceElementHashId).equalToWhenPresent(record::getReferenceElementHashId) + .set(definitionElementHashId).equalToWhenPresent(record::getDefinitionElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeDynamicSqlSupport.java new file mode 100644 index 00000000..dadd6506 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ReferenceTypeDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + public static final ReferenceType referenceType = new ReferenceType(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.oid") + public static final SqlColumn oid = referenceType.oid; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.name") + public static final SqlColumn name = referenceType.name; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: reference_type.qualified_name") + public static final SqlColumn qualifiedName = referenceType.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + public static final class ReferenceType extends SqlTable { + public final SqlColumn oid = column("oid", JDBCType.BIGINT); + + public final SqlColumn name = column("name", JDBCType.VARCHAR); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public ReferenceType() { + super("reference_type"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeMapper.java new file mode 100644 index 00000000..0e92c792 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReferenceTypeMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ReferenceTypeDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ReferenceType; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ReferenceTypeMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + BasicColumn[] selectList = BasicColumn.columnList(oid, name, qualifiedName); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="oid", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="oid", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, referenceType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, referenceType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default int insert(ReferenceType record) { + return MyBatis3Utils.insert(this::insert, record, referenceType, c -> + c.map(oid).toProperty("oid") + .map(name).toProperty("name") + .map(qualifiedName).toProperty("qualifiedName") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, referenceType, c -> + c.map(oid).toProperty("oid") + .map(name).toProperty("name") + .map(qualifiedName).toProperty("qualifiedName") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default int insertSelective(ReferenceType record) { + return MyBatis3Utils.insert(this::insert, record, referenceType, c -> + c.map(oid).toPropertyWhenPresent("oid", record::getOid) + .map(name).toPropertyWhenPresent("name", record::getName) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, referenceType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, referenceType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, referenceType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, referenceType, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + static UpdateDSL updateAllColumns(ReferenceType record, UpdateDSL dsl) { + return dsl.set(oid).equalTo(record::getOid) + .set(name).equalTo(record::getName) + .set(qualifiedName).equalTo(record::getQualifiedName); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: reference_type") + static UpdateDSL updateSelectiveColumns(ReferenceType record, UpdateDSL dsl) { + return dsl.set(oid).equalToWhenPresent(record::getOid) + .set(name).equalToWhenPresent(record::getName) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListDynamicSqlSupport.java new file mode 100644 index 00000000..67a84e4c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ResourceListDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + public static final ResourceList resourceList = new ResourceList(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.element_hash_id") + public static final SqlColumn elementHashId = resourceList.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.debug_message") + public static final SqlColumn debugMessage = resourceList.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.parent_hash_id") + public static final SqlColumn parentHashId = resourceList.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: resource_list.location_hash_id") + public static final SqlColumn locationHashId = resourceList.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + public static final class ResourceList extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public ResourceList() { + super("resource_list"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListMapper.java new file mode 100644 index 00000000..b7a9eadd --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ResourceListMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ResourceListDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ResourceList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ResourceListMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, debugMessage, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, resourceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, resourceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default int insert(ResourceList record) { + return MyBatis3Utils.insert(this::insert, record, resourceList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, resourceList, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default int insertSelective(ResourceList record) { + return MyBatis3Utils.insert(this::insert, record, resourceList, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, resourceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, resourceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, resourceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, resourceList, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + static UpdateDSL updateAllColumns(ResourceList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: resource_list") + static UpdateDSL updateSelectiveColumns(ResourceList record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementDynamicSqlSupport.java new file mode 100644 index 00000000..f429db98 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ReturnStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + public static final ReturnStatement returnStatement = new ReturnStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.element_hash_id") + public static final SqlColumn elementHashId = returnStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: return_statement.return_expression_hash_id") + public static final SqlColumn returnExpressionHashId = returnStatement.returnExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + public static final class ReturnStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn returnExpressionHashId = column("return_expression_hash_id", JDBCType.BIGINT); + + public ReturnStatement() { + super("return_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementMapper.java new file mode 100644 index 00000000..21359eb6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ReturnStatementMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ReturnStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ReturnStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ReturnStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, returnExpressionHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="return_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="return_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, returnStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, returnStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default int insert(ReturnStatement record) { + return MyBatis3Utils.insert(this::insert, record, returnStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(returnExpressionHashId).toProperty("returnExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, returnStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(returnExpressionHashId).toProperty("returnExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default int insertSelective(ReturnStatement record) { + return MyBatis3Utils.insert(this::insert, record, returnStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(returnExpressionHashId).toPropertyWhenPresent("returnExpressionHashId", record::getReturnExpressionHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, returnStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, returnStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, returnStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, returnStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + static UpdateDSL updateAllColumns(ReturnStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(returnExpressionHashId).equalTo(record::getReturnExpressionHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: return_statement") + static UpdateDSL updateSelectiveColumns(ReturnStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(returnExpressionHashId).equalToWhenPresent(record::getReturnExpressionHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementDynamicSqlSupport.java new file mode 100644 index 00000000..f2029fd0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementDynamicSqlSupport.java @@ -0,0 +1,48 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class StatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + public static final Statement statement = new Statement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.element_hash_id") + public static final SqlColumn elementHashId = statement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.parent_hash_id") + public static final SqlColumn parentHashId = statement.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.index_order") + public static final SqlColumn indexOrder = statement.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.location_hash_id") + public static final SqlColumn locationHashId = statement.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.debug_message") + public static final SqlColumn debugMessage = statement.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement.type") + public static final SqlColumn type = statement.type; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + public static final class Statement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn type = column("type", JDBCType.VARCHAR); + + public Statement() { + super("statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..8e443d22 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class StatementEnclosingExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + public static final StatementEnclosingExpression statementEnclosingExpression = new StatementEnclosingExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.expression_hash_id") + public static final SqlColumn expressionHashId = statementEnclosingExpression.expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: statement_enclosing_expression.statement_hash_id") + public static final SqlColumn statementHashId = statementEnclosingExpression.statementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + public static final class StatementEnclosingExpression extends SqlTable { + public final SqlColumn expressionHashId = column("expression_hash_id", JDBCType.BIGINT); + + public final SqlColumn statementHashId = column("statement_hash_id", JDBCType.BIGINT); + + public StatementEnclosingExpression() { + super("statement_enclosing_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionMapper.java new file mode 100644 index 00000000..a7bd7740 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementEnclosingExpressionMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.StatementEnclosingExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.StatementEnclosingExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface StatementEnclosingExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + BasicColumn[] selectList = BasicColumn.columnList(expressionHashId, statementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="statement_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, statementEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, statementEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default int insert(StatementEnclosingExpression record) { + return MyBatis3Utils.insert(this::insert, record, statementEnclosingExpression, c -> + c.map(expressionHashId).toProperty("expressionHashId") + .map(statementHashId).toProperty("statementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, statementEnclosingExpression, c -> + c.map(expressionHashId).toProperty("expressionHashId") + .map(statementHashId).toProperty("statementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default int insertSelective(StatementEnclosingExpression record) { + return MyBatis3Utils.insert(this::insert, record, statementEnclosingExpression, c -> + c.map(expressionHashId).toPropertyWhenPresent("expressionHashId", record::getExpressionHashId) + .map(statementHashId).toPropertyWhenPresent("statementHashId", record::getStatementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, statementEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, statementEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, statementEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, statementEnclosingExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + static UpdateDSL updateAllColumns(StatementEnclosingExpression record, UpdateDSL dsl) { + return dsl.set(expressionHashId).equalTo(record::getExpressionHashId) + .set(statementHashId).equalTo(record::getStatementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement_enclosing_expression") + static UpdateDSL updateSelectiveColumns(StatementEnclosingExpression record, UpdateDSL dsl) { + return dsl.set(expressionHashId).equalToWhenPresent(record::getExpressionHashId) + .set(statementHashId).equalToWhenPresent(record::getStatementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementMapper.java new file mode 100644 index 00000000..aa1c64d2 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StatementMapper.java @@ -0,0 +1,167 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.StatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Statement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface StatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, parentHashId, indexOrder, locationHashId, debugMessage, type); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, statement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, statement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default int insert(Statement record) { + return MyBatis3Utils.insert(this::insert, record, statement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(type).toProperty("type") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, statement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(parentHashId).toProperty("parentHashId") + .map(indexOrder).toProperty("indexOrder") + .map(locationHashId).toProperty("locationHashId") + .map(debugMessage).toProperty("debugMessage") + .map(type).toProperty("type") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default int insertSelective(Statement record) { + return MyBatis3Utils.insert(this::insert, record, statement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(type).toPropertyWhenPresent("type", record::getType) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, statement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, statement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, statement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, statement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + static UpdateDSL updateAllColumns(Statement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(type).equalTo(record::getType); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: statement") + static UpdateDSL updateSelectiveColumns(Statement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(type).equalToWhenPresent(record::getType); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..28f3a9a5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class StringLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + public static final StringLiteral stringLiteral = new StringLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.element_hash_id") + public static final SqlColumn elementHashId = stringLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: string_literal.value") + public static final SqlColumn value = stringLiteral.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + public static final class StringLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public StringLiteral() { + super("string_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralMapper.java new file mode 100644 index 00000000..0d078d4e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/StringLiteralMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.StringLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.StringLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface StringLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, stringLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, stringLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default int insert(StringLiteral record) { + return MyBatis3Utils.insert(this::insert, record, stringLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, stringLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default int insertSelective(StringLiteral record) { + return MyBatis3Utils.insert(this::insert, record, stringLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, stringLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, stringLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, stringLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, stringLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + static UpdateDSL updateAllColumns(StringLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: string_literal") + static UpdateDSL updateSelectiveColumns(StringLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..95838c64 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionDynamicSqlSupport.java @@ -0,0 +1,23 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class SuperAccessExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + public static final SuperAccessExpression superAccessExpression = new SuperAccessExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_access_expression.element_hash_id") + public static final SqlColumn elementHashId = superAccessExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + public static final class SuperAccessExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public SuperAccessExpression() { + super("super_access_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionMapper.java new file mode 100644 index 00000000..f4319770 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperAccessExpressionMapper.java @@ -0,0 +1,132 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.SuperAccessExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.SuperAccessExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface SuperAccessExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, superAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, superAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default int insert(SuperAccessExpression record) { + return MyBatis3Utils.insert(this::insert, record, superAccessExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, superAccessExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default int insertSelective(SuperAccessExpression record) { + return MyBatis3Utils.insert(this::insert, record, superAccessExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, superAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, superAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, superAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, superAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + static UpdateDSL updateAllColumns(SuperAccessExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_access_expression") + static UpdateDSL updateSelectiveColumns(SuperAccessExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationDynamicSqlSupport.java new file mode 100644 index 00000000..dfeb23e3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationDynamicSqlSupport.java @@ -0,0 +1,23 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class SuperConstructorInvocationDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + public static final SuperConstructorInvocation superConstructorInvocation = new SuperConstructorInvocation(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_constructor_invocation.element_hash_id") + public static final SqlColumn elementHashId = superConstructorInvocation.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + public static final class SuperConstructorInvocation extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public SuperConstructorInvocation() { + super("super_constructor_invocation"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationMapper.java new file mode 100644 index 00000000..e3168ed4 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperConstructorInvocationMapper.java @@ -0,0 +1,132 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.SuperConstructorInvocationDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.SuperConstructorInvocation; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface SuperConstructorInvocationMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, superConstructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, superConstructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default int insert(SuperConstructorInvocation record) { + return MyBatis3Utils.insert(this::insert, record, superConstructorInvocation, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, superConstructorInvocation, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default int insertSelective(SuperConstructorInvocation record) { + return MyBatis3Utils.insert(this::insert, record, superConstructorInvocation, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, superConstructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, superConstructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, superConstructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, superConstructorInvocation, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + static UpdateDSL updateAllColumns(SuperConstructorInvocation record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_constructor_invocation") + static UpdateDSL updateSelectiveColumns(SuperConstructorInvocation record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..0b2ee10c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionDynamicSqlSupport.java @@ -0,0 +1,23 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class SuperExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + public static final SuperExpression superExpression = new SuperExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression.element_hash_id") + public static final SqlColumn elementHashId = superExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + public static final class SuperExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public SuperExpression() { + super("super_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionMapper.java new file mode 100644 index 00000000..3e83d62b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionMapper.java @@ -0,0 +1,132 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.SuperExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.SuperExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface SuperExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, superExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, superExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default int insert(SuperExpression record) { + return MyBatis3Utils.insert(this::insert, record, superExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, superExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default int insertSelective(SuperExpression record) { + return MyBatis3Utils.insert(this::insert, record, superExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, superExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, superExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, superExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, superExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + static UpdateDSL updateAllColumns(SuperExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression") + static UpdateDSL updateSelectiveColumns(SuperExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierDynamicSqlSupport.java new file mode 100644 index 00000000..11841d6e --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class SuperExpressionWithQualifierDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + public static final SuperExpressionWithQualifier superExpressionWithQualifier = new SuperExpressionWithQualifier(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.element_hash_id") + public static final SqlColumn elementHashId = superExpressionWithQualifier.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: super_expression_with_qualifier.qualifier_hash_id") + public static final SqlColumn qualifierHashId = superExpressionWithQualifier.qualifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + public static final class SuperExpressionWithQualifier extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifierHashId = column("qualifier_hash_id", JDBCType.BIGINT); + + public SuperExpressionWithQualifier() { + super("super_expression_with_qualifier"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierMapper.java new file mode 100644 index 00000000..ed2009ba --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SuperExpressionWithQualifierMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.SuperExpressionWithQualifierDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.SuperExpressionWithQualifier; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface SuperExpressionWithQualifierMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifierHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, superExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, superExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default int insert(SuperExpressionWithQualifier record) { + return MyBatis3Utils.insert(this::insert, record, superExpressionWithQualifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifierHashId).toProperty("qualifierHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, superExpressionWithQualifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifierHashId).toProperty("qualifierHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default int insertSelective(SuperExpressionWithQualifier record) { + return MyBatis3Utils.insert(this::insert, record, superExpressionWithQualifier, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifierHashId).toPropertyWhenPresent("qualifierHashId", record::getQualifierHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, superExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, superExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, superExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, superExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + static UpdateDSL updateAllColumns(SuperExpressionWithQualifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifierHashId).equalTo(record::getQualifierHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: super_expression_with_qualifier") + static UpdateDSL updateSelectiveColumns(SuperExpressionWithQualifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifierHashId).equalToWhenPresent(record::getQualifierHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementDynamicSqlSupport.java new file mode 100644 index 00000000..0acfc5f9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class SwitchLabelStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + public static final SwitchLabelStatement switchLabelStatement = new SwitchLabelStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.element_hash_id") + public static final SqlColumn elementHashId = switchLabelStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.case_value_hash_id") + public static final SqlColumn caseValueHashId = switchLabelStatement.caseValueHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.enclosing_switch_block_hash_id") + public static final SqlColumn enclosingSwitchBlockHashId = switchLabelStatement.enclosingSwitchBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_label_statement.next_switch_case_hash_id") + public static final SqlColumn nextSwitchCaseHashId = switchLabelStatement.nextSwitchCaseHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + public static final class SwitchLabelStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn caseValueHashId = column("case_value_hash_id", JDBCType.BIGINT); + + public final SqlColumn enclosingSwitchBlockHashId = column("enclosing_switch_block_hash_id", JDBCType.BIGINT); + + public final SqlColumn nextSwitchCaseHashId = column("next_switch_case_hash_id", JDBCType.BIGINT); + + public SwitchLabelStatement() { + super("switch_label_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementMapper.java new file mode 100644 index 00000000..100882e6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchLabelStatementMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.SwitchLabelStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.SwitchLabelStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface SwitchLabelStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, caseValueHashId, enclosingSwitchBlockHashId, nextSwitchCaseHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="case_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="enclosing_switch_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="next_switch_case_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="case_value_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="enclosing_switch_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="next_switch_case_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, switchLabelStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, switchLabelStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default int insert(SwitchLabelStatement record) { + return MyBatis3Utils.insert(this::insert, record, switchLabelStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(caseValueHashId).toProperty("caseValueHashId") + .map(enclosingSwitchBlockHashId).toProperty("enclosingSwitchBlockHashId") + .map(nextSwitchCaseHashId).toProperty("nextSwitchCaseHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, switchLabelStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(caseValueHashId).toProperty("caseValueHashId") + .map(enclosingSwitchBlockHashId).toProperty("enclosingSwitchBlockHashId") + .map(nextSwitchCaseHashId).toProperty("nextSwitchCaseHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default int insertSelective(SwitchLabelStatement record) { + return MyBatis3Utils.insert(this::insert, record, switchLabelStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(caseValueHashId).toPropertyWhenPresent("caseValueHashId", record::getCaseValueHashId) + .map(enclosingSwitchBlockHashId).toPropertyWhenPresent("enclosingSwitchBlockHashId", record::getEnclosingSwitchBlockHashId) + .map(nextSwitchCaseHashId).toPropertyWhenPresent("nextSwitchCaseHashId", record::getNextSwitchCaseHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, switchLabelStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, switchLabelStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, switchLabelStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, switchLabelStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + static UpdateDSL updateAllColumns(SwitchLabelStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(caseValueHashId).equalTo(record::getCaseValueHashId) + .set(enclosingSwitchBlockHashId).equalTo(record::getEnclosingSwitchBlockHashId) + .set(nextSwitchCaseHashId).equalTo(record::getNextSwitchCaseHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_label_statement") + static UpdateDSL updateSelectiveColumns(SwitchLabelStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(caseValueHashId).equalToWhenPresent(record::getCaseValueHashId) + .set(enclosingSwitchBlockHashId).equalToWhenPresent(record::getEnclosingSwitchBlockHashId) + .set(nextSwitchCaseHashId).equalToWhenPresent(record::getNextSwitchCaseHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementDynamicSqlSupport.java new file mode 100644 index 00000000..60189f76 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class SwitchStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + public static final SwitchStatement switchStatement = new SwitchStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.element_hash_id") + public static final SqlColumn elementHashId = switchStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.discriminant_hash_id") + public static final SqlColumn discriminantHashId = switchStatement.discriminantHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: switch_statement.body_declaration_hash_id") + public static final SqlColumn bodyDeclarationHashId = switchStatement.bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + public static final class SwitchStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn discriminantHashId = column("discriminant_hash_id", JDBCType.BIGINT); + + public final SqlColumn bodyDeclarationHashId = column("body_declaration_hash_id", JDBCType.BIGINT); + + public SwitchStatement() { + super("switch_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementMapper.java new file mode 100644 index 00000000..9280f211 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SwitchStatementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.SwitchStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.SwitchStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface SwitchStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, discriminantHashId, bodyDeclarationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="discriminant_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="discriminant_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, switchStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, switchStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default int insert(SwitchStatement record) { + return MyBatis3Utils.insert(this::insert, record, switchStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(discriminantHashId).toProperty("discriminantHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, switchStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(discriminantHashId).toProperty("discriminantHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default int insertSelective(SwitchStatement record) { + return MyBatis3Utils.insert(this::insert, record, switchStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(discriminantHashId).toPropertyWhenPresent("discriminantHashId", record::getDiscriminantHashId) + .map(bodyDeclarationHashId).toPropertyWhenPresent("bodyDeclarationHashId", record::getBodyDeclarationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, switchStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, switchStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, switchStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, switchStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + static UpdateDSL updateAllColumns(SwitchStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(discriminantHashId).equalTo(record::getDiscriminantHashId) + .set(bodyDeclarationHashId).equalTo(record::getBodyDeclarationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: switch_statement") + static UpdateDSL updateSelectiveColumns(SwitchStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(discriminantHashId).equalToWhenPresent(record::getDiscriminantHashId) + .set(bodyDeclarationHashId).equalToWhenPresent(record::getBodyDeclarationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementDynamicSqlSupport.java new file mode 100644 index 00000000..944c9c28 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class SynchronizedStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + public static final SynchronizedStatement synchronizedStatement = new SynchronizedStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.element_hash_id") + public static final SqlColumn elementHashId = synchronizedStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.lock_expression_hash_id") + public static final SqlColumn lockExpressionHashId = synchronizedStatement.lockExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: synchronized_statement.body_declaration_hash_id") + public static final SqlColumn bodyDeclarationHashId = synchronizedStatement.bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + public static final class SynchronizedStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn lockExpressionHashId = column("lock_expression_hash_id", JDBCType.BIGINT); + + public final SqlColumn bodyDeclarationHashId = column("body_declaration_hash_id", JDBCType.BIGINT); + + public SynchronizedStatement() { + super("synchronized_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementMapper.java new file mode 100644 index 00000000..fada18ae --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/SynchronizedStatementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.SynchronizedStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.SynchronizedStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface SynchronizedStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, lockExpressionHashId, bodyDeclarationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="lock_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="lock_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, synchronizedStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, synchronizedStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default int insert(SynchronizedStatement record) { + return MyBatis3Utils.insert(this::insert, record, synchronizedStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(lockExpressionHashId).toProperty("lockExpressionHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, synchronizedStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(lockExpressionHashId).toProperty("lockExpressionHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default int insertSelective(SynchronizedStatement record) { + return MyBatis3Utils.insert(this::insert, record, synchronizedStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(lockExpressionHashId).toPropertyWhenPresent("lockExpressionHashId", record::getLockExpressionHashId) + .map(bodyDeclarationHashId).toPropertyWhenPresent("bodyDeclarationHashId", record::getBodyDeclarationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, synchronizedStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, synchronizedStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, synchronizedStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, synchronizedStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + static UpdateDSL updateAllColumns(SynchronizedStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(lockExpressionHashId).equalTo(record::getLockExpressionHashId) + .set(bodyDeclarationHashId).equalTo(record::getBodyDeclarationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: synchronized_statement") + static UpdateDSL updateSelectiveColumns(SynchronizedStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(lockExpressionHashId).equalToWhenPresent(record::getLockExpressionHashId) + .set(bodyDeclarationHashId).equalToWhenPresent(record::getBodyDeclarationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..0367eced --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionDynamicSqlSupport.java @@ -0,0 +1,23 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ThisAccessExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + public static final ThisAccessExpression thisAccessExpression = new ThisAccessExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_access_expression.element_hash_id") + public static final SqlColumn elementHashId = thisAccessExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + public static final class ThisAccessExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public ThisAccessExpression() { + super("this_access_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionMapper.java new file mode 100644 index 00000000..03388397 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisAccessExpressionMapper.java @@ -0,0 +1,132 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ThisAccessExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ThisAccessExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ThisAccessExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, thisAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, thisAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default int insert(ThisAccessExpression record) { + return MyBatis3Utils.insert(this::insert, record, thisAccessExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, thisAccessExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default int insertSelective(ThisAccessExpression record) { + return MyBatis3Utils.insert(this::insert, record, thisAccessExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, thisAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, thisAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, thisAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, thisAccessExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + static UpdateDSL updateAllColumns(ThisAccessExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_access_expression") + static UpdateDSL updateSelectiveColumns(ThisAccessExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierDynamicSqlSupport.java new file mode 100644 index 00000000..f25932fc --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ThisExpressionWithQualifierDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + public static final ThisExpressionWithQualifier thisExpressionWithQualifier = new ThisExpressionWithQualifier(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.element_hash_id") + public static final SqlColumn elementHashId = thisExpressionWithQualifier.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: this_expression_with_qualifier.qualifier_hash_id") + public static final SqlColumn qualifierHashId = thisExpressionWithQualifier.qualifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + public static final class ThisExpressionWithQualifier extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifierHashId = column("qualifier_hash_id", JDBCType.BIGINT); + + public ThisExpressionWithQualifier() { + super("this_expression_with_qualifier"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierMapper.java new file mode 100644 index 00000000..6ca00e40 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThisExpressionWithQualifierMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ThisExpressionWithQualifierDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ThisExpressionWithQualifier; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ThisExpressionWithQualifierMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifierHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, thisExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, thisExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default int insert(ThisExpressionWithQualifier record) { + return MyBatis3Utils.insert(this::insert, record, thisExpressionWithQualifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifierHashId).toProperty("qualifierHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, thisExpressionWithQualifier, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifierHashId).toProperty("qualifierHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default int insertSelective(ThisExpressionWithQualifier record) { + return MyBatis3Utils.insert(this::insert, record, thisExpressionWithQualifier, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifierHashId).toPropertyWhenPresent("qualifierHashId", record::getQualifierHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, thisExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, thisExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, thisExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, thisExpressionWithQualifier, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + static UpdateDSL updateAllColumns(ThisExpressionWithQualifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifierHashId).equalTo(record::getQualifierHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: this_expression_with_qualifier") + static UpdateDSL updateSelectiveColumns(ThisExpressionWithQualifier record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifierHashId).equalToWhenPresent(record::getQualifierHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementDynamicSqlSupport.java new file mode 100644 index 00000000..7c35fa3d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class ThrowStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + public static final ThrowStatement throwStatement = new ThrowStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.element_hash_id") + public static final SqlColumn elementHashId = throwStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.exception_hash_id") + public static final SqlColumn exceptionHashId = throwStatement.exceptionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: throw_statement.block_hash_id") + public static final SqlColumn blockHashId = throwStatement.blockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + public static final class ThrowStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn exceptionHashId = column("exception_hash_id", JDBCType.BIGINT); + + public final SqlColumn blockHashId = column("block_hash_id", JDBCType.BIGINT); + + public ThrowStatement() { + super("throw_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementMapper.java new file mode 100644 index 00000000..9e2ab1d6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/ThrowStatementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.ThrowStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.ThrowStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface ThrowStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, exceptionHashId, blockHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="exception_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="exception_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, throwStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, throwStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default int insert(ThrowStatement record) { + return MyBatis3Utils.insert(this::insert, record, throwStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(exceptionHashId).toProperty("exceptionHashId") + .map(blockHashId).toProperty("blockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, throwStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(exceptionHashId).toProperty("exceptionHashId") + .map(blockHashId).toProperty("blockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default int insertSelective(ThrowStatement record) { + return MyBatis3Utils.insert(this::insert, record, throwStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(exceptionHashId).toPropertyWhenPresent("exceptionHashId", record::getExceptionHashId) + .map(blockHashId).toPropertyWhenPresent("blockHashId", record::getBlockHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, throwStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, throwStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, throwStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, throwStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + static UpdateDSL updateAllColumns(ThrowStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(exceptionHashId).equalTo(record::getExceptionHashId) + .set(blockHashId).equalTo(record::getBlockHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: throw_statement") + static UpdateDSL updateSelectiveColumns(ThrowStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(exceptionHashId).equalToWhenPresent(record::getExceptionHashId) + .set(blockHashId).equalToWhenPresent(record::getBlockHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenDynamicSqlSupport.java new file mode 100644 index 00000000..e4952a77 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class TokenDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + public static final Token token = new Token(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.element_hash_id") + public static final SqlColumn elementHashId = token.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.value") + public static final SqlColumn value = token.value; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.location_hash_id") + public static final SqlColumn locationHashId = token.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: token.parent_hash_id") + public static final SqlColumn parentHashId = token.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + public static final class Token extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn value = column("value", JDBCType.VARCHAR); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public Token() { + super("token"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenMapper.java new file mode 100644 index 00000000..5fff5fc6 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TokenMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.TokenDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.Token; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface TokenMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, value, locationHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, token, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, token, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default int insert(Token record) { + return MyBatis3Utils.insert(this::insert, record, token, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, token, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(value).toProperty("value") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default int insertSelective(Token record) { + return MyBatis3Utils.insert(this::insert, record, token, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(value).toPropertyWhenPresent("value", record::getValue) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, token, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, token, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, token, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, token, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + static UpdateDSL updateAllColumns(Token record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(value).equalTo(record::getValue) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: token") + static UpdateDSL updateSelectiveColumns(Token record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(value).equalToWhenPresent(record::getValue) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyDynamicSqlSupport.java new file mode 100644 index 00000000..6b026782 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class TryStatementWithFinallyDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + public static final TryStatementWithFinally tryStatementWithFinally = new TryStatementWithFinally(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.element_hash_id") + public static final SqlColumn elementHashId = tryStatementWithFinally.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.try_block_hash_id") + public static final SqlColumn tryBlockHashId = tryStatementWithFinally.tryBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_with_finally.finally_block_hash_id") + public static final SqlColumn finallyBlockHashId = tryStatementWithFinally.finallyBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + public static final class TryStatementWithFinally extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn tryBlockHashId = column("try_block_hash_id", JDBCType.BIGINT); + + public final SqlColumn finallyBlockHashId = column("finally_block_hash_id", JDBCType.BIGINT); + + public TryStatementWithFinally() { + super("try_statement_with_finally"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyMapper.java new file mode 100644 index 00000000..a5a52ae9 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithFinallyMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.TryStatementWithFinallyDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.TryStatementWithFinally; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface TryStatementWithFinallyMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, tryBlockHashId, finallyBlockHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="try_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="finally_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="try_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="finally_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, tryStatementWithFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, tryStatementWithFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default int insert(TryStatementWithFinally record) { + return MyBatis3Utils.insert(this::insert, record, tryStatementWithFinally, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(tryBlockHashId).toProperty("tryBlockHashId") + .map(finallyBlockHashId).toProperty("finallyBlockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, tryStatementWithFinally, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(tryBlockHashId).toProperty("tryBlockHashId") + .map(finallyBlockHashId).toProperty("finallyBlockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default int insertSelective(TryStatementWithFinally record) { + return MyBatis3Utils.insert(this::insert, record, tryStatementWithFinally, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(tryBlockHashId).toPropertyWhenPresent("tryBlockHashId", record::getTryBlockHashId) + .map(finallyBlockHashId).toPropertyWhenPresent("finallyBlockHashId", record::getFinallyBlockHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, tryStatementWithFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, tryStatementWithFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, tryStatementWithFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, tryStatementWithFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + static UpdateDSL updateAllColumns(TryStatementWithFinally record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(tryBlockHashId).equalTo(record::getTryBlockHashId) + .set(finallyBlockHashId).equalTo(record::getFinallyBlockHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_with_finally") + static UpdateDSL updateSelectiveColumns(TryStatementWithFinally record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(tryBlockHashId).equalToWhenPresent(record::getTryBlockHashId) + .set(finallyBlockHashId).equalToWhenPresent(record::getFinallyBlockHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyDynamicSqlSupport.java new file mode 100644 index 00000000..e8b823fa --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class TryStatementWithoutFinallyDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + public static final TryStatementWithoutFinally tryStatementWithoutFinally = new TryStatementWithoutFinally(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.element_hash_id") + public static final SqlColumn elementHashId = tryStatementWithoutFinally.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: try_statement_without_finally.try_block_hash_id") + public static final SqlColumn tryBlockHashId = tryStatementWithoutFinally.tryBlockHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + public static final class TryStatementWithoutFinally extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn tryBlockHashId = column("try_block_hash_id", JDBCType.BIGINT); + + public TryStatementWithoutFinally() { + super("try_statement_without_finally"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyMapper.java new file mode 100644 index 00000000..5af377d5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TryStatementWithoutFinallyMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.TryStatementWithoutFinallyDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.TryStatementWithoutFinally; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface TryStatementWithoutFinallyMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, tryBlockHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="try_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="try_block_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, tryStatementWithoutFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, tryStatementWithoutFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default int insert(TryStatementWithoutFinally record) { + return MyBatis3Utils.insert(this::insert, record, tryStatementWithoutFinally, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(tryBlockHashId).toProperty("tryBlockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, tryStatementWithoutFinally, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(tryBlockHashId).toProperty("tryBlockHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default int insertSelective(TryStatementWithoutFinally record) { + return MyBatis3Utils.insert(this::insert, record, tryStatementWithoutFinally, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(tryBlockHashId).toPropertyWhenPresent("tryBlockHashId", record::getTryBlockHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, tryStatementWithoutFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, tryStatementWithoutFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, tryStatementWithoutFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, tryStatementWithoutFinally, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + static UpdateDSL updateAllColumns(TryStatementWithoutFinally record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(tryBlockHashId).equalTo(record::getTryBlockHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: try_statement_without_finally") + static UpdateDSL updateSelectiveColumns(TryStatementWithoutFinally record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(tryBlockHashId).equalToWhenPresent(record::getTryBlockHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..e6719f76 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionDynamicSqlSupport.java @@ -0,0 +1,28 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class TypeCastExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + public static final TypeCastExpression typeCastExpression = new TypeCastExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.element_hash_id") + public static final SqlColumn elementHashId = typeCastExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_cast_expression.cast_expression_hash_id") + public static final SqlColumn castExpressionHashId = typeCastExpression.castExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + public static final class TypeCastExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn castExpressionHashId = column("cast_expression_hash_id", JDBCType.BIGINT); + + public TypeCastExpression() { + super("type_cast_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionMapper.java new file mode 100644 index 00000000..dd5101be --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeCastExpressionMapper.java @@ -0,0 +1,139 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.TypeCastExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.TypeCastExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface TypeCastExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, castExpressionHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="cast_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="cast_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, typeCastExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, typeCastExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default int insert(TypeCastExpression record) { + return MyBatis3Utils.insert(this::insert, record, typeCastExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(castExpressionHashId).toProperty("castExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, typeCastExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(castExpressionHashId).toProperty("castExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default int insertSelective(TypeCastExpression record) { + return MyBatis3Utils.insert(this::insert, record, typeCastExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(castExpressionHashId).toPropertyWhenPresent("castExpressionHashId", record::getCastExpressionHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, typeCastExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, typeCastExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, typeCastExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, typeCastExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + static UpdateDSL updateAllColumns(TypeCastExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(castExpressionHashId).equalTo(record::getCastExpressionHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_cast_expression") + static UpdateDSL updateSelectiveColumns(TypeCastExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(castExpressionHashId).equalToWhenPresent(record::getCastExpressionHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementDynamicSqlSupport.java new file mode 100644 index 00000000..d534b84c --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class TypeElementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + public static final TypeElement typeElement = new TypeElement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.element_hash_id") + public static final SqlColumn elementHashId = typeElement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.reference_type_hash_id") + public static final SqlColumn referenceTypeHashId = typeElement.referenceTypeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.debug_message") + public static final SqlColumn debugMessage = typeElement.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.parent_hash_id") + public static final SqlColumn parentHashId = typeElement.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_element.location_hash_id") + public static final SqlColumn locationHashId = typeElement.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + public static final class TypeElement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn referenceTypeHashId = column("reference_type_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public TypeElement() { + super("type_element"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementMapper.java new file mode 100644 index 00000000..007292d8 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeElementMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.TypeElementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.TypeElement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface TypeElementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, referenceTypeHashId, debugMessage, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="reference_type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, typeElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, typeElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default int insert(TypeElement record) { + return MyBatis3Utils.insert(this::insert, record, typeElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceTypeHashId).toProperty("referenceTypeHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, typeElement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(referenceTypeHashId).toProperty("referenceTypeHashId") + .map(debugMessage).toProperty("debugMessage") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default int insertSelective(TypeElement record) { + return MyBatis3Utils.insert(this::insert, record, typeElement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(referenceTypeHashId).toPropertyWhenPresent("referenceTypeHashId", record::getReferenceTypeHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, typeElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, typeElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, typeElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, typeElement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + static UpdateDSL updateAllColumns(TypeElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(referenceTypeHashId).equalTo(record::getReferenceTypeHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_element") + static UpdateDSL updateSelectiveColumns(TypeElement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(referenceTypeHashId).equalToWhenPresent(record::getReferenceTypeHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralDynamicSqlSupport.java new file mode 100644 index 00000000..dec10bfe --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class TypeLiteralDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + public static final TypeLiteral typeLiteral = new TypeLiteral(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.element_hash_id") + public static final SqlColumn elementHashId = typeLiteral.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_element_hash_id") + public static final SqlColumn typeElementHashId = typeLiteral.typeElementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_literal.type_hash_id") + public static final SqlColumn typeHashId = typeLiteral.typeHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + public static final class TypeLiteral extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeElementHashId = column("type_element_hash_id", JDBCType.BIGINT); + + public final SqlColumn typeHashId = column("type_hash_id", JDBCType.BIGINT); + + public TypeLiteral() { + super("type_literal"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralMapper.java new file mode 100644 index 00000000..aee766af --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeLiteralMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.TypeLiteralDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.TypeLiteral; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface TypeLiteralMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, typeElementHashId, typeHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="type_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, typeLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, typeLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default int insert(TypeLiteral record) { + return MyBatis3Utils.insert(this::insert, record, typeLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeElementHashId).toProperty("typeElementHashId") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, typeLiteral, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(typeElementHashId).toProperty("typeElementHashId") + .map(typeHashId).toProperty("typeHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default int insertSelective(TypeLiteral record) { + return MyBatis3Utils.insert(this::insert, record, typeLiteral, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(typeElementHashId).toPropertyWhenPresent("typeElementHashId", record::getTypeElementHashId) + .map(typeHashId).toPropertyWhenPresent("typeHashId", record::getTypeHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, typeLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, typeLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, typeLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, typeLiteral, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + static UpdateDSL updateAllColumns(TypeLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(typeElementHashId).equalTo(record::getTypeElementHashId) + .set(typeHashId).equalTo(record::getTypeHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_literal") + static UpdateDSL updateSelectiveColumns(TypeLiteral record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(typeElementHashId).equalToWhenPresent(record::getTypeElementHashId) + .set(typeHashId).equalToWhenPresent(record::getTypeHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterDynamicSqlSupport.java new file mode 100644 index 00000000..485bd67b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterDynamicSqlSupport.java @@ -0,0 +1,53 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class TypeParameterDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + public static final TypeParameter typeParameter = new TypeParameter(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.element_hash_id") + public static final SqlColumn elementHashId = typeParameter.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.debug_message") + public static final SqlColumn debugMessage = typeParameter.debugMessage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.owner_hash_id") + public static final SqlColumn ownerHashId = typeParameter.ownerHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.index_order") + public static final SqlColumn indexOrder = typeParameter.indexOrder; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.extends_list_hash_id") + public static final SqlColumn extendsListHashId = typeParameter.extendsListHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.parent_hash_id") + public static final SqlColumn parentHashId = typeParameter.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: type_parameter.location_hash_id") + public static final SqlColumn locationHashId = typeParameter.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + public static final class TypeParameter extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn debugMessage = column("debug_message", JDBCType.VARCHAR); + + public final SqlColumn ownerHashId = column("owner_hash_id", JDBCType.BIGINT); + + public final SqlColumn indexOrder = column("index_order", JDBCType.INTEGER); + + public final SqlColumn extendsListHashId = column("extends_list_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public TypeParameter() { + super("type_parameter"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterMapper.java new file mode 100644 index 00000000..8eca7a2b --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/TypeParameterMapper.java @@ -0,0 +1,174 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.TypeParameterDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.TypeParameter; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface TypeParameterMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, debugMessage, ownerHashId, indexOrder, extendsListHashId, parentHashId, locationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="owner_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="extends_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="debug_message", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="owner_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="index_order", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="extends_list_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, typeParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, typeParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default int insert(TypeParameter record) { + return MyBatis3Utils.insert(this::insert, record, typeParameter, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(ownerHashId).toProperty("ownerHashId") + .map(indexOrder).toProperty("indexOrder") + .map(extendsListHashId).toProperty("extendsListHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, typeParameter, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(debugMessage).toProperty("debugMessage") + .map(ownerHashId).toProperty("ownerHashId") + .map(indexOrder).toProperty("indexOrder") + .map(extendsListHashId).toProperty("extendsListHashId") + .map(parentHashId).toProperty("parentHashId") + .map(locationHashId).toProperty("locationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default int insertSelective(TypeParameter record) { + return MyBatis3Utils.insert(this::insert, record, typeParameter, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(debugMessage).toPropertyWhenPresent("debugMessage", record::getDebugMessage) + .map(ownerHashId).toPropertyWhenPresent("ownerHashId", record::getOwnerHashId) + .map(indexOrder).toPropertyWhenPresent("indexOrder", record::getIndexOrder) + .map(extendsListHashId).toPropertyWhenPresent("extendsListHashId", record::getExtendsListHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, typeParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, typeParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, typeParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, typeParameter, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + static UpdateDSL updateAllColumns(TypeParameter record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(debugMessage).equalTo(record::getDebugMessage) + .set(ownerHashId).equalTo(record::getOwnerHashId) + .set(indexOrder).equalTo(record::getIndexOrder) + .set(extendsListHashId).equalTo(record::getExtendsListHashId) + .set(parentHashId).equalTo(record::getParentHashId) + .set(locationHashId).equalTo(record::getLocationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: type_parameter") + static UpdateDSL updateSelectiveColumns(TypeParameter record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(debugMessage).equalToWhenPresent(record::getDebugMessage) + .set(ownerHashId).equalToWhenPresent(record::getOwnerHashId) + .set(indexOrder).equalToWhenPresent(record::getIndexOrder) + .set(extendsListHashId).equalToWhenPresent(record::getExtendsListHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionDynamicSqlSupport.java new file mode 100644 index 00000000..bf54e410 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionDynamicSqlSupport.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class UnaryExpressionDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + public static final UnaryExpression unaryExpression = new UnaryExpression(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.element_hash_id") + public static final SqlColumn elementHashId = unaryExpression.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.operand_hash_id") + public static final SqlColumn operandHashId = unaryExpression.operandHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.opcode") + public static final SqlColumn opcode = unaryExpression.opcode; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: unary_expression.is_postfix") + public static final SqlColumn isPostfix = unaryExpression.isPostfix; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + public static final class UnaryExpression extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn operandHashId = column("operand_hash_id", JDBCType.BIGINT); + + public final SqlColumn opcode = column("opcode", JDBCType.VARCHAR); + + public final SqlColumn isPostfix = column("is_postfix", JDBCType.INTEGER); + + public UnaryExpression() { + super("unary_expression"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionMapper.java new file mode 100644 index 00000000..8cf4db2a --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/UnaryExpressionMapper.java @@ -0,0 +1,153 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.UnaryExpressionDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.UnaryExpression; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface UnaryExpressionMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, operandHashId, opcode, isPostfix); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="operand_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="is_postfix", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="operand_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="opcode", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="is_postfix", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, unaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, unaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default int insert(UnaryExpression record) { + return MyBatis3Utils.insert(this::insert, record, unaryExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(operandHashId).toProperty("operandHashId") + .map(opcode).toProperty("opcode") + .map(isPostfix).toProperty("isPostfix") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, unaryExpression, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(operandHashId).toProperty("operandHashId") + .map(opcode).toProperty("opcode") + .map(isPostfix).toProperty("isPostfix") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default int insertSelective(UnaryExpression record) { + return MyBatis3Utils.insert(this::insert, record, unaryExpression, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(operandHashId).toPropertyWhenPresent("operandHashId", record::getOperandHashId) + .map(opcode).toPropertyWhenPresent("opcode", record::getOpcode) + .map(isPostfix).toPropertyWhenPresent("isPostfix", record::getIsPostfix) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, unaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, unaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, unaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, unaryExpression, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + static UpdateDSL updateAllColumns(UnaryExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(operandHashId).equalTo(record::getOperandHashId) + .set(opcode).equalTo(record::getOpcode) + .set(isPostfix).equalTo(record::getIsPostfix); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: unary_expression") + static UpdateDSL updateSelectiveColumns(UnaryExpression record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(operandHashId).equalToWhenPresent(record::getOperandHashId) + .set(opcode).equalToWhenPresent(record::getOpcode) + .set(isPostfix).equalToWhenPresent(record::getIsPostfix); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementDynamicSqlSupport.java new file mode 100644 index 00000000..14b607a5 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class WhileStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + public static final WhileStatement whileStatement = new WhileStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.element_hash_id") + public static final SqlColumn elementHashId = whileStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.condition_hash_id") + public static final SqlColumn conditionHashId = whileStatement.conditionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: while_statement.body_declaration_hash_id") + public static final SqlColumn bodyDeclarationHashId = whileStatement.bodyDeclarationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + public static final class WhileStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn conditionHashId = column("condition_hash_id", JDBCType.BIGINT); + + public final SqlColumn bodyDeclarationHashId = column("body_declaration_hash_id", JDBCType.BIGINT); + + public WhileStatement() { + super("while_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementMapper.java new file mode 100644 index 00000000..8d34d0e1 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/WhileStatementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.WhileStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.WhileStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface WhileStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, conditionHashId, bodyDeclarationHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="condition_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="body_declaration_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, whileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, whileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default int insert(WhileStatement record) { + return MyBatis3Utils.insert(this::insert, record, whileStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, whileStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(conditionHashId).toProperty("conditionHashId") + .map(bodyDeclarationHashId).toProperty("bodyDeclarationHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default int insertSelective(WhileStatement record) { + return MyBatis3Utils.insert(this::insert, record, whileStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(conditionHashId).toPropertyWhenPresent("conditionHashId", record::getConditionHashId) + .map(bodyDeclarationHashId).toPropertyWhenPresent("bodyDeclarationHashId", record::getBodyDeclarationHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, whileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, whileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, whileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, whileStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + static UpdateDSL updateAllColumns(WhileStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(conditionHashId).equalTo(record::getConditionHashId) + .set(bodyDeclarationHashId).equalTo(record::getBodyDeclarationHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: while_statement") + static UpdateDSL updateSelectiveColumns(WhileStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(conditionHashId).equalToWhenPresent(record::getConditionHashId) + .set(bodyDeclarationHashId).equalToWhenPresent(record::getBodyDeclarationHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementDynamicSqlSupport.java new file mode 100644 index 00000000..6fcf91c0 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementDynamicSqlSupport.java @@ -0,0 +1,33 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class YieldStatementDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + public static final YieldStatement yieldStatement = new YieldStatement(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.element_hash_id") + public static final SqlColumn elementHashId = yieldStatement.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.expression_hash_id") + public static final SqlColumn expressionHashId = yieldStatement.expressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: yield_statement.enclosing_expression_hash_id") + public static final SqlColumn enclosingExpressionHashId = yieldStatement.enclosingExpressionHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + public static final class YieldStatement extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn expressionHashId = column("expression_hash_id", JDBCType.BIGINT); + + public final SqlColumn enclosingExpressionHashId = column("enclosing_expression_hash_id", JDBCType.BIGINT); + + public YieldStatement() { + super("yield_statement"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementMapper.java new file mode 100644 index 00000000..87c55bb3 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/YieldStatementMapper.java @@ -0,0 +1,146 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.YieldStatementDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.YieldStatement; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface YieldStatementMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, expressionHashId, enclosingExpressionHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="enclosing_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="enclosing_expression_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, yieldStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, yieldStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default int insert(YieldStatement record) { + return MyBatis3Utils.insert(this::insert, record, yieldStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(expressionHashId).toProperty("expressionHashId") + .map(enclosingExpressionHashId).toProperty("enclosingExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, yieldStatement, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(expressionHashId).toProperty("expressionHashId") + .map(enclosingExpressionHashId).toProperty("enclosingExpressionHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default int insertSelective(YieldStatement record) { + return MyBatis3Utils.insert(this::insert, record, yieldStatement, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(expressionHashId).toPropertyWhenPresent("expressionHashId", record::getExpressionHashId) + .map(enclosingExpressionHashId).toPropertyWhenPresent("enclosingExpressionHashId", record::getEnclosingExpressionHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, yieldStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, yieldStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, yieldStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, yieldStatement, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + static UpdateDSL updateAllColumns(YieldStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(expressionHashId).equalTo(record::getExpressionHashId) + .set(enclosingExpressionHashId).equalTo(record::getEnclosingExpressionHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: yield_statement") + static UpdateDSL updateSelectiveColumns(YieldStatement record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(expressionHashId).equalToWhenPresent(record::getExpressionHashId) + .set(enclosingExpressionHashId).equalToWhenPresent(record::getEnclosingExpressionHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzDynamicSqlSupport.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzDynamicSqlSupport.java new file mode 100644 index 00000000..62b54787 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzDynamicSqlSupport.java @@ -0,0 +1,43 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import java.sql.JDBCType; +import javax.annotation.Generated; +import org.mybatis.dynamic.sql.SqlColumn; +import org.mybatis.dynamic.sql.SqlTable; + +public final class clazzDynamicSqlSupport { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + public static final clazz clazz = new clazz(); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.element_hash_id") + public static final SqlColumn elementHashId = clazz.elementHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.qualified_name") + public static final SqlColumn qualifiedName = clazz.qualifiedName; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.identifier_hash_id") + public static final SqlColumn identifierHashId = clazz.identifierHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.location_hash_id") + public static final SqlColumn locationHashId = clazz.locationHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: class.parent_hash_id") + public static final SqlColumn parentHashId = clazz.parentHashId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + public static final class clazz extends SqlTable { + public final SqlColumn elementHashId = column("element_hash_id", JDBCType.BIGINT); + + public final SqlColumn qualifiedName = column("qualified_name", JDBCType.VARCHAR); + + public final SqlColumn identifierHashId = column("identifier_hash_id", JDBCType.BIGINT); + + public final SqlColumn locationHashId = column("location_hash_id", JDBCType.BIGINT); + + public final SqlColumn parentHashId = column("parent_hash_id", JDBCType.BIGINT); + + public clazz() { + super("class"); + } + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzMapper.java b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzMapper.java new file mode 100644 index 00000000..db76275d --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/dal/mybatis/mapper/clazzMapper.java @@ -0,0 +1,160 @@ +package com.alipay.codequery.dal.mybatis.mapper; + +import static com.alipay.codequery.dal.mybatis.mapper.clazzDynamicSqlSupport.*; + +import com.alipay.codequery.dal.mybatis.domain.clazz; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import javax.annotation.Generated; +import org.apache.ibatis.annotations.Arg; +import org.apache.ibatis.annotations.ConstructorArgs; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.mybatis.dynamic.sql.BasicColumn; +import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter; +import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider; +import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider; +import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider; +import org.mybatis.dynamic.sql.select.CountDSLCompleter; +import org.mybatis.dynamic.sql.select.SelectDSLCompleter; +import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; +import org.mybatis.dynamic.sql.update.UpdateDSL; +import org.mybatis.dynamic.sql.update.UpdateDSLCompleter; +import org.mybatis.dynamic.sql.update.UpdateModel; +import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider; +import org.mybatis.dynamic.sql.util.SqlProviderAdapter; +import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils; + +@Mapper +public interface clazzMapper { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + BasicColumn[] selectList = BasicColumn.columnList(elementHashId, qualifiedName, identifierHashId, locationHashId, parentHashId); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + long count(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + @DeleteProvider(type=SqlProviderAdapter.class, method="delete") + int delete(DeleteStatementProvider deleteStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + @InsertProvider(type=SqlProviderAdapter.class, method="insert") + int insert(InsertStatementProvider insertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + @InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple") + int insertMultiple(MultiRowInsertStatementProvider multipleInsertStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="identifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + Optional selectOne(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + @SelectProvider(type=SqlProviderAdapter.class, method="select") + @ConstructorArgs({ + @Arg(column="element_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="qualified_name", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="identifier_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="location_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), + @Arg(column="parent_hash_id", javaType=Long.class, jdbcType=JdbcType.BIGINT) + }) + List selectMany(SelectStatementProvider selectStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + @UpdateProvider(type=SqlProviderAdapter.class, method="update") + int update(UpdateStatementProvider updateStatement); + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default long count(CountDSLCompleter completer) { + return MyBatis3Utils.countFrom(this::count, clazz, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default int delete(DeleteDSLCompleter completer) { + return MyBatis3Utils.deleteFrom(this::delete, clazz, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default int insert(clazz record) { + return MyBatis3Utils.insert(this::insert, record, clazz, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(identifierHashId).toProperty("identifierHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default int insertMultiple(Collection records) { + return MyBatis3Utils.insertMultiple(this::insertMultiple, records, clazz, c -> + c.map(elementHashId).toProperty("elementHashId") + .map(qualifiedName).toProperty("qualifiedName") + .map(identifierHashId).toProperty("identifierHashId") + .map(locationHashId).toProperty("locationHashId") + .map(parentHashId).toProperty("parentHashId") + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default int insertSelective(clazz record) { + return MyBatis3Utils.insert(this::insert, record, clazz, c -> + c.map(elementHashId).toPropertyWhenPresent("elementHashId", record::getElementHashId) + .map(qualifiedName).toPropertyWhenPresent("qualifiedName", record::getQualifiedName) + .map(identifierHashId).toPropertyWhenPresent("identifierHashId", record::getIdentifierHashId) + .map(locationHashId).toPropertyWhenPresent("locationHashId", record::getLocationHashId) + .map(parentHashId).toPropertyWhenPresent("parentHashId", record::getParentHashId) + ); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default Optional selectOne(SelectDSLCompleter completer) { + return MyBatis3Utils.selectOne(this::selectOne, selectList, clazz, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default List select(SelectDSLCompleter completer) { + return MyBatis3Utils.selectList(this::selectMany, selectList, clazz, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default List selectDistinct(SelectDSLCompleter completer) { + return MyBatis3Utils.selectDistinct(this::selectMany, selectList, clazz, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + default int update(UpdateDSLCompleter completer) { + return MyBatis3Utils.update(this::update, clazz, completer); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + static UpdateDSL updateAllColumns(clazz record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalTo(record::getElementHashId) + .set(qualifiedName).equalTo(record::getQualifiedName) + .set(identifierHashId).equalTo(record::getIdentifierHashId) + .set(locationHashId).equalTo(record::getLocationHashId) + .set(parentHashId).equalTo(record::getParentHashId); + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: class") + static UpdateDSL updateSelectiveColumns(clazz record, UpdateDSL dsl) { + return dsl.set(elementHashId).equalToWhenPresent(record::getElementHashId) + .set(qualifiedName).equalToWhenPresent(record::getQualifiedName) + .set(identifierHashId).equalToWhenPresent(record::getIdentifierHashId) + .set(locationHashId).equalToWhenPresent(record::getLocationHashId) + .set(parentHashId).equalToWhenPresent(record::getParentHashId); + } +} \ No newline at end of file diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectBuilder.java b/language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectBuilder.java new file mode 100644 index 00000000..1c4a2f43 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectBuilder.java @@ -0,0 +1,166 @@ +package com.alipay.codequery.project; + +import com.alipay.codequery.Configuration; +import com.alipay.codequery.util.PathUtil; +import kotlin.collections.CollectionsKt; +import lombok.extern.slf4j.Slf4j; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt; +import org.jetbrains.kotlin.config.CompilerConfiguration; + +import java.io.File; +import java.nio.file.Path; +import java.util.*; + + +@SuppressWarnings({"WeakerAccess", "unused", "UnusedReturnValue"}) +@Slf4j +public class ProjectBuilder { + + private final @NotNull CompilerConfiguration compileConfig; + private final @NotNull Collection kotlinFiles; + private final @NotNull Collection javaFiles; + private final @NotNull String commitId; + private final @NotNull String name; + private boolean shouldBuildResolveInfo = false; + + private ProjectBuilder(@NotNull Configuration config, boolean kt) { + compileConfig = ProjectUtil.buildCompileConfig(config.javaHome); + this.commitId = config.commitId; + this.name = config.repository; + + // prepare all files + if (kt) { + kotlinFiles = config.getKotlinFiles(); + } else { + kotlinFiles = Collections.emptyList(); + } + javaFiles = config.getJavaFiles(); + @NotNull ArrayList javaDirs = new ArrayList<>(config.getJavaDirs()); + @NotNull ArrayList classFiles = new ArrayList<>(config.getClassFiles()); + JvmContentRootsKt.addJavaSourceRoots(compileConfig, javaDirs); + JvmContentRootsKt.addJvmClasspathRoots(compileConfig, classFiles); + } + + private ProjectBuilder(@NotNull Configuration config) { + this(config, false); + } + + public static ProjectBuilder getInstance(Configuration configuration, boolean kt) { + ProjectBuilder builder = new ProjectBuilder(configuration); + return builder; + } + + @Contract(pure = true) + public static boolean isKotlinFile(@NotNull String name) { + return name.endsWith(".kt"); + } + + @Contract(pure = true) + public static boolean isJavaFile(@NotNull String name) { + return name.endsWith(".java"); + } + + public @NotNull ProjectBuilder withJavaSrc(@NotNull List roots) { + for (File root : roots) withJavaSrc(root); + return this; + } + + public @NotNull ProjectBuilder withJavaSrc(File... roots) { + for (File root : roots) withJavaSrc(root); + return this; + } + + public @NotNull ProjectBuilder withJavaSrc(@NotNull String... roots) { + for (String root : roots) withJavaSrc(root); + return this; + } + + public @NotNull ProjectBuilder withJars(@NotNull List jars) { + JvmContentRootsKt.addJvmClasspathRoots(compileConfig, jars); + return this; + } + + public @NotNull ProjectBuilder withJars(File... jars) { + return withJars(Arrays.asList(jars)); + } + + public @NotNull ProjectBuilder withJars(@NotNull String... jars) { + return withJars(CollectionsKt.map(Arrays.asList(jars), File::new)); + } + + public @NotNull ProjectBuilder withJarsUnder(@NotNull Path jarsRoot) { + return withJarsUnder(jarsRoot.toFile()); + } + + public @NotNull ProjectBuilder withJarsUnder(@NotNull String jarsRoot) { + return withJarsUnder(new File(jarsRoot)); + } + + public @NotNull ProjectBuilder withJarsUnder(File jarsRoot) { + File[] files = jarsRoot.listFiles(); + if (files != null) return withJars(files); + else return this; + } + + public @NotNull ProjectBuilder withKotlinSrc(File root) { + ArrayList results = new ArrayList<>(); + + PathUtil.TraverseBuilder traversal = new PathUtil.TraverseBuilder() + .withSymbol(false) + .withDirInResult(false) + .withSuffix(".kt"); + traversal.traverse(root, results); + + kotlinFiles.addAll(results); + return this; + } + + public @NotNull ProjectBuilder withKotlinSrc(@NotNull Path root) { + return withKotlinSrc(root.toFile()); + } + + public @NotNull ProjectBuilder withKotlinSrc(@NotNull String root) { + return withKotlinSrc(new File(root)); + } + + public @NotNull ProjectBuilder withJavaSrc(File root) { + ArrayList results = new ArrayList<>(); + PathUtil.TraverseBuilder traversal = new PathUtil.TraverseBuilder() + .withSymbol(false) + .withDirInResult(true) + .withSuffix(".java"); + traversal.traverse(root, results); + + for (File file : results) { + if (file.isDirectory()) { + JvmContentRootsKt.addJavaSourceRoot(compileConfig, file); + } else { + javaFiles.add(file); + } + } + return this; + } + + public @NotNull ProjectBuilder withJavaSrc(@NotNull String root) { + return withJavaSrc(new File(root)); + } + + public @NotNull ProjectBuilder withJavaSrc(@NotNull Path root) { + return withJavaSrc(root.toFile()); + } + + public @NotNull ProjectBuilder shouldBuildResolveInfo(boolean should) { + shouldBuildResolveInfo = should; + return this; + } + + public @NotNull PsiProject createProject() { + PsiProject project = new PsiProject(compileConfig, kotlinFiles, javaFiles, commitId, name); + if (shouldBuildResolveInfo) { + project.buildResolveInfo(); + } + return project; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectUtil.java b/language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectUtil.java new file mode 100644 index 00000000..e450e007 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/project/ProjectUtil.java @@ -0,0 +1,58 @@ +package com.alipay.codequery.project; + +import org.apache.commons.lang3.StringUtils; +import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys; +import org.jetbrains.kotlin.cli.common.messages.MessageCollector; +import org.jetbrains.kotlin.config.CommonConfigurationKeys; +import org.jetbrains.kotlin.config.CompilerConfiguration; +import org.jetbrains.kotlin.config.JVMConfigurationKeys; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class ProjectUtil { + + public static List getClassPaths(List classpath) { + List paths = new ArrayList<>(); + if (classpath != null && !classpath.isEmpty()) { + if (classpath.size() == 1) { + String classpathString = classpath.get(0); + if (classpathString != null && classpathString.length() > 0) { + paths = Arrays.asList(classpathString.split(File.pathSeparator)); + } + } else { + paths = classpath; + } + } + paths.removeIf(el -> el.endsWith(".pom")); + return paths; + } + + public static CompilerConfiguration buildCompileConfig(String javaHome) { + CompilerConfiguration compileConfig = new CompilerConfiguration(); + if(StringUtils.isBlank(javaHome)) { + compileConfig.put(JVMConfigurationKeys.NO_JDK, true); + } else { + compileConfig.put(JVMConfigurationKeys.NO_JDK, false); + File jdkDir = new File(javaHome); + if(!jdkDir.exists()) { + throw new RuntimeException("wrong jdkHome: " + javaHome); + } + compileConfig.put(JVMConfigurationKeys.JDK_HOME, jdkDir); + } + + // configuration.put(JVMConfigurationKeys.CONTENT_ROOTS, new ArrayList<>(500)); + compileConfig.put(JVMConfigurationKeys.ADDITIONAL_JAVA_MODULES, Collections.emptyList()); + + compileConfig.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.Companion.getNONE()); + compileConfig.put(CommonConfigurationKeys.MODULE_NAME, "psi"); + // configuration.put(JVMConfigurationKeys.USE_JAVAC, true); + compileConfig.put(JVMConfigurationKeys.USE_SINGLE_MODULE, true); + // configuration.put(JVMConfigurationKeys.USE_PSI_CLASS_FILES_READING, false); + + return compileConfig; + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/project/PsiProject.java b/language/java/extractor/src/main/java/com/alipay/codequery/project/PsiProject.java new file mode 100644 index 00000000..eabf5043 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/project/PsiProject.java @@ -0,0 +1,192 @@ +package com.alipay.codequery.project; + + +import com.alipay.codequery.Configuration; +import kotlin.UninitializedPropertyAccessException; +import kotlin.jvm.functions.Function1; +import lombok.Getter; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.kotlin.analyzer.AnalysisResult; +import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles; +import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; +import org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM; +import org.jetbrains.kotlin.com.google.common.collect.ImmutableCollection; +import org.jetbrains.kotlin.com.google.common.collect.ImmutableList; +import org.jetbrains.kotlin.com.intellij.lang.java.JavaLanguage; +import org.jetbrains.kotlin.com.intellij.openapi.editor.Document; +import org.jetbrains.kotlin.com.intellij.openapi.project.Project; +import org.jetbrains.kotlin.com.intellij.openapi.vfs.VirtualFile; +import org.jetbrains.kotlin.com.intellij.openapi.vfs.impl.jar.CoreJarFileSystem; +import org.jetbrains.kotlin.com.intellij.openapi.vfs.local.CoreLocalFileSystem; +import org.jetbrains.kotlin.com.intellij.psi.*; +import org.jetbrains.kotlin.com.intellij.psi.impl.PsiManagerEx; +import org.jetbrains.kotlin.com.intellij.psi.search.GlobalSearchScope; +import org.jetbrains.kotlin.config.CompilerConfiguration; +import org.jetbrains.kotlin.idea.KotlinLanguage; +import org.jetbrains.kotlin.load.kotlin.PackagePartProvider; +import org.jetbrains.kotlin.psi.KtFile; +import org.jetbrains.kotlin.resolve.BindingTrace; +import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer; + +import java.io.File; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; + + +@SuppressWarnings("WeakerAccess") +public final class PsiProject { + public final @NotNull String name; + public final @NotNull String revision; + public final @NotNull JavaPsiFacade javaPsiFacade; + private final @NotNull KotlinCoreEnvironment environment; + private final @NotNull Project project; + private final @NotNull ImmutableCollection kotlinFiles; + private final @NotNull ImmutableCollection javaFiles; + private final @NotNull GlobalSearchScope searchScope; + private final @NotNull PsiFileFactory psiFileFactory; + private final @NotNull PsiDocumentManager documentManager; + @Getter + private final @NotNull PsiManagerEx psiManagerEx; + @Getter + private final @NotNull CoreLocalFileSystem localFileSystem; + @Getter + private final @NotNull CoreJarFileSystem jarFileSystem; + + public PsiProject(@NotNull CompilerConfiguration configuration, + @NotNull Collection kotlinFiles, + @NotNull Collection javaFiles, + @NotNull String revision, + @NotNull String name) { + System.setProperty("idea.io.use.fallback", "true"); + System.setProperty("idea.io.use.nio2", "true"); + this.name = name; + this.revision = revision; + this.environment = KotlinCoreEnvironment.createForProduction(() -> { + }, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); + this.kotlinFiles = ImmutableList.copyOf(kotlinFiles); + this.javaFiles = ImmutableList.copyOf(javaFiles); + project = environment.getProject(); + searchScope = GlobalSearchScope.projectScope(project); + javaPsiFacade = JavaPsiFacade.getInstance(project); + psiManagerEx = PsiManagerEx.getInstanceEx(project); + psiFileFactory = PsiFileFactory.getInstance(project); + documentManager = PsiDocumentManager.getInstance(project); + localFileSystem = new CoreLocalFileSystem(); + jarFileSystem = new CoreJarFileSystem(); + } + + + + private static AnalysisResult buildResolveInfo(Project project, + Collection files, + CompilerConfiguration configuration, + Function1 packagePartProviderFactory, + BindingTrace trace) { + return TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( + project, files, trace, configuration, packagePartProviderFactory); + } + + + @NotNull + public static PsiProject buildProject(Configuration configuration, boolean shouldBuildResolveInfo) { + ProjectBuilder projectBuilder = ProjectBuilder.getInstance(configuration, false); + projectBuilder.shouldBuildResolveInfo(shouldBuildResolveInfo); + return projectBuilder.createProject(); + } + + @NotNull + public static PsiProject buildProject(Configuration configuration) { + return buildProject(configuration, true); + } + + /** + * Collect the information in the classpath and build the AST. + * This method might be time-consuming and it has side-effects. + */ + public void buildResolveInfo() { + buildResolveInfo(kotlinFiles.stream() + .map(localFileSystem::findFileByIoFile) + .filter(Objects::nonNull) + .map(psiManagerEx::findFile) + .filter(it -> it instanceof KtFile) + .map(it -> (KtFile) it) + .collect(Collectors.toList())); + } + + private void buildResolveInfo(Collection files) { + CodeAnalyzerInitializer initializer = CodeAnalyzerInitializer.Companion.getInstance(project); + BindingTrace trace = initializer.createTrace(); + buildResolveInfo(project, + files, + environment.getConfiguration(), + environment::createPackagePartProvider, + trace + ); + } + + + public final @Nullable Document documentOf(@NotNull PsiFile psiFile) { + return documentManager.getDocument(psiFile); + } + + /** + * Collect all java files in this project. + * + * @return all java files in current project + */ + public final @NotNull Stream allJavaFiles() { + return javaFiles.stream() + .map(localFileSystem::findFileByIoFile) + .filter(Objects::nonNull) + .map(psiManagerEx::findFile) + .filter(it -> it instanceof PsiJavaFile) + .map(it -> (PsiJavaFile) it); + } + + + /** + * Collect all files in this project. + * + * @return all files in current project + */ + public final @NotNull Stream allJavaPaths() { + return javaFiles.stream(); + } + + /** + * Collect all files in this project. + * + * @return all files in current project + */ + public final @Nullable PsiJavaFile getPsiJavaFileFromFile(File file) { + VirtualFile virtualFile = localFileSystem.findFileByIoFile(file); + if (virtualFile == null) { + return null; + } + PsiFile psiFile = psiManagerEx.findFile(virtualFile); + if (!(psiFile instanceof PsiJavaFile)) { + return null; + } + return (PsiJavaFile) psiFile; + } + + /** + * Collect all kotlin files in this project. + * + * @return all kotlin files in current project + */ + public final @NotNull Stream allKtFiles() { + return javaFiles.stream() + .map(localFileSystem::findFileByIoFile) + .filter(Objects::nonNull) + .map(psiManagerEx::findFile) + .filter(it -> it instanceof KtFile) + .map(it -> (KtFile) it); + } + +} + diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/util/LoggerUtil.java b/language/java/extractor/src/main/java/com/alipay/codequery/util/LoggerUtil.java new file mode 100644 index 00000000..c0999229 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/util/LoggerUtil.java @@ -0,0 +1,38 @@ +package com.alipay.codequery.util; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.core.appender.ConsoleAppender; +import org.apache.logging.log4j.core.config.Configurator; +import org.apache.logging.log4j.core.config.builder.api.AppenderComponentBuilder; +import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder; +import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory; +import org.apache.logging.log4j.core.config.builder.api.RootLoggerComponentBuilder; +import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration; + +public final class LoggerUtil { + public static void initLogger(Level level, String pattern) { + ConfigurationBuilder builder = ConfigurationBuilderFactory.newConfigurationBuilder(); + + builder.setStatusLevel(level); + // naming the logger configuration + builder.setConfigurationName("DefaultLogger"); + + // create a console appender + AppenderComponentBuilder appenderBuilder = builder.newAppender("Console", "CONSOLE") + .addAttribute("target", ConsoleAppender.Target.SYSTEM_OUT); + // add a layout like pattern, json etc + appenderBuilder.add(builder.newLayout("PatternLayout") + .addAttribute("pattern", pattern)); + RootLoggerComponentBuilder rootLogger = builder.newRootLogger(level); + rootLogger.add(builder.newAppenderRef("Console")); + + builder.add(appenderBuilder); + builder.add(rootLogger); + Configurator.reconfigure(builder.build()); + } + + public static void initLogger(Level logLevel) { + initLogger(logLevel, "%d %p %c [%t] (%F:%L) %m%n"); + } +} + diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/util/PathUtil.java b/language/java/extractor/src/main/java/com/alipay/codequery/util/PathUtil.java new file mode 100644 index 00000000..c67341d7 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/util/PathUtil.java @@ -0,0 +1,89 @@ +package com.alipay.codequery.util; + +import org.jetbrains.kotlin.com.intellij.openapi.util.text.StringUtil; + +import java.io.File; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; + +public class PathUtil { + + /** + * traverse the file root and collect all info into results. + * furthermore, we can give some limit. + * MENTION: default, the directory will be collected too. + */ + public static class TraverseBuilder { + String suffix; + Integer depth; + Boolean withDirInResult = true; + Boolean withSymbolLink = false; + + public TraverseBuilder() { + + } + + public TraverseBuilder withSymbol(Boolean b) { + this.withSymbolLink = b; + return this; + } + + public TraverseBuilder withSuffix(String suffix) { + this.suffix = suffix; + return this; + } + + public TraverseBuilder withDirInResult(Boolean b) { + this.withDirInResult = b; + return this; + } + + public List traverse(File root) { + List results = new ArrayList<>(); + return traverse(root, results); + } + + public List traverse(File root, List results) { + File[] files = root.listFiles(); + if (files == null) { + return results;// 判断目录下是不是空的 + } + for (File file : files) { + // 可选:是否递归解析链接符号 + if (!withSymbolLink) { + if (java.nio.file.Files.isSymbolicLink(file.toPath())) { + continue; + } + } + + // 判断是否文件夹 + if (file.isDirectory()) { + // 可选:保留目录信息 + if (withDirInResult) { + results.add(file); + } + // 调用自身,查找子目录 + traverse(file, results); + } else { + if (StringUtil.isNotEmpty(suffix)) { + // 可选:过滤文件类型 + if (!file.getName().endsWith(suffix)) { + continue; + } + } + results.add(file); + } + } + return results; + } + } + + public static String normalizePath(String sourcePath) { + return Paths.get(sourcePath).normalize().toString(); + } + + public static String getRelPath(String sourcePath, String path) { + return new File(sourcePath).toURI().relativize(new File(path).toURI()).getPath(); + } +} diff --git a/language/java/extractor/src/main/java/com/alipay/codequery/util/PsiUtil.java b/language/java/extractor/src/main/java/com/alipay/codequery/util/PsiUtil.java new file mode 100644 index 00000000..0b9b1053 --- /dev/null +++ b/language/java/extractor/src/main/java/com/alipay/codequery/util/PsiUtil.java @@ -0,0 +1,452 @@ +package com.alipay.codequery.util; + +import kotlin.UninitializedPropertyAccessException; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.kotlin.com.intellij.openapi.editor.Document; +import org.jetbrains.kotlin.com.intellij.openapi.util.Key; +import org.jetbrains.kotlin.com.intellij.psi.*; +import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.java.PsiMethodReferenceExpressionImpl; +import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl; +import org.jetbrains.kotlin.com.intellij.psi.util.*; + +import java.io.File; +import java.util.*; +import java.util.stream.Collectors; + +import static org.jetbrains.kotlin.com.intellij.psi.util.PsiTreeUtil.getParentOfType; + +public class PsiUtil { + private static final Logger LOGGER = LogManager.getLogger(PsiUtil.class); + + private static final Key, PsiClass>> LAMBDA_NAME = Key.create("ANONYMOUS_CLASS_NAME"); + + public static String getLoc(Document document, String path, T referenceElement) { + return String.join(File.pathSeparator, Arrays.asList(path, Integer.toString(getLineNo(document, referenceElement)))); + } + + public static int getLineNo(Document document, T referenceElement) { + return document.getLineNumber(referenceElement.getTextOffset()) + 1; + } + + public static String getQualifiedName(T psiField) { + String importName; + PsiClass containingClass = psiField.getContainingClass(); + if (containingClass == null) { + importName = psiField.getName(); + } else { + String containingClassQualifiedName = containingClass.getQualifiedName(); + if (containingClassQualifiedName != null) { + importName = String.join(".", Arrays.asList(containingClassQualifiedName, psiField.getName())); + } else if (containingClass instanceof PsiAnonymousClass) { + return null; + } else { + return null; + } + } + return importName; + } + + public static String getContainingClassQualifiedName(T psiField) { + String containingClassQualifiedName = null; + PsiClass containingClass = psiField.getContainingClass(); + if (containingClass != null) { + containingClassQualifiedName = containingClass.getQualifiedName(); + } + return containingClassQualifiedName; + } + + /** + * Checks whether given class is inner (as opposed to nested) + */ + public static boolean isInnerClass(@NotNull PsiClass aClass) { + return !aClass.hasModifierProperty(PsiModifier.STATIC) && aClass.getContainingClass() != null; + } + + public static String getVMClassName(@NotNull PsiClass aClass) { + StringBuilder className = new StringBuilder(); + PsiClass tmpClass = aClass; + while (tmpClass != null) { + if (!isInnerClass(tmpClass)) { + className.insert(0, tmpClass.getQualifiedName()); + tmpClass = null; + } else { + className.insert(0, "$" + tmpClass.getName()); + tmpClass = tmpClass.getContainingClass(); + } + } + return className.toString(); + } + + public static String getQualifiedNameIfPossible(PsiMethodReferenceExpression expression) { + try { + return expression.getCanonicalText(); + } catch (UninitializedPropertyAccessException e) { + return expression.getText(); + } + } + + public static String getQualifiedNameIfPossible(PsiAnnotationParameterList annotationParameterList) { + String annotationName; + PsiAnnotation psiAnnotation = ((PsiAnnotation) annotationParameterList.getParent()); + annotationName = getQualifiedNameIfPossible(psiAnnotation); + return annotationName; + } + + public static String getQualifiedNameIfPossible(PsiAnnotation psiAnnotation) { + try { + return psiAnnotation.getQualifiedName(); + } catch (UninitializedPropertyAccessException e) { + PsiJavaCodeReferenceElement annotationNameEl = psiAnnotation.getNameReferenceElement(); + return getQualifiedNameIfPossible(annotationNameEl); + } + } + + @Nullable + public static String getQualifiedNameIfPossible(PsiClass psiClass) { + if (psiClass == null) { + return "-1"; + } + try { + return psiClass.getQualifiedName(); + } catch (UninitializedPropertyAccessException e) { + return psiClass.getName(); + } + } + + public static String getQualifiedNameIfPossible(PsiJavaCodeReferenceElement psiJavaCodeReferenceElement) { + if (psiJavaCodeReferenceElement == null) { + return "-1"; + } + try { + return psiJavaCodeReferenceElement.getQualifiedName(); + } catch (UninitializedPropertyAccessException e) { + return psiJavaCodeReferenceElement.getReferenceName(); + } catch (Throwable e){ + return psiJavaCodeReferenceElement.getText(); + } + } + + public static String getQualifiedNameIfPossible(PsiExpression psiExpression) { + if (psiExpression == null) { + return "-1"; + } + if (psiExpression instanceof PsiMethodReferenceExpression) { + return ((PsiMethodReferenceExpressionImpl) psiExpression).getCanonicalText(); + } + if (psiExpression instanceof PsiReferenceExpressionImpl) { + return ((PsiReferenceExpressionImpl) psiExpression).getCanonicalText(); + } + return psiExpression.getText(); + } + + public static String getQualifiedNameIfPossible(PsiType psiType) { + if (psiType == null) { + return "null"; + } + try { + return psiType.getCanonicalText(); + } catch (UninitializedPropertyAccessException e) { + return psiType.getPresentableText(); + } catch (Throwable e){ + // return psiType.getPresentableText(); + return "null"; + } + } + + //Add util method for PsiType's getPresentableText(), in case cannot resolve it. + public static String getPresentableTextIfPossible(PsiType psiType) { + try { + return psiType.getPresentableText(); + } catch (UninitializedPropertyAccessException e) { + return "-1"; + } catch (Throwable e){ + return "-1"; + } + } + + public static String getClassName(PsiElement psiElement, PsiElement annotationTarget) { + String className; + if (annotationTarget instanceof PsiClass) { + className = ((PsiClass) annotationTarget).getQualifiedName(); + } else { + PsiClass[] classesInFile = ((PsiJavaFile) psiElement.getContainingFile()).getClasses(); + if (classesInFile.length > 0) { + className = classesInFile[0].getQualifiedName(); + } else { + return "-1"; + } + } + return className; + } + + @Nullable + public static PsiElement getAnnotationTarget(PsiElement annotation) { + PsiElement annotationTarget; + annotationTarget = getParentOfType(annotation, PsiMethod.class); + if (annotationTarget == null) { + annotationTarget = getParentOfType(annotation, PsiField.class); + } + if (annotationTarget == null) { + annotationTarget = getParentOfType(annotation, PsiClass.class); + } + return annotationTarget; + } + + public static String getMethodFullName(String parentClassName, PsiElement psiElement) { + String elementName = null; + + if (psiElement instanceof PsiMethod) { + PsiMethod psiMethod = (PsiMethod) psiElement; + elementName = parentClassName + "." + psiMethod.getName(); + } else if (psiElement instanceof PsiLambdaExpression) { + PsiLambdaExpression psiLambdaExpression = (PsiLambdaExpression) psiElement; + elementName = parentClassName + "." + getVMName(psiLambdaExpression); + } + return elementName; + } + + public static String getParamsTypeList(PsiElement psiElement) { + PsiParameterList psiParameterList = null; + if (psiElement instanceof PsiMethod) { + psiParameterList = ((PsiMethod) psiElement).getParameterList(); + return Arrays.stream(psiParameterList.getChildren()) + .filter(el -> el instanceof PsiParameter && PsiTreeUtil.getChildrenOfType(el, PsiTypeElement.class) != null) + .map(el -> Arrays.asList(Objects.requireNonNull(PsiTreeUtil.getChildrenOfType(el, PsiTypeElement.class)))) + .flatMap(Collection::stream) + .map(el -> el.getType().getCanonicalText()) + .collect(Collectors.joining(", ")); + } else if (psiElement instanceof PsiLambdaExpression) { + psiParameterList = ((PsiLambdaExpression) psiElement).getParameterList(); + return Arrays.stream(psiParameterList.getChildren()) + .filter(el -> el instanceof PsiParameter) + .map(el -> ((PsiParameter) el).getType().getCanonicalText()) + .collect(Collectors.joining(", ")); + } + return "-1"; + } + + public static String getReturnType(PsiElement psiElement) { + String returnTypeName = "void"; + PsiType returnType = null; + if (psiElement instanceof PsiMethod) { + PsiMethod psiMethod = (PsiMethod) psiElement; + returnType = psiMethod.getReturnType(); + } else if (psiElement instanceof PsiLambdaExpression) { + PsiLambdaExpression psiLambdaExpression = (PsiLambdaExpression) psiElement; + returnType = LambdaUtil.getFunctionalInterfaceReturnType(psiLambdaExpression); + } + if (returnType != null) { + returnTypeName = returnType.getCanonicalText(); + } + return returnTypeName; + } + + @NotNull + public static String getSignature(String methodFullName, String paramsTypeList) { + return methodFullName + "(" + paramsTypeList + ")"; + } + + public static int getLineNoEnd(Document document, PsiElement psiElement) { + return document.getLineNumber(psiElement.getTextRange().getEndOffset()) + 1; + } + + /** + * Convert to UPPER_UNDERSCORE format detecting upper case acronyms + */ + public static String lowerUnderscoreWithAcronyms(String name) { + if (name.toLowerCase().equals(name) || name.toUpperCase().equals(name)) { + return name; + } + StringBuilder result = new StringBuilder(); + boolean begin = true; + boolean lastUppercase = false; + for (int i = 0; i < name.length(); i++) { + char ch = name.charAt(i); + if (Character.isUpperCase(ch)) { + // is start? + if (begin) { + result.append(ch); + } else { + if (lastUppercase) { + // test if end of acronym + if (i + 1 < name.length()) { + char next = name.charAt(i + 1); + if (Character.isUpperCase(next)) { + // acronym continues + result.append(ch); + } else if (Character.isDigit(next)) { + // acronym continues when last char is number + result.append(ch); + } else { + // end of acronym + result.append('_').append(ch); + } + } else { + // acronym continues + result.append(ch); + } + } else { + // last was lowercase, insert _ + result.append('_').append(ch); + } + } + lastUppercase = true; + } else { + result.append(Character.toUpperCase(ch)); + lastUppercase = false; + } + begin = false; + } + return result.toString().toLowerCase(); + } + + public static String getUnderScoreText(String text) { + return Arrays.stream(text.split("\\.")).map(PsiUtil::lowerUnderscoreWithAcronyms).collect(Collectors.joining(".")); + } + + @Nullable + public static String getVMName(@NotNull PsiLambdaExpression lambdaExpression) { + final PsiClass upper = getParentOfType(lambdaExpression, PsiClass.class); + if (upper == null) { + return null; + } + ParameterizedCachedValue, PsiClass> value = upper.getUserData(LAMBDA_NAME); + if (value == null) { + value = CachedValuesManager.getManager(upper.getProject()).createParameterizedCachedValue( + new ParameterizedCachedValueProvider, PsiClass>() { + @Override + public CachedValueProvider.Result> compute(final PsiClass upper) { + final Map map = new HashMap<>(); + upper.accept(new JavaRecursiveElementWalkingVisitor() { + int index; + + @Override + public void visitLambdaExpression(PsiLambdaExpression expression) { + map.put(expression, "$" + index++); + super.visitLambdaExpression(expression); + } + + @Override + public void visitClass(PsiClass aClass) { + if (aClass == upper) { + super.visitClass(aClass); + } + } + }); + return CachedValueProvider.Result.create(map, upper); + } + }, false); + upper.putUserData(LAMBDA_NAME, value); + } + return "lambda" + getLambdaPrefix(lambdaExpression) + value.getValue(upper).get(lambdaExpression); + } + + public static String getLambdaPrefix(@NotNull PsiLambdaExpression lambdaExpression) { + PsiMember member = getParentOfType(lambdaExpression, PsiMethod.class, PsiClass.class, PsiField.class); + final String methodPrefix; + if (member instanceof PsiMethod) { + methodPrefix = member.getContainingClass() instanceof PsiAnonymousClass ? "" : "$" + member.getName(); + } else if (member instanceof PsiField && member.getContainingClass() instanceof PsiAnonymousClass) { + methodPrefix = ""; + } else { + //inside class initializer everywhere or field in a named class + methodPrefix = "$new"; + } + return methodPrefix; + } + + public static boolean isModifiedWith(PsiModifierListOwner element, String... modifiers) { + @Nullable PsiModifierList modifierList = element.getModifierList(); + if (modifierList == null) { + return false; + } + return Arrays.stream(modifiers).allMatch(modifierList::hasModifierProperty); + } + + public static boolean isModifiedWith(PsiModifierListOwner element, Set modifiers) { + @Nullable PsiModifierList modifierList = element.getModifierList(); + if (modifierList == null) { + return false; + } + return modifiers.stream().allMatch(modifierList::hasModifierProperty); + } + + public static String getNameIfPossible(PsiType psiType) { + try { + return psiType.getPresentableText(); + } catch (UninitializedPropertyAccessException e) { + return "-1"; + } catch (Throwable e) { + return "-1"; + } + } + + public static String mangleMethodName(@NotNull PsiMethod method) { + assert method != null; + PsiClass clazz = method.getContainingClass(); + if (clazz == null) { + return method.getName(); + } + String classname = clazz.getQualifiedName(); + if (classname == null) { + if (clazz.getNameIdentifier() != null) { + classname = clazz.getNameIdentifier().getText(); + } else { + classname = clazz.getName(); + } + } + StringBuilder suffix = new StringBuilder(); + suffix.append(":"); + // FIXME(Kai Luo): Resolve classes in JDK + suffix.append(PsiUtil.getQualifiedNameIfPossible(method.getReturnType())); + + PsiParameter[] params = method.getParameterList().getParameters(); + suffix.append("("); + for (int i = 0; i < params.length; ++i) { + PsiType ty = params[i].getType(); + // NOTE(Kai Luo): Resolution might occur here. + suffix.append(PsiUtil.getQualifiedNameIfPossible(ty)); + if (i != params.length - 1) { + suffix.append(", "); + } + } + suffix.append(")"); + + // Fixed: if the method exists type parameter, add it at the end of the method signature to guarantee the signature uniques. + // TODO: the current design may not be the best choice, needs to review it later. + PsiTypeParameterList typeParameterList = method.getTypeParameterList(); + try { + // typeParameterList.getText() may produce NPE, just catch it and ignore + if(typeParameterList != null && !(typeParameterList.getText().isEmpty())) { + suffix.append(":<"); + for (int i = 0; i < typeParameterList.getTypeParameters().length; ++i) { + suffix.append(typeParameterList.getTypeParameters()[i].getText()); + if (i != typeParameterList.getTypeParameters().length - 1) { + suffix.append(", "); + } + } + suffix.append(">"); + } + } catch (Exception e) { + LOGGER.debug(e.getMessage(), e); + } + return classname + "." + method.getName() + suffix; + } + + public static PsiElement getPsiParent(PsiElement element) { + PsiElement psiParent; + if (element instanceof PsiImportStatementBase || element.getParent() instanceof PsiParameterList + || element instanceof PsiTypeParameter || element instanceof PsiNameValuePair + || element instanceof PsiArrayInitializerMemberValue || element.getParent() instanceof PsiTypeTestPattern) { + psiParent = element.getParent().getParent(); + } else if (element instanceof PsiMethod) { + psiParent = ((PsiMethod) element).getContainingClass(); + } else { + psiParent = element.getParent(); + } + return psiParent; + } +} diff --git a/language/java/extractor/src/main/resources/coref_db_ddl.sql b/language/java/extractor/src/main/resources/coref_db_ddl.sql new file mode 100644 index 00000000..4fd22c89 --- /dev/null +++ b/language/java/extractor/src/main/resources/coref_db_ddl.sql @@ -0,0 +1,739 @@ +BEGIN TRANSACTION; + +CREATE TABLE IF NOT EXISTS "annotated_relation" ( + "annotation_hash_id" INTEGER, + "annotated_item_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "annotation_can_resolved" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL, + "annotation_declaration_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "debug_message" TEXT, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "annotation_access_argument_with_name" ( + "element_hash_id" INTEGER, + "annotation_access_hash_id" INTEGER NOT NULL, + "type_hash_id" INTEGER NOT NULL, + "argument_value_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "index_order" INTEGER NOT NULL, + "debug_message" TEXT +); +CREATE TABLE IF NOT EXISTS "anonymous_class" ( + "element_hash_id" INTEGER, + "base_class_reference_hash_id" INTEGER, + "base_class_type_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "boolean_literal" ( + "element_hash_id" INTEGER, + "value" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "callable_binding" ( + "caller_hash_id" INTEGER NOT NULL, + "callee_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "callable_enclosing_expression" ( + "expression_hash_id" INTEGER NOT NULL, + "callable_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "callable_enclosing_statement" ( + "statement_hash_id" INTEGER NOT NULL, + "callable_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "character_literal" ( + "element_hash_id" INTEGER, + "value" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "class" ( + "element_hash_id" INTEGER, + "qualified_name" TEXT, + "identifier_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "class_hierarchy" ( + "child_hash_id" INTEGER, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "class_implement_list" ( + "element_hash_id" INTEGER, + "implemented_element_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "class_initializer" ( + "element_hash_id" INTEGER, + "debug_message" TEXT, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "code_block" ( + "element_hash_id" INTEGER, + "number_of_statement" INTEGER NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "is_empty" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "debug_message" TEXT +); +CREATE TABLE IF NOT EXISTS "comment" ( + "element_hash_id" INTEGER, + "text" text NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "comment_type" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "container_parent" ( + "child_hash_id" INTEGER NOT NULL, + "parent_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "cupackage" ( + "file_hash_id" INTEGER NOT NULL, + "package_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "double_literal" ( + "element_hash_id" INTEGER, + "value" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "empty_statement" ( + "element_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "enum_constant" ( + "element_hash_id" INTEGER, + "name" TEXT, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER, + "debug_message" TEXT +); +CREATE TABLE IF NOT EXISTS "exception" ( + "element_hash_id" INTEGER, + "type_hash_id" INTEGER, + "callable_hash_id" INTEGER, + "name" text +); +CREATE TABLE IF NOT EXISTS "expression" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "index_order" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "debug_message" TEXT +); +CREATE TABLE IF NOT EXISTS "expression_list" ( + "element_hash_id" INTEGER, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER, + "debug_message" TEXT, + "size" INTEGER +); +CREATE TABLE IF NOT EXISTS "expression_list_expression_relation" ( + "expression_list_hash_id" INTEGER, + "expression_hash_id" INTEGER, + "position" INTEGER +); +CREATE TABLE IF NOT EXISTS "file" ( + "element_hash_id" INTEGER, + "qualified_name" TEXT NOT NULL, + "extension" TEXT NOT NULL, + "name" TEXT NOT NULL, + "number_of_lines_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "file_md5_sum" ( + "file_hash_id" INTEGER, + "value" TEXT +); +CREATE TABLE IF NOT EXISTS "file_sha256_sum" ( + "file_hash_id" INTEGER, + "value" TEXT +); +CREATE TABLE IF NOT EXISTS "floating_point_literal" ( + "element_hash_id" INTEGER, + "value" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "folder" ( + "element_hash_id" INTEGER, + "qualified_name" TEXT NOT NULL, + "name" TEXT NOT NULL, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "identifier" ( + "element_hash_id" INTEGER, + "location_hash_id" INTEGER, + "name" TEXT, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "import" ( + "element_hash_id" INTEGER, + "reference_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER, + "is_foreign_import" INTEGER +); +CREATE TABLE IF NOT EXISTS "import_static_reference_element" ( + "element_hash_id" INTEGER, + "debug_message" TEXT, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "integer_literal" ( + "element_hash_id" INTEGER, + "value" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "interface" ( + "element_hash_id" INTEGER, + "qualified_name" TEXT, + "identifier_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "javadoc_comment" ( + "element_hash_id" INTEGER, + "documentable_hash_id" INTEGER NOT NULL, + "text" text NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "javadoc_tag" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL, + "value" TEXT, + "containing_comment_hash_id" INTEGER NOT NULL, + "index_order" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "local_class" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL, + "debug_message" TEXT, + "location_hash_id" INTEGER, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "location" ( + "element_hash_id" INTEGER, + "file_hash_id" INTEGER, + "start_line_number" INTEGER, + "start_column_number" INTEGER, + "end_line_number" INTEGER, + "end_column_number" INTEGER +); +CREATE TABLE IF NOT EXISTS "metainfo" ( + "oid" INTEGER, + "kind" TEXT, + "value" TEXT, + "program_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "modifier" ( + "element_hash_id" INTEGER, + "name" TEXT, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "modifier_list" ( + "element_hash_id" INTEGER, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "module" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "name_string" ( + "parent_hash_id" INTEGER NOT NULL, + "name_element_hash_id" INTEGER NOT NULL, + "value_element_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "null_literal" ( + "element_hash_id" INTEGER, + "value" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "number_of_lines" ( + "element_hash_id" INTEGER, + "number_of_total_lines" INTEGER, + "number_of_valid_lines" INTEGER, + "number_of_comment_lines" INTEGER +); +CREATE TABLE IF NOT EXISTS "package_statement" ( + "element_hash_id" INTEGER, + "qualified_name" TEXT NOT NULL, + "location_hash_id" INTEGER, + "package_hash_id" INTEGER, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "parent" ( + "parent_hash_id" INTEGER, + "parent_type" TEXT +); +CREATE TABLE IF NOT EXISTS "polyadic_expression" ( + "element_hash_id" INTEGER, + "size" INTEGER NOT NULL, + "opcode" TEXT +); +CREATE TABLE IF NOT EXISTS "primitive" ( + "oid" INTEGER, + "name" TEXT +); +CREATE TABLE IF NOT EXISTS "program" ( + "program_hash_id" INTEGER NOT NULL, + "absolute_prefix_path" TEXT +); +CREATE TABLE IF NOT EXISTS "reference_element" ( + "element_hash_id" INTEGER, + "debug_message" TEXT, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "reference_list" ( + "element_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "parent_hash_id" INTEGER, + "debug_message" TEXT, + "role" TEXT +); +CREATE TABLE IF NOT EXISTS "reference_parameter_list" ( + "type_element_hash_id" INTEGER, + "list_hash_id" INTEGER, + "index_order" INTEGER, + "parent_hash_id" INTEGER, + "debug_message" TEXT, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "reference_type" ( + "oid" INTEGER, + "name" TEXT, + "qualified_name" TEXT +); +CREATE TABLE IF NOT EXISTS "resource_list" ( + "element_hash_id" INTEGER, + "debug_message" TEXT, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "statement" ( + "element_hash_id" INTEGER, + "parent_hash_id" INTEGER NOT NULL, + "index_order" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "debug_message" TEXT, + "type" TEXT +); +CREATE TABLE IF NOT EXISTS "statement_enclosing_expression" ( + "expression_hash_id" INTEGER NOT NULL, + "statement_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "string_literal" ( + "element_hash_id" INTEGER, + "value" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "token" ( + "element_hash_id" INTEGER NOT NULL, + "value" TEXT, + "location_hash_id" INTEGER, + "parent_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "type_parameter" ( + "element_hash_id" INTEGER, + "debug_message" TEXT, + "owner_hash_id" INTEGER, + "index_order" INTEGER, + "extends_list_hash_id" INTEGER, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "annotation_can_not_resolved" ( + "element_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "debug_message" TEXT NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + PRIMARY KEY("element_hash_id") +); +CREATE TABLE IF NOT EXISTS "method" ( + "element_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "signature" TEXT NOT NULL, + "type_hash_id" INTEGER NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "definition_body" TEXT NOT NULL, + PRIMARY KEY("element_hash_id") +); +CREATE TABLE IF NOT EXISTS "this_expression_with_qualifier" ( + "element_hash_id" INTEGER, + "qualifier_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "this_access_expression" ( + "element_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "super_expression" ( + "element_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "super_expression_with_qualifier" ( + "element_hash_id" INTEGER NOT NULL, + "qualifier_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "annotation_declaration_parameter" ( + "element_hash_id" INTEGER, + "annotation_declaration_hash_id" INTEGER NOT NULL, + "type_hash_id" INTEGER NOT NULL, + "parameter_value_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "debug_message" TEXT +); +CREATE TABLE IF NOT EXISTS "annotation_declaration_parameter_default_value" ( + "element_hash_id" INTEGER NOT NULL, + "default_value" TEXT +); +CREATE TABLE IF NOT EXISTS "method_reference_expression" ( + "element_hash_id" INTEGER NOT NULL, + "is_constructor" INTEGER NOT NULL, + PRIMARY KEY("element_hash_id") +); +CREATE TABLE IF NOT EXISTS "instanceof_expression" ( + "element_hash_id" INTEGER, + "operand_hash_id" INTEGER, + "check_type_hash_id" INTEGER NOT NULL, + "pattern_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "while_statement" ( + "element_hash_id" INTEGER, + "condition_hash_id" INTEGER NOT NULL, + "body_declaration_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "do_while_statement" ( + "element_hash_id" INTEGER, + "keyword" TEXT, + "condition_hash_id" INTEGER NOT NULL, + "body_declaration_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "block_statement" ( + "element_hash_id" INTEGER, + "code_block_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "super_access_expression" ( + "element_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "super_constructor_invocation" ( + "element_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "method_access_expression_with_type" ( + "element_hash_id" INTEGER, + "type_hash_id" INTEGER NOT NULL, + "referen_method_hash_id" INTEGER NOT NULL, + "argument_list_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "method_access_expression_without_type" ( + "element_hash_id" INTEGER, + "referen_method_hash_id" INTEGER NOT NULL, + "argument_list_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "conditional_expression" ( + "element_hash_id" INTEGER, + "condition_expression_hash_id" INTEGER NOT NULL, + "then_part_hash_id" INTEGER NOT NULL, + "else_part_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "continue_statement" ( + "element_hash_id" INTEGER, + "continued_statement_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "array_initializer_expression" ( + "element_hash_id" INTEGER, + "type_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "break_statement" ( + "element_hash_id" INTEGER, + "exited_statement_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "array_creation_expression" ( + "element_hash_id" INTEGER, + "number_of_array_dimension" INTEGER NOT NULL, + "type_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "new_expression" ( + "element_hash_id" INTEGER, + "reference_hash_id" INTEGER NOT NULL, + "type_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "constructor_invocation" ( + "element_hash_id" INTEGER, + "class_reference_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "declaration_element" ( + "element_hash_id" INTEGER, + "index_order" INTEGER, + "declaration_statement_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "expression_statement" ( + "element_hash_id" INTEGER, + "expression_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "type_cast_expression" ( + "element_hash_id" INTEGER, + "cast_expression_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "switch_statement" ( + "element_hash_id" INTEGER, + "discriminant_hash_id" INTEGER NOT NULL, + "body_declaration_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "switch_label_statement" ( + "element_hash_id" INTEGER, + "case_value_hash_id" INTEGER NOT NULL, + "enclosing_switch_block_hash_id" INTEGER NOT NULL, + "next_switch_case_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "type_literal" ( + "element_hash_id" INTEGER, + "type_element_hash_id" INTEGER, + "type_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "synchronized_statement" ( + "element_hash_id" INTEGER, + "lock_expression_hash_id" INTEGER NOT NULL, + "body_declaration_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "catch_section" ( + "element_hash_id" INTEGER, + "debug_message" TEXT NOT NULL, + "parameter_hash_id" INTEGER NOT NULL, + "type_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "try_statement_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "throw_statement" ( + "element_hash_id" INTEGER, + "exception_hash_id" INTEGER NOT NULL, + "block_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "labeled_statement" ( + "element_hash_id" INTEGER, + "labeled_hash_identifier_hash_id" INTEGER NOT NULL, + "statement_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "lambda_expression" ( + "element_hash_id" INTEGER, + "parameter_list_hash_id" INTEGER NOT NULL, + "body_hash_id" INTEGER NOT NULL, + "is_void_compatible" INTEGER, + "is_value_compatible" INTEGER +); +CREATE TABLE IF NOT EXISTS "assert_statement" ( + "element_hash_id" INTEGER, + "assert_condition_hash_id" INTEGER NOT NULL, + "assert_description_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "return_statement" ( + "element_hash_id" INTEGER, + "return_expression_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "yield_statement" ( + "element_hash_id" INTEGER, + "expression_hash_id" INTEGER NOT NULL, + "enclosing_expression_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "unary_expression" ( + "element_hash_id" INTEGER, + "operand_hash_id" INTEGER NOT NULL, + "opcode" TEXT NOT NULL, + "is_postfix" INTEGER +); +CREATE TABLE IF NOT EXISTS "array_access_expression" ( + "element_hash_id" INTEGER, + "index_expression_hash_id" INTEGER NOT NULL, + "array_expression_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "for_statement" ( + "element_hash_id" INTEGER, + "initialization_hash_id" INTEGER, + "condition_hash_id" INTEGER NOT NULL, + "update_hash_id" INTEGER NOT NULL, + "body_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "foreach_statement" ( + "element_hash_id" INTEGER, + "iterated_value_hash_id" INTEGER NOT NULL, + "iteration_parameter_hash_id" INTEGER NOT NULL, + "body_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "assignment_expression" ( + "element_hash_id" INTEGER, + "lhs_hash_id" INTEGER NOT NULL, + "rhs_hash_id" INTEGER NOT NULL, + "opcode" TEXT +); +CREATE TABLE IF NOT EXISTS "binary_expression" ( + "element_hash_id" INTEGER, + "lhs_hash_id" INTEGER NOT NULL, + "rhs_hash_id" INTEGER NOT NULL, + "opcode" TEXT +); +CREATE TABLE IF NOT EXISTS "if_statement_with_else" ( + "element_hash_id" INTEGER, + "condition_hash_id" INTEGER NOT NULL, + "consequent_hash_id" INTEGER NOT NULL, + "alternate_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "reference_expression" ( + "element_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "annotation_access_argument_without_name" ( + "element_hash_id" INTEGER, + "annotation_access_hash_id" INTEGER NOT NULL, + "argument_value_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "index_order" INTEGER NOT NULL, + "debug_message" TEXT +); +CREATE TABLE IF NOT EXISTS "constructor" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL, + "signature" TEXT NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "definition_body" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "if_statement_without_else" ( + "element_hash_id" INTEGER, + "condition_hash_id" INTEGER NOT NULL, + "consequent_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "import_static_statement" ( + "element_hash_id" INTEGER, + "reference_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "type_element" ( + "element_hash_id" INTEGER, + "reference_type_hash_id" INTEGER, + "debug_message" text, + "parent_hash_id" INTEGER, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "try_statement_without_finally" ( + "element_hash_id" INTEGER, + "try_block_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "empty_reference_parameter_list" ( + "list_hash_id" INTEGER, + "parent_hash_id" INTEGER, + "debug_message" TEXT, + "location_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "long_literal" ( + "element_hash_id" INTEGER, + "value" TEXT +); +CREATE TABLE IF NOT EXISTS "annotation_declaration" ( + "element_hash_id" INTEGER NOT NULL, + "qualified_name" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "array" ( + "element_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS "field" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "debug_message" TEXT NOT NULL, + "location_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "local_variable" ( + "element_hash_id" INTEGER, + "parent_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL, + "debug_message" TEXT, + "name" TEXT +); +CREATE TABLE IF NOT EXISTS "parameter" ( + "element_hash_id" INTEGER, + "name" TEXT NOT NULL, + "index_order" INTEGER NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER, + "debug_message" TEXT, + "type_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "try_statement_with_finally" ( + "element_hash_id" INTEGER, + "try_block_hash_id" INTEGER, + "finally_block_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "reference_relation" ( + "reference_element_hash_id" INTEGER, + "definition_element_hash_id" INTEGER +); +CREATE TABLE IF NOT EXISTS "annotation_array_initializer" ( + "element_hash_id" INTEGER, + "debug_message" TEXT NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "element" ( + "element_hash_id" INTEGER NOT NULL, + "type" TEXT, + "parent_id" INTEGER, + "parent_type" TEXT, + PRIMARY KEY("element_hash_id") +); +CREATE TABLE IF NOT EXISTS "javadoc_data_token" ( + "element_hash_id" INTEGER, + "value" TEXT, + "parent_hash_id" INTEGER NOT NULL, + "index_order" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "javadoc_tag_value" ( + "element_hash_id" INTEGER, + "value" TEXT, + "parent_hash_id" INTEGER NOT NULL, + "location_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "np_method" ( + "element_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "signature" TEXT NOT NULL, + "type_hash_id" INTEGER NOT NULL, + "parent_hash_id" INTEGER NOT NULL, + PRIMARY KEY("element_hash_id") +); +CREATE TABLE IF NOT EXISTS "np_class" ( + "element_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "qualified_name" TEXT NOT NULL, + "parent_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "np_interface" ( + "element_hash_id" INTEGER NOT NULL, + "name" TEXT NOT NULL, + "qualified_name" TEXT NOT NULL, + "parent_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "np_file" ( + "element_hash_id" INTEGER, + "qualified_name" TEXT NOT NULL, + "name" TEXT NOT NULL, + "project_hash_id" INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS "np_project" ( + "element_hash_id" INTEGER, + "extension" TEXT NOT NULL, + "name" TEXT NOT NULL +); + +INSERT INTO "primitive" VALUES (1,'byte'); +INSERT INTO "primitive" VALUES (2,'char'); +INSERT INTO "primitive" VALUES (3,'double'); +INSERT INTO "primitive" VALUES (4,'float'); +INSERT INTO "primitive" VALUES (5,'int'); +INSERT INTO "primitive" VALUES (6,'long'); +INSERT INTO "primitive" VALUES (7,'short'); +INSERT INTO "primitive" VALUES (8,'boolean'); +INSERT INTO "primitive" VALUES (9,'void'); +INSERT INTO "primitive" VALUES (10,'null'); + +COMMIT; diff --git a/language/java/extractor/src/main/resources/coref_java_src.db b/language/java/extractor/src/main/resources/coref_java_src.db new file mode 100644 index 0000000000000000000000000000000000000000..a2a7a3e0f146dceaf8d9fa5ce6b33a066fbef3f5 GIT binary patch literal 565248 zcmeI)TZ|mnnb`5J8Im>Ayo_u~uBB+1t){tTo0PZ|P02LPrAWF>(HspWYG{(aY`LcU z%uI>ZRjul3a)!37bdNT1y!#LY2oeN|k!-Tq82b?9AwYo5Ly!c?!@~Qp4~qZ^Hg`A= zNq{7aBv>a%PF3}-s_Qb;YB1dHKLL?bbxv1(-|su;RGl8!@4mBWdZM)IxDCTAohv+3 zP?W+OrBb0#*dzb@k^Ha!=U3$q{<;1irT;_5zk3R=-2M7q*5}~G@JadC zFFbcp{w+8C{6PQ#1Q0*~0R#|0009ILKmdUW7GVEB!Nnyt1Q0*~0R#|0009ILKmY** zdIIeK843s>fB*srAb*RuQ3@SfB*srAbpZpq=Ap!^>fB*srAbYU@8j~Rc z2q1s}0tg_000IagfB*vQ{}}@aAb*RuQ3@SfB*srAbpZpq=Ap!^>fB*srAbSDE29-J?iP8R3O!V(Q(d-}T3 zTG!2bIeLfT(O)0__>}$Bx%`}}oj9R%FNFYhyP?+{yX6_SCq@sRk3o#KC1cFrSX!=L zuiic_p=_fe%Ja+Bd&~Y&({M-CMmt(g&F~8_ARTS2iv9kWGs+~He zbks0`M$_BWW%yoD84*2vE|x^JH9L)B<%3VFTBV|N&Ifm@J8d~)bj$RFYgo~vXQTIt zHfG<(_jzbo?OuMRrCZCTr8|p@#Y#u{R4`UM?*#X+wVOumfrJ?R@agDX2j{~Zu9`C1 z{y^=k4lW;-CAeOCCmF+Mo>8@zUsgJL7=vSbhG`2|4@)XXPUQGgv4~>LVPLg&)2gT6 zG-JRFqL+cay`XAGjwszny}%m&#H=~NKhMO&2+ro$!4n%^dEWnfaHs7=?HQh2Sc@UF-&6JaE+RLHuRqmwfKo*EV+1lexfPQi8tm{ zty=BB)6@*h^51QAVb?6DW!h`Q8K2cQ9}6$zGGU~Hhiq<9# zs1H6eOhIfkUHKj$-xM+%=W>%6Ua03ixbP>ChPE$!TJ~mtpK!&r>#`1m$a}|XO0d1= zFh2i7c>_4;lku>Zz=gfxtbaWitSgRV3B&FW)!5;_Xk4+@k3CEu?g>KJIu?Xr*p9u~ zaM~?BnEA28z0nY2t@$CW7%dTASa-#$kWaMQxQ{=*M>_fso!6+<gof+~n7fga>-D(mgh#Y8NjmTi=Nnp(f{nTv{CKp{S3fKYDsLm3p*S zzV7hx6v=4hu5}@2gPXh~ihL$@C`NiEP-H*TG)2|Uo>e;cN0sD*)fH9{R4>$#Gc$=c zBOOAPksRYA%8zJxUAet#j17}wCEWktE6hAv*nj9N2j4pIYX?5J|L^R7rr4PO-MOEs z|5tsy?+p?Zp?B?%tr{ z4W}NwF!ldE6|HXn^pgzri~;92r4D5Op>-mNt@CaeoACFVt4^c$?-ydR^-hPeIr7_? z{!6can+Ng{Jp4jpp-m&n_ zZ+}q0ep|k8Wfyv>9Dc+6AV}7fU#q&SMokQU zI37)Ka6Uh^UE1dsUK-sx`0=g{ce$~{&yOcJ(m6lHk>NTzfYwT?cJrpvt%jzJrX$xO zfB$LLM&9pxUwX*zL9&{U#X`*PogZ?_GVyV~^OjS^II3!g4=YSt~v?TK5f3gQb zWITQXFN^-N9F+)ui5%|#3(rjcew+*uKmY**5I_I{1Q0*~0R#}3W&!^9|I=K3az_9G z1Q0*~0R#|0009ILm=*!{|I<=w@Y?8~_`eT+`oP~k zaA^PE-~W~3_ve3e?yt@rR>i*W@BMpwU)}SUW`9jtntT7i=L)woedheu&e_)sh1pj! zJ5E|-_w`GvcI}$7)%J`POBlB8c!p;>wq7%AT^{JJXgStHQO{_)a_x5Y%5t@|eC6t5 zwN%dNSuUL{&XrRxq45Y z8aZt_wJ^TS57)&?drfbMR?ApRx=Pb<^8$GL_Kml$+`eDBS-pR9EaFPBQvZUg9X_md zjs*w4J^k36N4B(xj|9KP zwCiF+cig&g2gA!hFE%`3*IR*K;s-yTMCXNzs-|g5_t{Xwc_4?E|JUVM-u}7lbR(nv zp<%Uq<2SPweq&1H#mWa?4yx2SAH>%3T+?2Y0J27g6+QapXtdGB?6Ca^Mxq^LA&2mr z7gX)W4W+xkcYnhRr@ydkmecZs5gSdp%(UdPBZqlL>!o;nS)F_F4lX@b?m>)x?86(! zhtr^&Ol9>;s&@3KvUMby%HYFaNeM9DE~R>doBJ^)4eCgT)VUhzl`@(9IT=0a*dZU`+2!y z^ytg+php|SsGX6=l7HXf)5t%1zin9l@>GkAUx{fuR7MISc+L<#-w-QUMSBYU}y%VpeCD&`u&d)DPihV{N zsSw4=qgPe!$PuMe4Z?4_&YB#Uy?no`eN*M;~&beOUryLhegthtJADG^}&!a&V;XtFNUcH@10@s&c&h#ntI;Jucsr^ zG_qLNUI|BK_zvGRY7gXFuReGvjh%Qke&^T+^0QA`03(ATbr6O*gg1;oX-D#lH_1xB z{j#c^I;C{)29kEWu_E97oK?A|+M*RZJR8k0)|#K+@B^OQ4_VD-5&mYCZ5Z%DL;{vSF#JIRPER?r5ipg z{fC$wF8+Jr$d9kY?mO(1IY=YJAh=xGV=B@!2vpDQTCDK<|4I7}f_xA_009ILKmY** z5I_I{1P~Y(VE;dE!Wje*KmY**5I_I{1Q0*~0R$#Zfc^iZRg`=XKmY**5I_I{1Q0*~ z0R#{j7hwNCZo(M^5I_I{1Q0*~0R#|0009IhO~Bv(7Z?6=Vc~x*{FjA)yYL4KKVA4I z3;$r@w-^4VJjovf5I_I{1Q0*~0R#|0009IL*hzu8;;iy~(f|J~oST=P1Q0*~0R#|0009ILKmY**o(=)_|4&C9hynow5I_I{ z1Q0*~0R#|00D+wpI9UAS!l#rU6%PLJ!0#8oSKK@QW%Xa}`=fo@-Y@TYJo`6h56=AP zz#IE33wvdk|5!L%{C|bwA1n8FGN7rwcISg7Rl9IO*?QhHRxD9-?7Hchj%`@F*l4<< z)shFvXWzYcyLx50T3Wtxb+KA1CwD5BP8R3O!V(Q(d-}T3TG!2bdH%-Ia`k%k_G#HR z_}s`1$2yjlZY`IV?kq0)pYYa&tv3yK{CbgY!fJ_}ZpBKc@O4$Ycv0zSLH@0FQ@FZO ztI5Pi;z>DuD=LuEE1N)u@XQTWJ9SFw+zmolv7Fiiz2zBRU=}-EirzBTntiKKyDs$b zQ}JR9@MK7L-&D1;XO-^#Af&pZKUy~}F^p>b%v;gG#yjN4_CRbta$Gq&maF%cqeCM# zR=?YdQ{U96|jOG+;%};1Jv_HA{zxg#)d;N8# z`)&}wY0H6P*Mze=GFlT)-i+pw*e5?DM@|pJu8#=^)mj&F;Ch=)G1fd7T7JK#;d#Ox zuaYdzH>;|4?V8fP7$nya-nvuQU9l=$A(I?QF{A10(L^(PW~Up8*=*^um@Ut3*F47^ ztY4#j-oAa~tt+?hmu^#wi=?(cLGS)<2xAW#zRl9jp>8gQl_{bSPsr5&u zx30h6HY{`16mCxQ^{8!5?`+!9sZbsSknT{dcvn>I<(HMtk;F{m!Bn$j-DYsb$_H-* z?>n9FeaBmuGkffDpM3VK(Fl?|Wyevh9QtR4Gf(ic*?n$N)!unW*?KlW>Mdqt0f%Mx zM`?bKccN+Je;_+0f28J5kKP(CM{}^GXH2$|{8KjEwRZ5rXqm0yTVAR6)+pD~g`28Y ztty?DM#j#_0VV$5C?I+fj2p!8)fazR)eaw4K6+yLL9-QnkBxmF}$({PD#o znA=X<3*M|UXKTOH?WEG>TsXV3{y5tH6qe7}ocYV||Ko#!V+0UD009ILKmY**5I_I{ z1SU^_{r}|El#CES009ILKmY**5I_I{1Q3V|u>X&XaEt%~2q1s}0tg_000IagfWYJl zu>YUDnvxL$2q1s}0tg_000IagfB*t<0rvlK5snc+009ILKmY**5I_I{1Q3`!0rvls zS5q=V009ILKmY**5I_I{1Q0+VF2MdjF2XSa2q1s}0tg_000IagfB*uMC&2!H@@h&( z2q1s}0tg_000IagfB*sr#0A*@$3-|s009ILKmY**5I_I{1Q0-A@&wrbPhL&Q2mu5T zKmY**5I_I{1Q0*~fw%zs|F{Up2q1s}0tg_000IagfB*srOr8My|H-Q<86kiG0tg_0 z00IagfB*srAP^T|{~s6O7y$$jKmY**5I_I{1Q0*~fyonK|37&(B_jk7KmY**5I_I{ z1Q0*~0R-X#?Em8;93y}L0tg_000IagfB*srATW6X?EfdPreuTw0tg_000IagfB*sr zAb>zzfc<}5gkuB{KmY**5I_I{1Q0*~0R$#bfc^jE)s&17KmY**5I_I{1Q0*~0R#|; z3$Xu>i*Sqp0tg_000IagfB*srAb`N+2^`!%Tllo{dxb-P<=}rPzBm6D=Kl5EMYX%{ z-|V}(_xpR?**}>1x$=7l{`-OB`%f%fQp$yE`_GLT?4MPBW9%d+c0-{1g>S3ci4)34 z&w9p+C2EFOTi08n=9!KiIas-NyLx50T3Wtxb+KA1N7~Azlg0V6utY=Hp1y9h)^)R9 zp1-lQT)keseOk8F#Y%fkZ-`dQSQF*>rMkZs=?&Z0gddoAs%tu*Qt90Lma1L2pmc8rSglRFw(dH% z`B>D4mrFitMER0C-&D2Z$CXYyNG*W2 zOj!`a8vXgZ(KJSz@`De0XN{7eLwxuYD_!+|z`j)p*&mtyAhnDYVU4gSp4FrAwh}w# zM_w~pLVsvj?VQmk?3(4YOnXi5-DxE#SUjc3n6|}+*Y6(OC$+b%(zSc4_VUY0_rj>e zU?lf$IynB7#Ow#n`FYpPR?RgVrfnq5>qr()G}eyXRkicymCpU)Sd*E1BLh1a39)nE ziDr}3B|oFsHOH0-X?*k>VRS|i-N zXZA2#`a{R8>oup*lw(Q091g1JU%+n;9*7C;a!`K#SAy)j*LvB@XZ5IV@bDfzQIBUI z`#^s7{Y&s=TATVL`Zl#8D~YMx0QIy4}F00IagfB*sr zAb5I_I{1Q0*~ z0R#|0U;+f#|4%>>NdW-_5I_I{1Q0*~0R#|00D&9<_WwCRG$Vij0tg_000IagfB*sr zATR*}?EfdAh@^l30tg_000IagfB*srAb>!Q0Q>(OAes?C009ILKmY**5I_I{1Q3`2 z0rvkBP()Hd009ILKmY**5I_I{1Q0+VM}Yl*4iL={(l0BND2rb zfB*srAba2iq8R}M5I_I{1Q0*~0R#|00D%b*VE;b>MI;3T5I_I{ z1Q0*~0R#|0009JY1la%Q0MU#90tg_000IagfB*srAb`LG2plZ_v~WoINnxRO=*I{D z<$?b*|1akL)7)Y88~eVy_h);)H~V{0mS=coE%-+?gzcrAZeP1yy|P>_Enm61SS^)PdX-Bj zi}Ph+1y|D7jn=wu*30uZmX@p6tG7?fHdm|)SJ*W%)>>M+wOm@dv$*JYvyFx*&o5W+ z$x|bzn}+3 z@@f6@)2}&p-AoKKlBev}67RQ@avk)OdHujrwPVMWt!qJE{)arbUGp4wt3=gW1mYT6;!ic{Z=4Txf;Yd%o5Z+%Pos1g7e zw(a<%Sq=iDRuiq3Zn$f0e^3v~>}RyiZf+EAo1e-@9lua~oZNuHvhuC8$oM^6N?fGe1>#ecHGcqpRybeyY=F|rxrn9)FYOlYp zbYBl=ryL|}b}$=?CY<6@*yc#Ir-7-YWgc`dJj1QU7>0xPAFT)`uRq39UeRw%X8SajU4?2 z-muKa$xrVmn1AhNJ#$j|m&!}JP?$OMr{r~xFn3>|^X+=@O5ME`E^)4FZ1&$hMi#l` z)9*#+jgj1IJ2S|Co)2%AKB<*k|E$;^=JaI*8KRl zqw3c{?td(&W!h`os+vsV1tX|KXDvv=74qfV9%d0gUW=v?Z_dx7_lfPKQ>^g&|J`4Q zhyVcu5I_I{1Q0*~0R#|00D+wrVE@01KmY**5I_I{1Q0*~0R#}(eF66WyI%t$KmY** z5I_I{1Q0*~0R#|0V5bGx|L?Rg*GB*W1Q0*~0R#|0009ILKw$R;*#GZ-4Tt~%1Q0*~ z0R#|0009ILKmdWA7GVFs)52UI0R#|0009ILKmY**5I_Kd-4|g0zxy>H0t661009IL zKmY**5I_I{1a?}0{r^r2bA1F5KmY**5I_I{1Q0*~0R(nmfc^jO*MJBRKmY**5I_I{ z1Q0*~0R#}(X#w{CJ1xxh5kLR|1Q0*~0R#|0009IL*nI)^|GQrUB0vBE1Q0*~0R#|0 z009ILKwzf@*#GaeFxN)_0R#|0009ILKmY**5I|t}1=#=Zehr8K0R#|0009ILKmY** z5I_KdofcsKzth589{~gqKmY**5I_I{1Q0*~f!!Bi|G)b+AOZvsKmY**5I_I{1Q0*~ z0R(nhz~BErSNL&Z;q;;A!Cyc4*#qu@efz&u_;K;I`S<4jsrt{=XZF3c_Zxfe&;GTU z-=8TdzrNG)M6cg@@KDt%6=myFp0Q#H%c&Wb{?KsE@uLr}-L76)u9lXsTwSb|%F(Xn z(#hg{Sy-YWY)@Y|TI;%5FVEjtTCQHN-aakcnueRyR9d>VTw1!bxajxsuj!eNJ$8Xe zuew-iujviZY8h*yJilDMx9oq|HX6O7;^|V^wCiF+cig&g2Vqn?&va%~?WLDyI%bfr z-PD_|^PZ@A!=DO2ism_N$;+`M|CGgsC+wEYAq*@M_%Oo3>0+hxN=H$(BS&VsXZta& znwF5a_5UgS`LSsH(|MuHm)~z2mbq$*x}I>?DAypEpiH4hdIe;}U+WZ9?fCJT?pytc zP1_Uhs!{X99{gPR;aKd0w(JBV5e4y=N`9Fm=W{d68*ws|FMp_NFTOa_t@abCSw^cR zlL-DT{JF6Ng7Z&F@Q;6>YDbUGY+dOG-w@uqQIq|MuGiuBiarr6Mc$<_D^F=FCj@Qjq+6#zUj- z)O62SldG527Goz0zZ%6D>yVA&haFsaxZdOqFaIO?3z|&D`o5~2Jv+0dL{h06o}qir z17Y_=9iAzCl$^}4$Btx^w5CQ%zpZq?_`Pts3oF-qWc2(`^S;GHl!N!e^D?y2hql^-Rx{OYURgX0;W%(FC*lW@qgWuY@OI z1mhDMqQ^FaA=;5S%eMqqtjhoFn$TTg1qkD33Y}=8<2}OkhUc?h9_nH>0G6)?Y2D;R zy0M{ZSFR}C7lSB0cT;c48ilVUk4$e}K2dGMvNqFOK8yyP-Z8&6{%2R@gm^Hv7W$Rz zMUv7(=JMeqe{ol~!bhwuqftXL!MgFiXfnaM>|`Pn zJfW6S?nFz~E?iK0FS#R2OkK$L7dM!($!8zO!Wph|BOiT&_%h$oiWS@S-y@aI(Llv= z>^0poa}KVg1!?Fo|RoExB%F zwQfX%%I+M7>0dN)F-RGN8FMCe$jKZpG*#{Tb*1xu$|~rzz4V1}r14QS!|}Cnq;Gy5 z(wD=*fR?ep;{*euE5g|QH_6_5AFL9+pC85|8|juG$gtdr3r_;NC--#z>5MXE)Pvvu zN56642mu5TKmY**5I_I{1Q0*~fk_l#|38UUB_{+BKmY**5I_I{1Q0*~0R*A~?Ej-4 z93g-J0tg_000IagfB*srATWsn?EfdRs^o+K0tg_000IagfB*srAb>zrfc<~egChhG zKmY**5I_I{1Q0*~0R$#dfc^g@R+XF(KmY**5I_I{1Q0*~0R#|;3b6l=dT@jQ0tg_0 z00IagfB*srAb`Lm3b6m5#Hx}L0tg_000IagfB*srAb + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+ + + + + +
+ + + + +
+ + + + + + +
+ + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + +
+ + + +
+ + +
+ + + + +
+ + + + +
+ +
+ + +
+ + + + +
+ + + + + + +
+ + + + + + +
+ + + + + +
+ + +
+ + + + +
+ + + + +
+ + + + + +
+ + + +
+ + + +
+ + + + + +
+ + + + + +
+ + + + + + +
+ + + + + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + + + +
+ + + + + + +
+ + + + + +
+ + + + + + + +
+ + + + +
+ + + + + + +
+ + +
+ + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + +
+ + + + +
+ + + + + + +
+ + + +
+ + + + + + +
+ + + + +
+ + + + + + + +
+ + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + +
+ + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + + +
+ + + + +
+ + +
+ + + + +
+ + + + +
+ + + +
+ + + + + + +
+ + + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + + + + +
+ + +
+ + +
+ + + + + + +
+ + + +
+ + + + + + +
+ + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + +
+ + + + +
+ + + + + +
+ + + + + +
+ + + + + + +
+ + + + + + + + +
+ + + + +
+ + + +
+ + +
+ + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + +
+ + + + +
+ + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + +
+ + + + + + +
+ + + + + + +
+ + + + +
+ + + +
+ + + + + +
+ + + + + + +
+ + + +
+ + + +
+ + + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + + + +
+ + + + + +
+ + + + +
+ + + +
+ + + +
+ + + +
+ + + + + +
+ + + + + + + +
+ + + + +
+ + + +
+ + + + +
+ + + +
+ + + +
+ + + +
+ + +
+
+ +
\ No newline at end of file