List of usage examples for org.springframework.data.mapping PersistentProperty isArray
boolean isArray();
From source file:org.lightadmin.core.web.support.DynamicPersistentEntityResourceProcessor.java
private List<PersistentEntityWrapper> associatedPersistentEntities(Association association, Object instance) { PersistentProperty persistentProperty = association.getInverse(); Object associationValue = beanWrapper(instance).getPropertyValue(persistentProperty.getName()); if (associationValue == null) { return null; }/* w w w . ja v a 2 s .c o m*/ List<PersistentEntityWrapper> result = newArrayList(); if (persistentProperty.isArray()) { for (Object item : (Object[]) associationValue) { result.add(associatedPersistentEntity(persistentProperty, item)); } return result; } for (Object item : (Iterable<Object>) associationValue) { result.add(associatedPersistentEntity(persistentProperty, item)); } return result; }