Java Doc for XMLPersistenceMetaDataSerializer.java in  » Database-ORM » openjpa » org » apache » openjpa » persistence » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » openjpa » org.apache.openjpa.persistence 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.openjpa.lib.meta.CFMetaDataSerializer
   org.apache.openjpa.persistence.XMLPersistenceMetaDataSerializer

All known Subclasses:   org.apache.openjpa.persistence.jdbc.XMLPersistenceMappingSerializer,
XMLPersistenceMetaDataSerializer
public class XMLPersistenceMetaDataSerializer extends CFMetaDataSerializer implements PersistenceMetaDataFactory.Serializer(Code)
Serializes persistence metadata back to XML. This class processes all object level tags that are store-agnostic. However, it provides hooks for the subclasses to include store-specific tags to be serialized both at <entity-mappings> and <entity> level.
since:
   0.4.0
author:
   Steve Kim

Inner Class :protected class SerializationComparator extends MetaDataInheritanceComparator

Field Summary
final protected static  intTYPE_CLASS_QUERIES
    
final protected static  intTYPE_CLASS_SEQS
    
final protected static  intTYPE_META
    
final protected static  intTYPE_QUERY
    
final protected static  intTYPE_SEQ
    

Constructor Summary
public  XMLPersistenceMetaDataSerializer(OpenJPAConfiguration conf)
     Constructor.

Method Summary
public  voidaddAll(MetaDataRepository repos)
     Add all components in the given repository to the set to be serialized.
protected  voidaddClassMappingAttributes(ClassMetaData mapping)
     Add mapping attributes for the given class.
protected  voidaddFieldMappingAttributes(FieldMetaData fmd, FieldMetaData orig)
     Add mapping attributes for the given field.
public  voidaddMetaData(ClassMetaData meta)
     Add a class meta data to the set to be serialized.
public  voidaddQueryMetaData(QueryMetaData meta)
     Add a query meta data to the set to be serialized.
public  voidaddSequenceMetaData(SequenceMetaData meta)
     Add a sequence meta data to the set to be serialized.
protected  voidaddStrategyMappingAttributes(FieldMetaData fmd)
     Set mapping attributes for strategy.
protected  voidaddSystemMappingElements(Collection toSerialize)
     Add system-level mapping elements to be serialized.
public  voidclear()
     Clear the set of metadatas to be serialized.
public  OpenJPAConfigurationgetConfiguration()
     Configuration.
public  intgetMode()
     The serialization mode according to the expected document type.
protected  CollectiongetObjects()
    
protected  StringgetPackage(Object obj)
    
public  booleangetSerializeAnnotations()
     Whether to serialize content originally specified in annotations.
protected  FilegetSourceFile(Object obj)
     Override to not overwrite annotations.
protected  PersistenceStrategygetStrategy(FieldMetaData fmd)
     Return the serialized strategy name.
protected  booleanisMappingMode()
     Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .
protected  booleanisMappingMode(ClassMetaData meta)
     Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .
protected  booleanisMappingMode(ValueMetaData vmd)
     Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .
protected  booleanisMetaDataMode()
     Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .
protected  booleanisQueryMode()
     Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .
protected  SerializationComparatornewSerializationComparator()
     Create a new comparator for ordering objects that are to be serialized.
public  booleanremoveAll(MetaDataRepository repos)
     Remove all the components in the given repository from the set to be serialized.
public  booleanremoveMetaData(ClassMetaData meta)
     Remove a metadata from the set to be serialized.
public  booleanremoveQueryMetaData(QueryMetaData meta)
     Remove a query metadata from the set to be serialized.
public  booleanremoveSequenceMetaData(SequenceMetaData meta)
     Remove a sequence metadata from the set to be serialized.
protected  voidserialize(Collection objects)
    
protected  booleanserializeAttributeOverride(FieldMetaData fmd, FieldMetaData orig)
     Always returns false by default.
