You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by fa...@apache.org on 2008/05/22 09:34:23 UTC
svn commit: r659028 - in /openjpa/trunk/openjpa-jdbc/src/main:
java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
resources/org/apache/openjpa/jdbc/sql/localizer.properties
Author: fancy
Date: Thu May 22 00:34:23 2008
New Revision: 659028
URL: http://svn.apache.org/viewvc?rev=659028&view=rev
Log:
OPENJPA-606 Informix specific message for reporting that it does not support "LOCATE" function
Modified:
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java?rev=659028&r1=659027&r2=659028&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/InformixDictionary.java Thu May 22 00:34:23 2008
@@ -34,6 +34,7 @@
import org.apache.openjpa.jdbc.schema.Index;
import org.apache.openjpa.jdbc.schema.PrimaryKey;
import org.apache.openjpa.jdbc.schema.Table;
+import org.apache.openjpa.lib.util.Localizer;
import org.apache.openjpa.lib.util.ReferenceHashSet;
import org.apache.openjpa.util.UnsupportedException;
@@ -76,6 +77,9 @@
private final Collection _seenConnections = new ReferenceHashSet
(ReferenceHashSet.WEAK);
+ private static final Localizer _loc = Localizer.forPackage
+ (InformixDictionary.class);
+
public InformixDictionary() {
platform = "Informix";
validationSQL = "SELECT FIRST 1 CURRENT TIMESTAMP "
@@ -265,8 +269,9 @@
}
public void indexOf(SQLBuffer buf, FilterValue str, FilterValue find,
- FilterValue start) {
- throw new UnsupportedException();
+ FilterValue start) {
+ throw new UnsupportedException(_loc.get("function-not-supported",
+ getClass(), "LOCATE"));
}
public boolean needsToCreateIndex(Index idx, Table table) {
Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties?rev=659028&r1=659027&r2=659028&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties Thu May 22 00:34:23 2008
@@ -169,4 +169,6 @@
timeouts. Use timeouts that are multiples of 1000 for even second values.
db-not-supported: The database product "{0}", version "{1}" is not officially supported.
stream-exception: Unexpected error recovering the row to stream the LOB.
-batch_unlimit: The batch limit was changed from unlimit (-1) to {0}.
\ No newline at end of file
+batch_unlimit: The batch limit was changed from unlimit (-1) to {0}.
+function-not-supported: The database dictionary in use ("{0}") \
+ does not support "{1}" function.
\ No newline at end of file