Java Doc for ClassMapping.java in  » Database-ORM » XORM » org » xorm » 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 » XORM » org.xorm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xorm.ClassMapping

ClassMapping
public class ClassMapping implements I15d,Cloneable(Code)
A ClassMapping provides the mapping from a Java type (class or interface) to a datastore type. Each field of a Class can map to a Column in a Table, or may be mapped as a RelationshipMapping. A ClassMapping is also the repository for default fetch group information.


Field Summary
 Classclazz
    

Constructor Summary
public  ClassMapping(ModelMapping modelMapping, Class clazz)
     Creates a new ClassMapping that maps the given Class.
public  ClassMapping(ModelMapping modelMapping, Class clazz, JDOClass jdoClass)
    

Method Summary
public  Objectclone()
     Creates a shallow clone.
public  ColumngetColumn(String field)
     Get the Column mapped to the given field.
public  ColumngetColumnForMethod(Method method)
     Convenience method that gets the Column mapped to a particular get or set method.
public  ClassgetDatastoreIdentityType()
     Returns the Class specified as the identity-type for a class mapping, or null if none was specified.
public  DataFetchGroupgetDefaultFetchGroup()
    
public  FieldDescriptorgetFieldDescriptor(String field)
     Retrieves the FieldDescriptor associated with the given field name by iterating through the collection of all FieldDescriptors for this class.
public  CollectiongetFieldDescriptors()
     Gets the field descriptors found by introspection on the class or interface.
public  StringgetFieldForMethod(Method method)
     Retrieves the field associated with a get or set method.
public  ClassgetFieldType(String field)
     Returns the Java type of the field.
public  StringgetInverse(String field)
    
public  SetgetManagedFields()
     Returns the set of managed field names.
public  ClassgetMappedClass()
     Get the class that this mapping references.
public  SetgetMappedFieldDescriptors()
     Gets the set of FieldDescriptors that have column mappings defined in the JDO metadata file.
public  RelationshipMappinggetRelationship(String field)
     Get the relationship mapped to a field.
public  RelationshipMappinggetRelationshipForMethod(Method method)
     Convenience method to go from a get/set method to the associated relationship mapping.
public  MapgetRelationships()
     Get the map of relationships.
public  TablegetTable()
     Get the table the class is mapped to.
public static  booleanisUserType(Class clazz)
     Returns true if the class parameter is not a primitive type, a wrapper class for a primitive type, or java.util.Date, java.lang.String, java.util.Locale, java.math.BigDecimal, or java.math.BigInteger.
public  voidsetColumn(String field, Column column, Boolean inDefaultFetchGroup)
     Set the Column mapped to the given field.
public  voidsetDatastoreIdentityType(Class datastoreIdentityType)
    
public  voidsetInverse(String localField, String inverseField)
    
public  voidsetRelationship(String field, RelationshipMapping relation)
     Define a to-many relationship on a field.
public  voidsetTable(Table table)
     Defines the table that will be used to map the class. If table is null, defaults will be applied to create a mapping for the table.

Field Detail
clazz
Class clazz(Code)




Constructor Detail
ClassMapping
public ClassMapping(ModelMapping modelMapping, Class clazz)(Code)
Creates a new ClassMapping that maps the given Class. The class will be introspected and assigned relationships for all properties that are of a user-defined (non-collection) type.



ClassMapping
public ClassMapping(ModelMapping modelMapping, Class clazz, JDOClass jdoClass)(Code)

See Also:   ClassMapping.ClassMapping(ModelMapping,Class)
See Also:   




Method Detail
clone
public Object clone()(Code)
Creates a shallow clone.



getColumn
public Column getColumn(String field)(Code)
Get the Column mapped to the given field.



getColumnForMethod
public Column getColumnForMethod(Method method)(Code)
Convenience method that gets the Column mapped to a particular get or set method. Returns null for unmapped methods.



getDatastoreIdentityType
public Class getDatastoreIdentityType()(Code)
Returns the Class specified as the identity-type for a class mapping, or null if none was specified.



getDefaultFetchGroup
public DataFetchGroup getDefaultFetchGroup()(Code)



getFieldDescriptor
public FieldDescriptor getFieldDescriptor(String field)(Code)
Retrieves the FieldDescriptor associated with the given field name by iterating through the collection of all FieldDescriptors for this class.
exception:
  JDOUserException - if the named field does not exist.



getFieldDescriptors
public Collection getFieldDescriptors()(Code)
Gets the field descriptors found by introspection on the class or interface. This includes primitive types, user types, and collection references. The returned items are instances of org.xorm.FieldDescriptor. Not all fields found by introspection are required to be mapped.



getFieldForMethod
public String getFieldForMethod(Method method)(Code)
Retrieves the field associated with a get or set method. Returns null if there is no mapping.



getFieldType
public Class getFieldType(String field)(Code)
Returns the Java type of the field.



getInverse
public String getInverse(String field)(Code)



getManagedFields
public Set getManagedFields()(Code)
Returns the set of managed field names. This set is the union of fields that are mapped and fields that are defined as relationships.



getMappedClass
public Class getMappedClass()(Code)
Get the class that this mapping references.



getMappedFieldDescriptors
public Set getMappedFieldDescriptors()(Code)
Gets the set of FieldDescriptors that have column mappings defined in the JDO metadata file.



getRelationship
public RelationshipMapping getRelationship(String field)(Code)
Get the relationship mapped to a field. If no relationship exists, returns null.



getRelationshipForMethod
public RelationshipMapping getRelationshipForMethod(Method method)(Code)
Convenience method to go from a get/set method to the associated relationship mapping.



getRelationships
public Map getRelationships()(Code)
Get the map of relationships. The keys are Strings and the values are RelationshipMapping objects. A relationship is defined as a -to-one or -to-many relationship to another first class user object.



getTable
public Table getTable()(Code)
Get the table the class is mapped to.



isUserType
public static boolean isUserType(Class clazz)(Code)
Returns true if the class parameter is not a primitive type, a wrapper class for a primitive type, or java.util.Date, java.lang.String, java.util.Locale, java.math.BigDecimal, or java.math.BigInteger.



setColumn
public void setColumn(String field, Column column, Boolean inDefaultFetchGroup)(Code)
Set the Column mapped to the given field.
exception:
  JDOUserException - if the field does not exist, or ifthe field has a set() method but the column is marked as read-only.



setDatastoreIdentityType
public void setDatastoreIdentityType(Class datastoreIdentityType)(Code)



setInverse
public void setInverse(String localField, String inverseField)(Code)



setRelationship
public void setRelationship(String field, RelationshipMapping relation)(Code)
Define a to-many relationship on a field.
exception:
  JDOUserException - if the field does not exist



setTable
public void setTable(Table table)(Code)
Defines the table that will be used to map the class. If table is null, defaults will be applied to create a mapping for the table. This will include a datastore identity column called "xorm_pk"; other column names will be the same as the field name.



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.