protected  voidserializeAttributeOverrideMappingContent(FieldMetaData fmd, FieldMetaData orig)
     Serialize attribute override mapping content.
protected  voidserializeClass(ClassMetaData meta, boolean access)
     Serialize class metadata.
protected  voidserializeClassMappingContent(ClassMetaData mapping)
     Serialize class mapping content.
protected  voidserializeFieldMappingContent(FieldMetaData fmd, PersistenceStrategy strategy)
     Serialize field mapping content; this will be called before XMLPersistenceMetaDataSerializer.serializeValueMappingContent .
protected  voidserializeInheritanceContent(ClassMetaData mapping)
     Serialize inheritance content.
protected  voidserializeQueryMappings(ClassMetaData meta)
     Serialize query mappings.
protected  voidserializeSequence(SequenceMetaData meta)
     Serialize sequence metadata.
protected  voidserializeSystemMappingElement(Object obj)
     Serialize unknown mapping element at system level.
public  voidsetMode(int mode)
     The serialization mode according to the expected document type.
public  voidsetMode(int mode, boolean on)
     The serialization mode according to the expected document type.
public  voidsetSerializeAnnotations(boolean annos)
     Whether to serialize content originally specified in annotations.
protected  inttype(Object o)
     Return the type constant for the given object based on its runtime class.

Field Detail
TYPE_CLASS_QUERIES
final protected static int TYPE_CLASS_QUERIES(Code)



TYPE_CLASS_SEQS
final protected static int TYPE_CLASS_SEQS(Code)



TYPE_META
final protected static int TYPE_META(Code)



TYPE_QUERY
final protected static int TYPE_QUERY(Code)



TYPE_SEQ
final protected static int TYPE_SEQ(Code)




Constructor Detail
XMLPersistenceMetaDataSerializer
public XMLPersistenceMetaDataSerializer(OpenJPAConfiguration conf)(Code)
Constructor. Supply configuration.




Method Detail
addAll
public void addAll(MetaDataRepository repos)(Code)
Add all components in the given repository to the set to be serialized.



addClassMappingAttributes
protected void addClassMappingAttributes(ClassMetaData mapping) throws SAXException(Code)
Add mapping attributes for the given class. Does nothing by default



addFieldMappingAttributes
protected void addFieldMappingAttributes(FieldMetaData fmd, FieldMetaData orig) throws SAXException(Code)
Add mapping attributes for the given field. Does nothing by default.



addMetaData
public void addMetaData(ClassMetaData meta)(Code)
Add a class meta data to the set to be serialized.



addQueryMetaData
public void addQueryMetaData(QueryMetaData meta)(Code)
Add a query meta data to the set to be serialized.



addSequenceMetaData
public void addSequenceMetaData(SequenceMetaData meta)(Code)
Add a sequence meta data to the set to be serialized.



addStrategyMappingAttributes
protected void addStrategyMappingAttributes(FieldMetaData fmd) throws SAXException(Code)
Set mapping attributes for strategy. Sets mapped-by by default.



addSystemMappingElements
protected void addSystemMappingElements(Collection toSerialize)(Code)
Add system-level mapping elements to be serialized. Does nothing by default.



clear
public void clear()(Code)
Clear the set of metadatas to be serialized.



getConfiguration
public OpenJPAConfiguration getConfiguration()(Code)
Configuration.



getMode
public int getMode()(Code)
The serialization mode according to the expected document type. The mode constants act as bit flags, and therefore can be combined.



getObjects
protected Collection getObjects()(Code)



getPackage
protected String getPackage(Object obj)(Code)



getSerializeAnnotations
public boolean getSerializeAnnotations()(Code)
Whether to serialize content originally specified in annotations. Defaults to true.



getSourceFile
protected File getSourceFile(Object obj)(Code)
Override to not overwrite annotations.



getStrategy
protected PersistenceStrategy getStrategy(FieldMetaData fmd)(Code)
Return the serialized strategy name.



isMappingMode
protected boolean isMappingMode()(Code)
Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .



