@@ -33,10 +33,10 @@ const MISSING_PARENT_CLASSES = [
3333] ;
3434
3535const PARENT_FIELDS = [
36- { name : 'id ' , type : 'String' } ,
37- { name : 'typ ' , type : 'Typ' } ,
38- { name : 'version ' , type : 'String' } ,
39- { name : 'zusatzAttribute' , type : 'List<ZusatzAttribut>' }
36+ { name : '_id ' , type : 'String' , final : false } ,
37+ { name : '_typ ' , type : 'Typ' , final : true } ,
38+ { name : '_version ' , type : 'String' , final : true } ,
39+ { name : 'zusatzAttribute' , type : 'List<ZusatzAttribut>' , final : false }
4040] ;
4141
4242const CUSTOM_JAVA_OPTIONS = {
@@ -463,7 +463,7 @@ function getClassFields(classBody) {
463463 */
464464function removeParentClassFields ( fieldList ) {
465465 const hasOwnVersionProperty = fieldList . slice ( 0 , PARENT_FIELDS . length ) . findIndex ( value => value . name === 'version' ) < 0 ;
466- let fieldFilter = PARENT_FIELDS . map ( value => value . name ) ;
466+ let fieldFilter = PARENT_FIELDS . map ( value => value . name . replace ( '_' , '' ) ) ;
467467 if ( hasOwnVersionProperty ) {
468468 fieldFilter = fieldFilter . filter ( value => value !== 'version' ) ;
469469 }
@@ -612,7 +612,7 @@ function getImports(fieldList, fileData, fileMap, hasParent) {
612612 }
613613 if ( hasParent ) {
614614 for ( const parentField of PARENT_FIELDS ) {
615- if ( parentField . name !== 'typ' && parentField . name !== 'version' ) {
615+ if ( ! parentField . final ) {
616616 addImports ( parentField . type , fileMap , importList , classPath ) ;
617617 }
618618 }
@@ -673,7 +673,7 @@ function getBuilderClass(classHead, fieldList, fileData, hasParent) {
673673 builderConstructor . push ( '}' ) ;
674674 if ( hasParent ) {
675675 for ( const parentField of PARENT_FIELDS ) {
676- if ( parentField . name !== 'typ' && parentField . name !== 'version' ) {
676+ if ( ! parentField . final ) {
677677 builderMethods . push ( '' ) ;
678678 builderMethods . push ( overwriteParentSetter ( parentField , builderName ) ) ;
679679 }
0 commit comments