org.kuali.rice.devtools.jpa.eclipselink.conv.ojb
Class OjbUtil

java.lang.Object
  extended by org.kuali.rice.devtools.jpa.eclipselink.conv.ojb.OjbUtil

public final class OjbUtil
extends Object


Method Summary
static org.apache.ojb.broker.metadata.ClassDescriptor findClassDescriptor(String clazz, Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
           
static org.apache.ojb.broker.metadata.CollectionDescriptor findCollectionDescriptor(String clazz, String fieldName, Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
           
static org.apache.ojb.broker.metadata.FieldDescriptor findFieldDescriptor(String clazz, String fieldName, Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
           
static org.apache.ojb.broker.metadata.ObjectReferenceDescriptor findObjectReferenceDescriptor(String clazz, String fieldName, Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
           
static Collection<org.apache.ojb.broker.metadata.DescriptorRepository> getDescriptorRepositories(Collection<String> ojbFiles)
           
static Collection<String> getMappedTree(String rootClass, Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
          Starting with a root class, get the entire tree of mapped objects including collections and references.
static Collection<String> getPrimaryKeyNames(String clazz, Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
           
static Set<String> getSuperClasses(String clazzName, String packagePrefixToStop)
          Gets all the super classes & stopping when the super class matches a package prefix
static boolean isMappedColumn(String clazz, String fieldName, Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
           
static Set<String> mappedClasses(Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptors)
          Gets all the mapped classes
static org.apache.ojb.broker.metadata.DescriptorRepository readDescriptorRepository(String filename)
          Parses a repository file and populates an ojb datastructure representing the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMappedTree

public static Collection<String> getMappedTree(String rootClass,
                                               Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)
Starting with a root class, get the entire tree of mapped objects including collections and references. Cycles are correctly handled.

Parameters:
rootClass - the top level class to start with.
Returns:
a collection of classes to process

isMappedColumn

public static boolean isMappedColumn(String clazz,
                                     String fieldName,
                                     Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)

getDescriptorRepositories

public static Collection<org.apache.ojb.broker.metadata.DescriptorRepository> getDescriptorRepositories(Collection<String> ojbFiles)
                                                                                                 throws Exception
Throws:
Exception

findClassDescriptor

public static org.apache.ojb.broker.metadata.ClassDescriptor findClassDescriptor(String clazz,
                                                                                 Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)

findFieldDescriptor

public static org.apache.ojb.broker.metadata.FieldDescriptor findFieldDescriptor(String clazz,
                                                                                 String fieldName,
                                                                                 Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)

findObjectReferenceDescriptor

public static org.apache.ojb.broker.metadata.ObjectReferenceDescriptor findObjectReferenceDescriptor(String clazz,
                                                                                                     String fieldName,
                                                                                                     Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)

findCollectionDescriptor

public static org.apache.ojb.broker.metadata.CollectionDescriptor findCollectionDescriptor(String clazz,
                                                                                           String fieldName,
                                                                                           Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)

getPrimaryKeyNames

public static Collection<String> getPrimaryKeyNames(String clazz,
                                                    Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptorRepositories)

readDescriptorRepository

public static org.apache.ojb.broker.metadata.DescriptorRepository readDescriptorRepository(String filename)
Parses a repository file and populates an ojb datastructure representing the file.

Parameters:
filename - the file to parse
Returns:
a DescriptorRepository or null

mappedClasses

public static Set<String> mappedClasses(Collection<org.apache.ojb.broker.metadata.DescriptorRepository> descriptors)
                                 throws Exception
Gets all the mapped classes

Throws:
Exception

getSuperClasses

public static Set<String> getSuperClasses(String clazzName,
                                          String packagePrefixToStop)
                                   throws Exception
Gets all the super classes & stopping when the super class matches a package prefix

Throws:
Exception


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.