openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r428918 - in /incubator/openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/ openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ openjpa-kernel/src/main/j...
Date Fri, 04 Aug 2006 23:12:31 GMT
Author: awhite
Date: Fri Aug  4 16:12:30 2006
New Revision: 428918

URL: http://svn.apache.org/viewvc?rev=428918&view=rev
Log:
Change names of query languages to have "openjpa" prefix rather than 
"org.apache.openjpa" to match configuration properties.  Some minor code 
formatting fixes.


Modified:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/AbstractStoreManager.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryLanguages.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
    incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
    incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/LoadFetchGroup.java
    incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MetaDataTag.java

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/AbstractStoreManager.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/AbstractStoreManager.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/AbstractStoreManager.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/AbstractStoreManager.java
Fri Aug  4 16:12:30 2006
@@ -104,7 +104,7 @@
  * execute a query against an extent or a class, OpenJPA will
  * automatically load the full extent of objects into memory and
  * execute the query in memory.</li>
- * <li><em>org.apache.openjpa.MethodQL</em>: MethodQL allows
+ * <li><em>openjpa.MethodQL</em>: MethodQL allows
  * you to use the query APIs to execute a method that finds
  * data in your back-end and returns that data as a
  * {@link org.apache.openjpa.lib.rop.ResultList}. For more details on

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Fri Aug  4 16:12:30 2006
@@ -2641,14 +2641,13 @@
      * Affirms if the given method be skipped.
      * 
      * @param method method to be skipped or not
-     * @return true if any of the auxiliary enhancers skips the given method.
+     * @return true if any of the auxiliary enhancers skips the given method
      */
     private boolean skipEnhance(BCMethod method) {
     	AuxiliaryEnhancer[] auxEnhancers = getAuxiliaryEnhancers();
-    	for (int i = 0; i < auxEnhancers.length; i++) {
+    	for (int i = 0; i < auxEnhancers.length; i++)
     		if (auxEnhancers[i].skipEnhance(method))
     			return true;
-     	}
     	return false;
     }
 

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
Fri Aug  4 16:12:30 2006
@@ -3301,31 +3301,31 @@
         return extent.iterator();
     }
 
