@SuppressWarnings("unchecked") @Nullable public Class<? extends Collection> getCollectionType() { if (isCollection()) { return getConcreteCollectionType(getType()); } else { return null; } }
private boolean isPolymorphic(MappedProperty<?> mappedProperty) { if (mappedProperty.isCollection() || mappedProperty.isMap()) { return configuration.isPolymorphic(mappedProperty.getComponentType()); } else { return configuration.isPolymorphic(mappedProperty.getType()); } }
if (!property.isList()) { Class<?> type = property.getType(); if (property.isCollection() || property.isMap()) { type = property.getComponentType();
/** * Create a new Query-by-example query * * @param session * @param entity */ @SuppressWarnings("unchecked") public ExampleQuery(Configuration configuration, Session session, T entity) { this.session = Assert.notNull(session, "session"); this.entityPath = (PathBuilder) pathBuilderFactory.create(entity.getClass()); this.conditions = new BooleanBuilder(); BeanMap beanMap = new BeanMap(entity); MappedClass mappedClass = configuration.getMappedClass(entity.getClass()); for (MappedPath mappedPath : mappedClass.getProperties()) { MappedProperty<?> property = mappedPath.getMappedProperty(); Object value = property.getValue(beanMap); if (value != null // date/time values are skipped && !DATE_TIME_TYPES.contains(value.getClass()) // collection values are skipped && !property.isCollection() // map values are skipped && !property.isMap() // blank nodes are skipped && !(value instanceof BID)) { Expression<Object> propertyPath = (Expression) entityPath.get(property.getName(), property.getType()); conditions.and(ExpressionUtils.eqConst(propertyPath, value)); } } }
if (mappedProperty.isAnyResource()) { property = new RDFProperty(puid); } else if (mappedPath.isReference() || mappedProperty.isCollection()) { property = new ObjectProperty(puid); } else { if (mappedProperty.isCollection()) { if (mappedProperty.isList()) { if (property.getRange().isEmpty()) {
} else if (property.isCollection()) { for (Object o : (Collection<?>) object) { NODE value = toRDFValue(o, context);
if (mappedProperty.isCollection()) { convertedValue = convertCollection(propertyPath, values, context);