incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r291262 - /incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ClassDescriptor.java
Date Sat, 24 Sep 2005 07:57:36 GMT
Author: clombart
Date: Sat Sep 24 00:57:31 2005
New Revision: 291262

URL: http://svn.apache.org/viewcvs?rev=291262&view=rev
Log:
add new method which will be used in the QueryManager

Modified:
    incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ClassDescriptor.java

Modified: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ClassDescriptor.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ClassDescriptor.java?rev=291262&r1=291261&r2=291262&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ClassDescriptor.java
(original)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ClassDescriptor.java
Sat Sep 24 00:57:31 2005
@@ -32,9 +32,10 @@
      private String jcrNodeType;
      private FieldDescriptor idFieldDescriptor;
      
-     HashMap fieldDescriptors = new HashMap();
-     HashMap beanDescriptors = new HashMap();
-     HashMap collectionDescriptors = new HashMap();
+     private HashMap fieldDescriptors = new HashMap();
+     private HashMap beanDescriptors = new HashMap();
+     private HashMap collectionDescriptors = new HashMap();
+     private HashMap fieldNames = new HashMap();
     
     
     /**
@@ -81,6 +82,7 @@
         }
         
         fieldDescriptors.put(fieldDescriptor.getFieldName(), fieldDescriptor);
+        fieldNames.put(fieldDescriptor.getFieldName(), fieldDescriptor.getJcrName());
     }
     
     /**
@@ -111,6 +113,7 @@
     public void addBeanDescriptor(BeanDescriptor beanDescriptor )
     {
         beanDescriptors.put(beanDescriptor.getFieldName(), beanDescriptor);
+        fieldNames.put(beanDescriptor.getFieldName(), beanDescriptor.getJcrName());
     }
 
     /**
@@ -144,6 +147,7 @@
     {
         collectionDescriptor.setClassDescriptor(this);
         collectionDescriptors.put(collectionDescriptor.getFieldName(), collectionDescriptor);
+        fieldNames.put(collectionDescriptor.getFieldName(), collectionDescriptor.getJcrName());
     }
 
     /**
@@ -174,5 +178,10 @@
     public boolean hasIdField()
     {
         return this.idFieldDescriptor != null;
+    }
+    
+    public String getJcrName(String fieldName)
+    {
+    	return (String) this.fieldNames.get(fieldName);
     }
 }



Mime
View raw message