Java Doc for AnnotationPersistenceMetaDataSerializer.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) 


java.lang.Object
   org.apache.openjpa.persistence.AnnotationPersistenceMetaDataSerializer

All known Subclasses:   org.apache.openjpa.persistence.jdbc.AnnotationPersistenceMappingSerializer,
AnnotationPersistenceMetaDataSerializer
public class AnnotationPersistenceMetaDataSerializer implements PersistenceMetaDataFactory.Serializer(Code)
Serializes persistence metadata as annotations. 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:
   1.0.0
author:
   Steve Kim
author:
   Gokhan Ergul

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  AnnotationPersistenceMetaDataSerializer(OpenJPAConfiguration conf)
     Constructor.

Method Summary
public  voidaddAll(MetaDataRepository repos)
     Add all components in the given repository to the set to be serialized.
protected  voidaddAnnotation(AnnotationBuilder ab, Object meta)
    
protected  voidaddAnnotation(AnnotationBuilder ab, ClassMetaData meta)
     Add an annotation builder to list of builders for the specified class metadata.
protected  voidaddAnnotation(AnnotationBuilder ab, FieldMetaData meta)
     Add an annotation builder to list of builders for the specified field metadata.
protected  voidaddAnnotation(AnnotationBuilder ab, SequenceMetaData meta)
     Add an annotation builder to list of builders for the specified sequence metadata.
protected  voidaddAnnotation(AnnotationBuilder ab, QueryMetaData meta)
     Add an annotation builder to list of builders for the specified query metadata.
protected  AnnotationBuilderaddAnnotation(Class<? extends Annotation> annType, ClassMetaData meta)
     Creates an an annotation builder for the specified class metadata and adds it to list of builders.
protected  AnnotationBuilderaddAnnotation(Class<? extends Annotation> annType, FieldMetaData meta)
     Creates an an annotation builder for the specified class metadata and adds it to list of builders.
protected  AnnotationBuilderaddAnnotation(Class<? extends Annotation> annType, SequenceMetaData meta)
     Creates an an annotation builder for the specified class metadata and adds it to list of builders.
protected  AnnotationBuilderaddAnnotation(Class<? extends Annotation> annType, QueryMetaData meta)
     Creates an an annotation builder for the specified class metadata and adds it to list of builders.
protected  voidaddClassMappingAnnotations(ClassMetaData mapping)
     Add mapping attributes for the given class.
protected  voidaddFieldMappingAttributes(FieldMetaData fmd, FieldMetaData orig, AnnotationBuilder ab)
     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, AnnotationBuilder ab)
     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  LoggetLog()
     The log to write to.
public  intgetMode()
     The serialization mode according to the expected document type.
protected  CollectiongetObjects()
    
protected  PersistenceStrategygetStrategy(FieldMetaData fmd)
     Return the serialized strategy name.
protected  booleanisMappingMode()
     Convenience method for interpreting AnnotationPersistenceMetaDataSerializer.getMode .
protected  booleanisMappingMode(ClassMetaData meta)
     Convenience method for interpreting AnnotationPersistenceMetaDataSerializer.getMode .
protected  booleanisMappingMode(ValueMetaData vmd)
     Convenience method for interpreting AnnotationPersistenceMetaDataSerializer.getMode .
protected  booleanisMetaDataMode()
     Convenience method for interpreting AnnotationPersistenceMetaDataSerializer.getMode .
protected  booleanisQueryMode()
     Convenience method for interpreting AnnotationPersistenceMetaDataSerializer.getMode .
protected  AnnotationBuildernewAnnotationBuilder(Class<? extends Annotation> annType)
     Creates a new annotation builder for the specified annotation type.
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)
    
public  voidserialize(Map output, int flags)
    
public  voidserialize(File file, int flags)
    
public  voidserialize(Writer out, int flags)
    
public  voidserialize(int flags)
    
protected  booleanserializeAttributeOverride(FieldMetaData fmd, FieldMetaData orig)
     Always returns false by default.
protected  voidserializeAttributeOverrideMappingContent(FieldMetaData fmd, FieldMetaData orig, AnnotationBuilder ab)
     Serialize attribute override mapping content.
protected  voidserializeClass(ClassMetaData meta)
     Serialize class metadata.
protected  voidserializeClassMappingContent(ClassMetaData mapping)
     Serialize class mapping content.
protected  voidserializeFieldMappingContent(FieldMetaData fmd, PersistenceStrategy strategy, AnnotationBuilder ab)
     Serialize field mapping content; this will be called before AnnotationPersistenceMetaDataSerializer.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  voidsetLog(Log log)
     The log to write to.
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.
protected  inttype(Object o)
     Return the type constant for the given object based on its runtime class.
protected  voidwriteAnnotations(Object meta, List<AnnotationBuilder> builders, Map output)
    

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
AnnotationPersistenceMetaDataSerializer
public AnnotationPersistenceMetaDataSerializer(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.



addAnnotation
protected void addAnnotation(AnnotationBuilder ab, Object meta)(Code)



addAnnotation
protected void addAnnotation(AnnotationBuilder ab, ClassMetaData meta)(Code)
Add an annotation builder to list of builders for the specified class metadata.



addAnnotation
protected void addAnnotation(AnnotationBuilder ab, FieldMetaData meta)(Code)
Add an annotation builder to list of builders for the specified field metadata.



addAnnotation
protected void addAnnotation(AnnotationBuilder ab, SequenceMetaData meta)(Code)
Add an annotation builder to list of builders for the specified sequence metadata.



addAnnotation
protected void addAnnotation(AnnotationBuilder ab, QueryMetaData meta)(Code)
Add an annotation builder to list of builders for the specified query metadata.



addAnnotation
protected AnnotationBuilder addAnnotation(Class<? extends Annotation> annType, ClassMetaData meta)(Code)
Creates an an annotation builder for the specified class metadata and adds it to list of builders.



addAnnotation
protected AnnotationBuilder addAnnotation(Class<? extends Annotation> annType, FieldMetaData meta)(Code)
Creates an an annotation builder for the specified class metadata and adds it to list of builders.



addAnnotation
protected AnnotationBuilder addAnnotation(Class<? extends Annotation> annType, SequenceMetaData meta)(Code)
Creates an an annotation builder for the specified class metadata and adds it to list of builders.



addAnnotation
protected AnnotationBuilder addAnnotation(Class<? extends Annotation> annType, QueryMetaData meta)(Code)
Creates an an annotation builder for the specified class metadata and adds it to list of builders.



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



addFieldMappingAttributes
protected void addFieldMappingAttributes(FieldMetaData fmd, FieldMetaData orig, AnnotationBuilder ab)(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, AnnotationBuilder ab)(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.



getLog
public Log getLog()(Code)
The log to write to.



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)



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



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



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



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



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



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



newAnnotationBuilder
protected AnnotationBuilder newAnnotationBuilder(Class<? extends Annotation> annType)(Code)
Creates a new annotation builder for the specified annotation type.



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)(Code)



serialize
public void serialize(Map output, int flags) throws IOException(Code)



serialize
public void serialize(File file, int flags) throws IOException(Code)



serialize
public void serialize(Writer out, int flags) throws IOException(Code)



serialize
public void serialize(int flags) throws IOException(Code)



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



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



serializeClass
protected void serializeClass(ClassMetaData meta)(Code)
Serialize class metadata.



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



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



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



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



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



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



setLog
public void setLog(Log log)(Code)
The log to write to.



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.



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.



writeAnnotations
protected void writeAnnotations(Object meta, List<AnnotationBuilder> builders, Map output)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.