Class CFMetaDataSerializer

java.lang.Object
org.apache.openjpa.lib.meta.XMLMetaDataSerializer
org.apache.openjpa.lib.meta.CFMetaDataSerializer
All Implemented Interfaces:
MetaDataSerializer
Direct Known Subclasses:
XMLPersistenceMetaDataSerializer

public abstract class CFMetaDataSerializer extends XMLMetaDataSerializer
Helps serialize metadata objects to package and class elements.
Author:
Abe White
See Also:
  • Constructor Details

    • CFMetaDataSerializer

      public CFMetaDataSerializer()
  • Method Details

    • getPackage

      protected String getPackage()
      The default package for objects being serialized.
    • setPackage

      protected void setPackage(String pkg)
      The default package for objects being serialized.
    • groupByPackage

      protected Map<String,Collection<Object>> groupByPackage(Collection<Object> objs) throws SAXException
      Helper method to group objects by package.
      Returns:
      mapping of package name to a collection of objects in that package
      Throws:
      SAXException
    • getPackage

      protected String getPackage(Object obj)
      Return the package name of the given object, or null if not in a package. Used by groupByPackage(java.util.Collection<java.lang.Object>). Returns null by default.
    • getClassName

      protected String getClassName(String name)
      Returns the given class name, stripping the package if it is not needed.