}
else if (relation.getType().equals(ForeignKey.ONE_TO_MANY)
|| relation.getType().equals(ForeignKey.MANY_TO_MANY))
{
ProxyCollection proxyCollection = null;
if (relation.getPropertyType().isAssignableFrom(Set.class))
{
proxyCollection = new ProxySet(pd, relation);
}
else if (relation.getPropertyType().isAssignableFrom(List.class))
{
proxyCollection = new ProxyList(pd, relation);
}
else if (relation.getPropertyType().isAssignableFrom(Map.class))
{
proxyCollection = new ProxyMap(pd, relation);
}
proxyCollection.setOwner(entity);
proxyCollection.setRelationsMap(relationsMap);
PropertyAccessorHelper.set(entity, relation.getProperty(), proxyCollection);
}
}