簡體   English   中英

vdm 生成的沒有 getter 的類

[英]vdm generated class without getters

使用 vdm 生成 Odata 類時,實體類沒有為每個字段定義 getter。 示例:getBpdid()、getChangeFlag() 等。 缺失。 我正在使用 S4 HANA SDK 2.9.1 和 Spring Boot 2.1.3

這是生成器的配置:

<configuration>
   <inputDirectory>${project.basedir}/edmx</inputDirectory>
   <outputDirectory>${project.build.directory}/vdm</outputDirectory>
   <deleteOutputDirectory>true</deleteOutputDirectory>
   <packageName>com.sap.scenario.vdm</packageName>
   <nameSource>NAME</nameSource>
   <includeFunctionImports>
      <params>none</params>
   </includeFunctionImports>
   <includeEntitySets>
      <params>ScenarioSet</params>
   </includeEntitySets>
</configuration>

以及實體類型的 EDMX 定義:

</EntityType>
<EntityType Name="Scenario" sap:content-version="1">
<Key>
<PropertyRef Name="Bpdid"/>
</Key>
<Property Name="Bpdid" Type="Edm.String" Nullable="false" MaxLength="40" sap:unicode="false" sap:label="Text, 40 Characters Long" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="ChangeFlag" Type="Edm.String" MaxLength="1" sap:unicode="false" sap:label="Change flag for an automate" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>
<Property Name="BpdUrl" Type="Edm.String" Nullable="false" MaxLength="1024" sap:unicode="false" sap:label="String" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="CountryName" Type="Edm.String" Nullable="false" MaxLength="15" sap:unicode="false" sap:label="CountryName" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Bpdsid" Type="Edm.String" Nullable="false" MaxLength="255" sap:unicode="false" sap:label="process name" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="UpgradeSel" Type="Edm.Boolean" Nullable="false" sap:unicode="false" sap:label="Indicator" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>
<Property Name="Bpdtype" Type="Edm.String" MaxLength="50" sap:unicode="false" sap:label="Explanation" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>
<Property Name="Country" Type="Edm.String" MaxLength="50" sap:unicode="false" sap:label="c" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Status" Type="Edm.String" MaxLength="1" sap:unicode="false" sap:label="Char01" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="App" Type="Edm.String" MaxLength="20" sap:unicode="false" sap:label="Description" sap:updatable="false" sap:sortable="false"/>
<Property Name="Bpdname" Type="Edm.String" Nullable="false" MaxLength="255" sap:unicode="false" sap:label="Text" sap:updatable="false" sap:sortable="false"/>
<Property Name="Changed" Type="Edm.String" MaxLength="1" sap:unicode="false" sap:label="Indicator" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Uname" Type="Edm.String" MaxLength="80" sap:unicode="false" sap:label="User name" sap:creatable="false" sap:updatable="false" sap:filterable="false"/>
<Property Name="Createstamp" Type="Edm.DateTime" Precision="0" sap:unicode="false" sap:label="Time Stamp" sap:creatable="false" sap:updatable="false" sap:filterable="false"/>
<Property Name="LockName" Type="Edm.String" MaxLength="80" sap:unicode="false" sap:label="User name" sap:creatable="false" sap:updatable="false"/>
<Property Name="ChangeTime" Type="Edm.DateTime" Precision="0" sap:unicode="false" sap:label="Time Stamp" sap:creatable="false" sap:updatable="false"/>
<Property Name="rel" Type="Edm.String" MaxLength="10" sap:unicode="false" sap:label="SAP Release" sap:creatable="false" sap:updatable="false"/>
<NavigationProperty Name="options" Relationship="e2eie_ic_mngcldsol.options" FromRole="FromRole_options" ToRole="ToRole_options"/>
<NavigationProperty Name="ProcedureSet" Relationship="e2eie_ic_mngcldsol.Scenario_Procedure" FromRole="FromRole_Scenario_Procedure" ToRole="ToRole_Scenario_Procedure"/>
</EntityType>

為了能夠在Spring Test Tool中使用Lombok,我需要安裝庫。 這里描述的問題相同: Lombok沒有使用STS

我有同樣的問題“getter not generated”事件,雖然我在我的日食氧氣中安裝了lombok,根據鏈接:

我還根據教程將lombok依賴項添加到我的項目pom文件中:

知道為什么生成的源中仍然缺少getter?

最好的叢

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM