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
Helps serialize metadata objects to package and class elements.
- Author:
- Abe White
- See Also:
-
Field Summary
Fields inherited from interface org.apache.openjpa.lib.meta.MetaDataSerializer
APPEND, COMPACT, PRETTY, VERBOSE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getClassName
(String name) Returns the given class name, stripping the package if it is not needed.protected String
The default package for objects being serialized.protected String
getPackage
(Object obj) Return the package name of the given object, or null if not in a package.protected Map<String,
Collection<Object>> groupByPackage
(Collection<Object> objs) Helper method to group objects by package.protected void
setPackage
(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
-
Constructor Details
-
CFMetaDataSerializer
public CFMetaDataSerializer()
-
-
Method Details
-
getPackage
The default package for objects being serialized. -
setPackage
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
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
Returns the given class name, stripping the package if it is not needed.
-