Package org.apache.openjpa.lib.meta
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:
CFMetaDataParser
-
-
Field Summary
-
Fields inherited from interface org.apache.openjpa.lib.meta.MetaDataSerializer
APPEND, COMPACT, PRETTY, VERBOSE
-
-
Constructor Summary
Constructors Constructor Description CFMetaDataSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getClassName(java.lang.String name)
Returns the given class name, stripping the package if it is not needed.protected java.lang.String
getPackage()
The default package for objects being serialized.protected java.lang.String
getPackage(java.lang.Object obj)
Return the package name of the given object, or null if not in a package.protected java.util.Map<java.lang.String,java.util.Collection<java.lang.Object>>
groupByPackage(java.util.Collection<java.lang.Object> objs)
Helper method to group objects by package.protected void
setPackage(java.lang.String pkg)
The default package for objects being serialized.-
Methods inherited from class org.apache.openjpa.lib.meta.XMLMetaDataSerializer
addAttribute, addComments, addComments, addText, currentBackupFile, endElement, getAttributes, getFileMap, getLog, getObjects, getSourceFile, isVerbose, prepareWrite, reset, serialize, serialize, serialize, serialize, serialize, serialize, serialize, setLog, startElement
-
-
-
-
Method Detail
-
getPackage
protected java.lang.String getPackage()
The default package for objects being serialized.
-
setPackage
protected void setPackage(java.lang.String pkg)
The default package for objects being serialized.
-
groupByPackage
protected java.util.Map<java.lang.String,java.util.Collection<java.lang.Object>> groupByPackage(java.util.Collection<java.lang.Object> objs) throws org.xml.sax.SAXException
Helper method to group objects by package.- Returns:
- mapping of package name to a collection of objects in that package
- Throws:
org.xml.sax.SAXException
-
getPackage
protected java.lang.String getPackage(java.lang.Object obj)
Return the package name of the given object, or null if not in a package. Used bygroupByPackage(java.util.Collection<java.lang.Object>)
. Returns null by default.
-
getClassName
protected java.lang.String getClassName(java.lang.String name)
Returns the given class name, stripping the package if it is not needed.
-
-