Java Doc for DescriptorRepository.java in  » Database-ORM » db-ojb » org » apache » ojb » broker » metadata » 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 » db ojb » org.apache.ojb.broker.metadata 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.ojb.broker.metadata.DescriptorBase
      org.apache.ojb.broker.metadata.DescriptorRepository

DescriptorRepository
final public class DescriptorRepository extends DescriptorBase implements Serializable,XmlCapable,IsolationLevels(Code)
The repository containing all object mapping and manipulation information of all used persistent objects.
Note: Be careful when use references of this class or caching instances of this class, because instances could become invalid (see MetadataManager ).
author:
   Thomas Mahler
author:
  
Leandro Rodrigo Saad Cruz
version:
   $Id: DescriptorRepository.java,v 1.50.2.9 2005/12/21 22:26:11 tomdz Exp $


Field Summary
final static  longserialVersionUID
    

Constructor Summary
public  DescriptorRepository()
    

Method Summary
 voidaddExtent(String classname, ClassDescriptor cld)
     Add a pair of extent/classdescriptor to the extentTable to gain speed while retrieval of extents.
protected  voidderegisterSuperClassMultipleJoinedTables(ClassDescriptor cld)
     Internal used! Deregister sub-classes of specified class when mapping to multiple joined tables is used.
protected  ClassDescriptordiscoverDescriptor(String className)
     Starts by looking to see if the className is already mapped specifically to the descritpor repository. If the className is not specifically mapped we look at the className's parent class for a mapping. We do this until the parent class is of the type java.lang.Object.
protected  voidfinalize()
    
public  ClassDescriptorfindFirstConcreteClass(ClassDescriptor cld)
     Return the first found concrete class ClassDescriptor . This means a class which is not an interface or an abstract class. If given class descriptor is a concrete class, given class descriptor was returned.
public  CollectiongetAllConcreteSubclassDescriptors(ClassDescriptor aCld)
     Utility method to discover all concrete subclasses of a given super class.
public  intgetDefaultIsolationLevel()
     Returns the defaultIsolationLevel.
public  ClassDescriptorgetDescriptorFor(String strClassName)
    
public  ClassDescriptorgetDescriptorFor(Class c)
    
public  MapgetDescriptorTable()
    
public synchronized  FieldDescriptor[]getFieldDescriptorsForMultiMappedTable(ClassDescriptor targetCld)
    
protected  StringgetIsolationLevelAsString()
    
public  Class[]getSubClassesMultipleJoinedTables(ClassDescriptor cld, boolean wholeTree)
     Return sub-classes of the specified class using the "super"-Reference concept.
Parameters:
  cld - The ClassDescriptor of the class to search for sub-classes.
Parameters:
  wholeTree - If set true, the whole sub-class tree of the specifiedclass will be returned.
public  ClassgetTopLevelClass(Class clazz)
     Returns the top level (extent) class to which the given class belongs. This may be a (abstract) base-class, an interface or the given class itself if given class is not defined as an extent in other class descriptors.
throws:
  ClassNotPersistenceCapableException - if clazz is not persistence capable,i.e.
public static  StringgetVersion()
    
public  booleanhasDescriptorFor(Class c)
     Checks if repository contains given class.
public  Iteratoriterator()
     Returns an iterator over all managed ClassDescriptor .
public  voidput(Class c, ClassDescriptor cld)
    
public  voidput(String classname, ClassDescriptor cld)
    
protected  voidregisterSuperClassMultipleJoinedTables(ClassDescriptor cld)
     Internal used! Register sub-classes of specified class when mapping class to multiple joined tables is used.
public  voidremove(String className)
    
public  voidremove(Class clazz)
    
 voidremoveExtent(String classname)
     Remove a pair of extent/classdescriptor from the extentTable.
public  voidsetClassDescriptor(ClassDescriptor cld)
    
public  voidsetDefaultIsolationLevel(int defaultIsolationLevel)
     Sets the defaultIsolationLevel.
public  StringtoString()
    
public  StringtoXML()
    

Field Detail
serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
DescriptorRepository
public DescriptorRepository() throws PersistenceBrokerException(Code)
Constructor declaration




Method Detail
addExtent
void addExtent(String classname, ClassDescriptor cld)(Code)
Add a pair of extent/classdescriptor to the extentTable to gain speed while retrieval of extents.
Parameters:
  classname - the name of the extent itself
Parameters:
  cld - the class descriptor, where it belongs to



deregisterSuperClassMultipleJoinedTables
protected void deregisterSuperClassMultipleJoinedTables(ClassDescriptor cld)(Code)
Internal used! Deregister sub-classes of specified class when mapping to multiple joined tables is used. Normally this method is called when DescriptorRepository.remove(Class) a class.
Parameters:
  cld - The ClassDescriptor of the class to register.



discoverDescriptor
protected ClassDescriptor discoverDescriptor(String className)(Code)
Starts by looking to see if the className is already mapped specifically to the descritpor repository. If the className is not specifically mapped we look at the className's parent class for a mapping. We do this until the parent class is of the type java.lang.Object. If no mapping was found, null is returned. Mappings successfuly discovered through inheritence are added to the internal table of class descriptors to improve performance on subsequent requests for those classes.
author Scott T. Weaver
Parameters:
  className - name of class whose descriptor we need to find. ClassDescriptor for className or nullif no ClassDescriptor could be located.



