if(mapping!=null && mapping.getKey().equals(propertyNamePrefix)) {
// a valid property for that map ! is property key an integer ?
try {
int index = Integer.parseInt(mapping.getValue());
// notice no loader is added if property type is boolean and collection isn't expected to contain booleans
CollectionAccessByIndexProperty valueInCollectionProperty = new CollectionAccessByIndexProperty(property, index, null);
String value = rootVertex.getProperty(propertyName).toString();
// Mind you, BooleanLiteralTransformer will load any non boolean value as false boolean, so we can't use it there
if(value.equalsIgnoreCase(Boolean.TRUE.toString()) || value.equalsIgnoreCase(Boolean.FALSE.toString())) {
// collection contains only boolean values, so all is ok
if(valueInCollectionProperty.getType().equals(Boolean.class)) {
returned.put(index, new LoadValueInProperty(valueInCollectionProperty));
} else {
// collection doesn't contain boolean values, but value is a pure boolean ? then it's an indexing property
}
} else {