docs: public static Object[] getCollectionArray(Object collectionOrArray)
      {
          Object[] result;
          if (collectionOrArray instanceof Collection)
          {
              result = ((Collection) collectionOrArray).toArray();
          }
          else if (collectionOrArray instanceof ManageableCollection)
          {
              Collection newCol = new ArrayList();
              CollectionUtils.addAll(newCol, ((ManageableCollection) collectionOrArray).ojbIterator());
              result = newCol.toArray();
          }
          else if (collectionOrArray.getClass().isArray())
          {
              result = (Object[]) collectionOrArray;
          }
          else
          {
              throw new OJBRuntimeException( "Given object collection of type '"
                      + (collectionOrArray != null ? collectionOrArray.getClass().toString() : "null")
                  + "' can not be managed by OJB. Use Array, Collection or ManageableCollection instead!");
          }
          return result;
      }