if (collectionClass.equals(Vector.class)) {
return new ManageableVector();
}
if (collectionClass.equals(HashSet.class)) {
return new ManageableSet();
}
if (collectionClass.equals(Collection.class) || collectionClass.equals(List.class)) {
return new ManageableArrayList();
}
if (collectionClass.equals(Set.class)) {
return new ManageableSet();
}
Object collection = collectionClass.newInstance();
if (!(collection instanceof ManageableCollection)) {
throw new JcrMappingException("Unsupported collection type :"