finalize
protected void finalize() throws Throwable(Code)



findFirstConcreteClass
public ClassDescriptor findFirstConcreteClass(ClassDescriptor cld)(Code)
Return the first found concrete class ClassDescriptor . This means a class which is not an interface or an abstract class. If given class descriptor is a concrete class, given class descriptor was returned. If no concrete class can be found null will be returned.



getAllConcreteSubclassDescriptors
public Collection getAllConcreteSubclassDescriptors(ClassDescriptor aCld)(Code)
Utility method to discover all concrete subclasses of a given super class.
This method was introduced in order to get Extent Aware Iterators. a Collection of ClassDescriptor objects



getDefaultIsolationLevel
public int getDefaultIsolationLevel()(Code)
Returns the defaultIsolationLevel. int



getDescriptorFor
public ClassDescriptor getDescriptorFor(String strClassName) throws ClassNotPersistenceCapableException(Code)
lookup a ClassDescriptor in the internal Hashtable
Parameters:
  strClassName - a fully qualified class name as it is returned by Class.getName().



getDescriptorFor
public ClassDescriptor getDescriptorFor(Class c) throws ClassNotPersistenceCapableException(Code)
lookup a ClassDescriptor in the internal Hashtable



getDescriptorTable
public Map getDescriptorTable()(Code)



getFieldDescriptorsForMultiMappedTable
public synchronized FieldDescriptor[] getFieldDescriptorsForMultiMappedTable(ClassDescriptor targetCld)(Code)
all field descriptors for a class that belongs to a set of classes mappedto the same table, otherwise the select queries produced won't contain the necessaryinformation to materialize extents mapped to the same class.



getIsolationLevelAsString
protected String getIsolationLevelAsString()(Code)
returns IsolationLevel literal as matching to the corresponding id the IsolationLevel literal



getSubClassesMultipleJoinedTables
public Class[] getSubClassesMultipleJoinedTables(ClassDescriptor cld, boolean wholeTree)(Code)
Return sub-classes of the specified class using the "super"-Reference concept.
Parameters:
  cld - The ClassDescriptor of the class to search for sub-classes.
Parameters:
  wholeTree - If set true, the whole sub-class tree of the specifiedclass will be returned. If false only the direct sub-classes of the specified classwill be returned. An array of sub-classes for the specified class.



getTopLevelClass
public Class getTopLevelClass(Class clazz) throws ClassNotPersistenceCapableException(Code)
Returns the top level (extent) class to which the given class belongs. This may be a (abstract) base-class, an interface or the given class itself if given class is not defined as an extent in other class descriptors.
throws:
  ClassNotPersistenceCapableException - if clazz is not persistence capable,i.e. if clazz is not defined in the DescriptorRepository.



getVersion
public static String getVersion()(Code)



hasDescriptorFor
public boolean hasDescriptorFor(Class c)(Code)
Checks if repository contains given class.



iterator
public Iterator iterator()(Code)
Returns an iterator over all managed ClassDescriptor .



put
public void put(Class c, ClassDescriptor cld)(Code)
Add a ClassDescriptor to the internal Hashtable
Set the Repository for ClassDescriptor



put
public void put(String classname, ClassDescriptor cld)(Code)
Add a ClassDescriptor to the internal Hashtable
Set the Repository for ClassDescriptor



registerSuperClassMultipleJoinedTables
protected void registerSuperClassMultipleJoinedTables(ClassDescriptor cld)(Code)
Internal used! Register sub-classes of specified class when mapping class to multiple joined tables is used. Normally this method is called by the ClassDescriptor itself.
Parameters:
  cld - The ClassDescriptor of the class to register.



remove
public void remove(String className)(Code)



remove
public void remove(Class clazz)(Code)



removeExtent
void removeExtent(String classname)(Code)
Remove a pair of extent/classdescriptor from the extentTable.
Parameters:
  classname - the name of the extent itself



setClassDescriptor
public void setClassDescriptor(ClassDescriptor cld)(Code)
Convenience for DescriptorRepository.put(Class c,ClassDescriptor cld)



setDefaultIsolationLevel
public void setDefaultIsolationLevel(int defaultIsolationLevel)(Code)
Sets the defaultIsolationLevel.
Parameters:
  defaultIsolationLevel - The defaultIsolationLevel to set



toString
public String toString()(Code)
returns a string representation



toXML
public String toXML()(Code)



Fields inherited from org.apache.ojb.broker.metadata.DescriptorBase
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from org.apache.ojb.broker.metadata.DescriptorBase
public void addAttribute(String attributeName, String attributeValue)(Code)(Java Doc)
public String getAttribute(String attributeName, String defaultValue)(Code)(Java Doc)
public String getAttribute(String attributeName)(Code)(Java Doc)
public String[] getAttributeNames()(Code)(Java Doc)
public Map getAttributes()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.