-    public Query newQuery(String language, Class cls, Object query) {
-        Query q = newQuery(language, query);
+    public Query newQuery(String lang, Class cls, Object query) {
+        Query q = newQuery(lang, query);
         q.setCandidateType(cls, true);
         return q;
     }
 
-    public Query newQuery(String language, Object query) {
+    public Query newQuery(String lang, Object query) {
         // common mistakes
         if (query instanceof Extent || query instanceof Class)
             throw new UserException(_loc.get("bad-new-query"));
 
         beginOperation(false);
         try {
-            StoreQuery sq = _store.newQuery(language);
+            StoreQuery sq = _store.newQuery(lang);
             if (sq == null) {
-                ExpressionParser ep = QueryLanguages.parserForLanguage(language);
+                ExpressionParser ep = QueryLanguages.parserForLanguage(lang);
                 if (ep != null)
                     sq = new ExpressionStoreQuery(ep);
-                else if (QueryLanguages.LANG_METHODQL.equals(language))
+                else if (QueryLanguages.LANG_METHODQL.equals(lang))
                     sq = new MethodStoreQuery();
                 else
-                    throw new UnsupportedException(language);
+                    throw new UnsupportedException(lang);
             }
 
-            Query q = newQueryImpl(language, sq);
+            Query q = newQueryImpl(lang, sq);
             q.setIgnoreChanges(_ignoreChanges);
             if (query != null)
                 q.setQuery(query);
@@ -3347,8 +3347,8 @@
     /**
      * Create a new query.
      */
-    protected QueryImpl newQueryImpl(String language, StoreQuery sq) {
-        return new QueryImpl(this, language, sq);
+    protected QueryImpl newQueryImpl(String lang, StoreQuery sq) {
+        return new QueryImpl(this, lang, sq);
     }
 
     public Seq getIdentitySequence(ClassMetaData meta) {

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryLanguages.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryLanguages.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryLanguages.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryLanguages.java
Fri Aug  4 16:12:30 2006
@@ -24,14 +24,11 @@
 
 /**
  * Constants and utilities for query languages.
- *
- * @author Abe White
- * @since 4.0
  */
 public class QueryLanguages {
 
-    public static final String LANG_SQL = "org.apache.openjpa.SQL";
-    public static final String LANG_METHODQL = "org.apache.openjpa.MethodQL";
+    public static final String LANG_SQL = "openjpa.SQL";
+    public static final String LANG_METHODQL = "openjpa.MethodQL";
 
     private static Map _expressionParsers = new HashMap();
     static {

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
Fri Aug  4 16:12:30 2006
@@ -587,6 +587,8 @@
      * null if none set.
      */
     public void setLoadFetchGroup (String lfg) {
+        if ("".equals(lfg))
+            lfg = null;
     	_lfg = lfg;
     }
 

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
Fri Aug  4 16:12:30 2006
@@ -261,7 +261,7 @@
 	BigDecimal.
 cant-convert: Cannot convert object "{0}" of type "{1}" into an instance of \
 	"{2}".
-bad-method-class: You set the method name of this org.apache.openjpa.MethodQL query to \
+bad-method-class: You set the method name of this openjpa.MethodQL query to \
 	"{1}", but class "{0}" is not a valid class name.  Make sure to fully \
 	qualify the class name or to import its package into this query if the \
 	class is not in the query candidate class'' package. 

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
Fri Aug  4 16:12:30 2006
@@ -160,10 +160,10 @@
         _tags.put(Factory.class, FACTORY);
         _tags.put(FetchGroup.class, FETCH_GROUP);
         _tags.put(FetchGroups.class, FETCH_GROUPS);
-        _tags.put(LoadFetchGroup.class, LOAD_FETCH_GROUP);
         _tags.put(InverseLogical.class, INVERSE_LOGICAL);
         _tags.put(KeyDependent.class, KEY_DEPENDENT);
         _tags.put(KeyType.class, KEY_TYPE);
+        _tags.put(LoadFetchGroup.class, LOAD_FETCH_GROUP);
         _tags.put(LRS.class, LRS);
         _tags.put(ReadOnly.class, READ_ONLY);
         _tags.put(Type.class, TYPE);
@@ -1030,6 +1030,10 @@
                         fmd.getKey().setTypeOverride(toOverrideType(((KeyType)
                             anno).value()));
                     break;
+                case LOAD_FETCH_GROUP:
+                	if (isMetaDataMode())
+                		fmd.setLoadFetchGroup(((LoadFetchGroup)anno).value());
+                	break;
                 case LRS:
                     if (isMetaDataMode())
                         fmd.setLRS(((LRS) anno).value());
@@ -1043,10 +1047,6 @@
                         fmd.setTypeOverride(toOverrideType(((Type) anno).
                             value()));
                     break;
-                case LOAD_FETCH_GROUP:
-                	if (isMetaDataMode())
-                		fmd.setLoadFetchGroup(((LoadFetchGroup)anno).value());
-                	break;
                 default:
                     throw new UnsupportedException(_loc.get("unsupported", fmd,
                         anno.toString()));

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/LoadFetchGroup.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/LoadFetchGroup.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/LoadFetchGroup.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/LoadFetchGroup.java
Fri Aug  4 16:12:30 2006
@@ -25,7 +25,6 @@
  * Fetch group loaded when the annotated field/property is loaded. 
  *
  * @author Pinaki Poddar
- * @since 4.0
  */
 @Target({ METHOD, FIELD })
 @Retention(RUNTIME)

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MetaDataTag.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MetaDataTag.java?rev=428918&r1=428917&r2=428918&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MetaDataTag.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/MetaDataTag.java
Fri Aug  4 16:12:30 2006
@@ -67,10 +67,10 @@
     FACTORY,
     FETCH_GROUP,
     FETCH_GROUPS,
-    LOAD_FETCH_GROUP,
     INVERSE_LOGICAL,
     KEY_DEPENDENT,
     KEY_TYPE,
+    LOAD_FETCH_GROUP,
     LRS,
     READ_ONLY,
     TYPE,



Mime
View raw message