isMappingMode
protected boolean isMappingMode(ClassMetaData meta)(Code)
Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode . Takes into account whether mapping information is loaded for the given instance.



isMappingMode
protected boolean isMappingMode(ValueMetaData vmd)(Code)
Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode . Takes into account whether mapping information is loaded for the given instance.



isMetaDataMode
protected boolean isMetaDataMode()(Code)
Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .



isQueryMode
protected boolean isQueryMode()(Code)
Convenience method for interpreting XMLPersistenceMetaDataSerializer.getMode .



newSerializationComparator
protected SerializationComparator newSerializationComparator()(Code)
Create a new comparator for ordering objects that are to be serialized.



removeAll
public boolean removeAll(MetaDataRepository repos)(Code)
Remove all the components in the given repository from the set to be serialized. true if any components removed, false if none in set



removeMetaData
public boolean removeMetaData(ClassMetaData meta)(Code)
Remove a metadata from the set to be serialized. true if removed, false if not in set



removeQueryMetaData
public boolean removeQueryMetaData(QueryMetaData meta)(Code)
Remove a query metadata from the set to be serialized. true if removed, false if not in set



removeSequenceMetaData
public boolean removeSequenceMetaData(SequenceMetaData meta)(Code)
Remove a sequence metadata from the set to be serialized. true if removed, false if not in set



serialize
protected void serialize(Collection objects) throws SAXException(Code)



serializeAttributeOverride
protected boolean serializeAttributeOverride(FieldMetaData fmd, FieldMetaData orig)(Code)
Always returns false by default.



serializeAttributeOverrideMappingContent
protected void serializeAttributeOverrideMappingContent(FieldMetaData fmd, FieldMetaData orig) throws SAXException(Code)
Serialize attribute override mapping content. Does nothing by default,



serializeClass
protected void serializeClass(ClassMetaData meta, boolean access) throws SAXException(Code)
Serialize class metadata.



serializeClassMappingContent
protected void serializeClassMappingContent(ClassMetaData mapping) throws SAXException(Code)
Serialize class mapping content. Does nothing by default.



serializeFieldMappingContent
protected void serializeFieldMappingContent(FieldMetaData fmd, PersistenceStrategy strategy) throws SAXException(Code)
Serialize field mapping content; this will be called before XMLPersistenceMetaDataSerializer.serializeValueMappingContent . Does nothing by default.



serializeInheritanceContent
protected void serializeInheritanceContent(ClassMetaData mapping) throws SAXException(Code)
Serialize inheritance content. Does nothing by default.



serializeQueryMappings
protected void serializeQueryMappings(ClassMetaData meta) throws SAXException(Code)
Serialize query mappings. Does nothing by default.



serializeSequence
protected void serializeSequence(SequenceMetaData meta) throws SAXException(Code)
Serialize sequence metadata.



serializeSystemMappingElement
protected void serializeSystemMappingElement(Object obj) throws SAXException(Code)
Serialize unknown mapping element at system level.



setMode
public void setMode(int mode)(Code)
The serialization mode according to the expected document type. The mode constants act as bit flags, and therefore can be combined.



setMode
public void setMode(int mode, boolean on)(Code)
The serialization mode according to the expected document type.



setSerializeAnnotations
public void setSerializeAnnotations(boolean annos)(Code)
Whether to serialize content originally specified in annotations. Defaults to true.



type
protected int type(Object o)(Code)
Return the type constant for the given object based on its runtime class. If the runtime class does not correspond to any of the known types then returns -1. This can happen for tags that are not handled at this store-agnostic level.



Methods inherited from org.apache.openjpa.lib.meta.CFMetaDataSerializer
protected String getClassName(String name)(Code)(Java Doc)
protected String getPackage()(Code)(Java Doc)
protected String getPackage(Object obj)(Code)(Java Doc)
protected Map groupByPackage(Collection objs) throws SAXException(Code)(Java Doc)
protected void setPackage(String pkg)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.