List of usage examples for org.springframework.data.mapping.context PersistentEntities getManagedTypes
public Streamable<TypeInformation<?>> getManagedTypes()
From source file:org.springframework.data.rest.webmvc.json.PersistentEntityToJsonSchemaConverter.java
/** * Creates a new {@link PersistentEntityToJsonSchemaConverter} for the given {@link PersistentEntities} and * {@link ResourceMappings}./*from w w w.j a va 2 s . co m*/ * * @param entities must not be {@literal null}. * @param mappings must not be {@literal null}. * @param accessor must not be {@literal null}. * @param objectMapper must not be {@literal null}. * @param configuration must not be {@literal null}. */ public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, Associations associations, MessageSourceAccessor accessor, ObjectMapper objectMapper, RepositoryRestConfiguration configuration, ValueTypeSchemaPropertyCustomizerFactory customizerFactory) { Assert.notNull(entities, "PersistentEntities must not be null!"); Assert.notNull(associations, "AssociationLinks must not be null!"); Assert.notNull(accessor, "MessageSourceAccessor must not be null!"); Assert.notNull(objectMapper, "ObjectMapper must not be null!"); Assert.notNull(configuration, "RepositoryRestConfiguration must not be null!"); this.entities = entities; this.associations = associations; this.accessor = accessor; this.objectMapper = objectMapper; this.configuration = configuration; this.customizerFactory = customizerFactory; for (TypeInformation<?> domainType : entities.getManagedTypes()) { convertiblePairs.add(new ConvertiblePair(domainType.getType(), JsonSchema.class)); } }