jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r770663 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype: PropertyDefinitionImpl.java PropertyDefinitionTemplateImpl.java
Date Fri, 01 May 2009 13:15:18 GMT
Author: jukka
Date: Fri May  1 13:15:18 2009
New Revision: 770663

URL: http://svn.apache.org/viewvc?rev=770663&view=rev
Log:
JCR-2094: Use an enumeration for QOM operators

Centralize knowledge about available query operators

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionTemplateImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java?rev=770663&r1=770662&r2=770663&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java
Fri May  1 13:15:18 2009
@@ -16,16 +16,16 @@
  */
 package org.apache.jackrabbit.core.nodetype;
 
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.nodetype.PropertyDefinition;
+
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+import org.apache.jackrabbit.spi.commons.query.qom.Operator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.nodetype.PropertyDefinition;
-import javax.jcr.query.qom.QueryObjectModelConstants;
-
 /**
  * This class implements the <code>PropertyDefinition</code> interface.
  * All method calls are delegated to the wrapped {@link PropDef},
@@ -117,15 +117,7 @@
 
     public String[] getAvailableQueryOperators() {
         // TODO: JCR-2091
-        return new String[] {
-                QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO,
-                QueryObjectModelConstants.JCR_OPERATOR_GREATER_THAN,
-                QueryObjectModelConstants.JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO,
-                QueryObjectModelConstants.JCR_OPERATOR_LESS_THAN,
-                QueryObjectModelConstants.JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO,
-                QueryObjectModelConstants.JCR_OPERATOR_LIKE,
-                QueryObjectModelConstants.JCR_OPERATOR_NOT_EQUAL_TO
-        };
+        return Operator.getAllQueryOperators();
     }
 
     public boolean isFullTextSearchable() {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionTemplateImpl.java?rev=770663&r1=770662&r2=770663&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionTemplateImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionTemplateImpl.java
Fri May  1 13:15:18 2009
@@ -16,12 +16,12 @@
  */
 package org.apache.jackrabbit.core.nodetype;
 
-import javax.jcr.nodetype.PropertyDefinitionTemplate;
-
 import javax.jcr.PropertyType;
 import javax.jcr.Value;
 import javax.jcr.nodetype.PropertyDefinition;
-import javax.jcr.query.qom.QueryObjectModelConstants;
+import javax.jcr.nodetype.PropertyDefinitionTemplate;
+
+import org.apache.jackrabbit.spi.commons.query.qom.Operator;
 
 /**
  * A <code>PropertyDefinitionTemplateImpl</code> ...
@@ -127,15 +127,7 @@
 
     public String[] getAvailableQueryOperators() {
         // TODO: JCR-2091
-        return new String[] {
-                QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO,
-                QueryObjectModelConstants.JCR_OPERATOR_GREATER_THAN,
-                QueryObjectModelConstants.JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO,
-                QueryObjectModelConstants.JCR_OPERATOR_LESS_THAN,
-                QueryObjectModelConstants.JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO,
-                QueryObjectModelConstants.JCR_OPERATOR_LIKE,
-                QueryObjectModelConstants.JCR_OPERATOR_NOT_EQUAL_TO
-        };
+        return Operator.getAllQueryOperators();
     }
 
     public boolean isFullTextSearchable() {



Mime
View raw message