/** * Build the Document mapping recursively with the given prefix relative to the root of the document. */ public void docStoreMapping(final DocMappingBuilder mapping, final String prefix) { if (prefix != null && idProperty != null) { // id property not included in the idProperty.docStoreMapping(mapping, prefix); } if (inheritInfo != null) { String discCol = inheritInfo.getDiscriminatorColumn(); if (Types.VARCHAR == inheritInfo.getDiscriminatorType()) { mapping.add(new DocPropertyMapping(discCol, DocPropertyType.ENUM)); } else { mapping.add(new DocPropertyMapping(discCol, DocPropertyType.INTEGER)); } } for (BeanProperty prop : propertiesNonTransient) { prop.docStoreMapping(mapping, prefix); } if (inheritInfo != null) { inheritInfo.visitChildren(inheritInfo1 -> { for (BeanProperty localProperty : inheritInfo1.localProperties()) { localProperty.docStoreMapping(mapping, prefix); } }); } }
/** * Build the Document mapping recursively with the given prefix relative to the root of the document. */ public void docStoreMapping(final DocMappingBuilder mapping, final String prefix) { if (prefix != null && idProperty != null) { // id property not included in the idProperty.docStoreMapping(mapping, prefix); } if (inheritInfo != null) { String discCol = inheritInfo.getDiscriminatorColumn(); if (Types.VARCHAR == inheritInfo.getDiscriminatorType()) { mapping.add(new DocPropertyMapping(discCol, DocPropertyType.ENUM)); } else { mapping.add(new DocPropertyMapping(discCol, DocPropertyType.INTEGER)); } } for (BeanProperty prop : propertiesNonTransient) { prop.docStoreMapping(mapping, prefix); } if (inheritInfo != null) { inheritInfo.visitChildren(inheritInfo1 -> { for (BeanProperty localProperty : inheritInfo1.localProperties()) { localProperty.docStoreMapping(mapping, prefix); } }); } }