Modified: openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties?rev=762161&r1=762160&r2=762161&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties (original) +++ openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties Sun Apr 5 21:29:42 2009 @@ -1,171 +1,175 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -close-invoked: You have closed the EntityManager, though the persistence \ - context will remain active until the current transaction commits. -no-managed-trans: There is no managed transaction in progress to sync this \ - EntityManager with. -get-managed-trans: You cannot access the EntityTransaction when using managed \ - transactions. -trans-ctx-notactive: When using a persistence context type of TRANSACTION, you \ - can only perform this operation during an active transaction. -not-entity: The class "{0}" is not an entity. -not-managed: Object "{0}" is not managed by this context. -parse-class: Parsing class "{0}". -parse-package: Parsing package "{0}". -parse-sequence: Parsing sequence "{0}". -parse-query: Parsing query "{0}". -parse-native-query: Parsing native query "{0}". -dup-metadata: Found duplicate metadata or mapping for "{0}". Ignoring. -dup-sequence: Found duplicate generator "{0}" in "{1}". Ignoring. -override-sequence: Found duplicate generator "{0}" in "{1}". Overriding \ - previous definition. -dup-query: Ignoring duplicate query "{0}" in "{1}". A query with the same name \ - been already declared in "{2}". -override-query: Found duplicate query "{0}" in "{1}". Overriding previous \ - definition. -no-seq-name: The sequence generator in "{0}" must declare a name. -no-query-name: The named query in "{0}" must declare a name. -no-native-query-name: The named native query in "{0}" must declare a name. -no-query-string: The named query "{0}" in "{1}" must declare a query string. -no-native-query-string: The named native query "{0}" in "{1}" must declare a \ - query string. -already-pers: Field "{0}" cannot be annotated by two persistence strategy \ - annotations. -unsupported: OpenJPA does not yet support "{1}" as used in "{0}". -bad-meta-anno: The type of field "{0}" isn''t supported by declared \ - persistence strategy "{1}". Please choose a different strategy. -no-pers-strat: Fields "{0}" are not a default persistent type, and do not \ - have any annotations indicating their persistence strategy. If you do \ - not want these fields to be persisted, annotate them with @Transient. -generator-bad-strategy: "{0}" declares generator name "{1}", but uses the AUTO \ - generation type. The only valid generator names under AUTO are "uuid-hex" \ - and "uuid-string". -unnamed-fg: "{0}" declares an unnamed fetch group. All fetch groups \ - must have names. -bad-fg-field: Fetch group "{0}" in type "{1}" includes field "{2}", but \ - this field is not declared in "{1}", or is not persistent. Currently, \ - OpenJPA only supports declared fields in fetch groups. -missing-included-fg:"{0}" declares a fetch group "{1}" includes "{2}". But \ - the included fetch group "{2}" can not be found in "{0}". Currently, all \ - included fetch groups must be declared within the same entity scope. -not-update-delete-query: Cannot perform an update or delete operation \ - on select query: "{0}". -not-select-query: Cannot perform a select on update or delete query: "{0}". -no-results: Query did not return any results: "{0}". -mult-results: Query returned multiple results: "{0}". -no-pos-named-params-mix: Cannot mix named and positional parameters in query \ - "{0}". -bad-query-hint: "{0}" is not a supported query hint. May be you meant "{1}"? -bad-query-hint-value: Invalid value specified for query hint "{0}": {1} -detached: Cannot perform this operation on detached entity "{0}". -removed: Cannot perform this operation on removed entity "{0}". -bad-alias: There is no known entity class for entity name "{0}". It is \ - possible that the corresponding class has not yet been registered in the \ - JVM. -naming-exception: A NamingException was thrown while obtaining the \ - factory at "{0}" from JNDI. -bad-jar-name: The jar resource "{0}" cannot be loaded. -missing-xml-config: The specified XML resource "{0}" for persistence unit \ - "{1}" can''t be found in your class path. -cantload-xml-config: The specified XML resource "{0}" for persistence unit \ - "{1}" can''t be parsed. -unknown-provider: Persistence provider "{2}" specified in persistence unit \ - "{1}" in "{0}" is not a recognized provider. -illegal-index: The parameter index {0} is invalid. Parameters must be \ - integers starting at 1. -conf-load: Setting the following properties from "{0}" into configuration: {1} -no-named-field: Type "{0}" does not have a managed field named "{1}". -unsupported-tag: OpenJPA does not currently support XML element "{0}". Ignoring. -no-class: No class attribute was specified. -invalid-id-class: Could not load id class "{1}" for type "{0}". -invalid-attr: Could not find property/field with the name "{0}" in type "{1}". -ser-class: Writing class "{0}". -ser-cls-query: Writing query "{1}" in class "{0}". -ser-query: Writing query "{1}". -ser-sequence: Writing sequence "{0}". -no-sql: You must provide a SQL string when creating a native query. -no-named-params: Named parameter "{0}" is invalid for native query "{1}". \ - Use only 1-based positional parameter in native queries. -bad-pos-params: Positional parameter "{0}" is invalid for native query "{1}". \ - Use only 1-based positional parameter in native queries. -bad-param-type: The parameter "{1}" in query "{0}" is set to a value of type \ - "{2}", but the parameter binds to a field of type "{3}". -missing-param-name: The parameter "{1}" in query "{0}" is not found in the \ - available list of parameters "{2}". -bad-em-prop: Invalid EntityManager property passed to createEntityManager. \ - Key: "{0}", Value: "{1}". -bad-em-props: Invalid EntityManager properties passed to createEntityManager. \ - See nested exceptions for details. -system-listener-err: An error occurred invoking system entity listener \ - callback on instance "{0}". -no-transaction: Cannot perform operation with no transaction. -multiple-methods-on-callback: Class "{0}" declares method "{1}" as well \ - as "{2}" for handling the same "{3}" callback. -unloadable-provider: WARNING: Unable to load persistence provider "{0}" due \ - to "{1}" -unrecognized-provider: WARNING: Found unrecognized persistence provider "{0}" \ - in place of OpenJPA provider. This provider''s properties will not be used. -cant-convert-brokerfactory: Unable to convert EntityManagerFactory of type \ - "{0}" into a BrokerFactory. -cant-convert-broker: Unable to convert EntityManager of type "{0}" into a \ - Broker. -map-persistent-type-names: Mapping resource location "{0}" to persistent \ - types "{1}". -map-persistent-types-skipping-non-url: Skipping persistent type location \ - association for location "{0}" since it is not a URL. -map-persistent-types-skipping-class: Skipping persistent type location \ - association for location "{0}" since it is a class, and will not \ - need to be re-parsed later. -no-setter-for-getter: No setter was found for method {0} in type {1} while \ - searching for persistent properties. This method will be ignored. If you \ - intended for this to be persistent, please add a corresponding setter, \ - or switch to field access for this type hierarchy. -transformer-registration-error: An error occurred while registering a \ - ClassTransformer with {0}. The error has been consumed. To see it, set \ - your openjpa.Runtime log level to TRACE. Load-time class transformation \ - will not be available. -transformer-registration-error-ex: An error occurred while registering a \ - ClassTransformer with {0}. The error is logged along with this warning. \ - Load-time class transformation will not be available. - -EntityManagerFactory-name: EntityManagerFactory implementation -EntityManagerFactory-desc: Allows extension of standard \ - org.apache.openjpa.persistence.EntityManagerFactoryImpl for custom behavior. -EntityManagerFactory-type: General -EntityManagerFactory-cat: Persistence.Advanced -EntityManagerFactory-displayorder: 50 -EntityManagerFactory-expert: true -EntityManagerFactory-interface: org.apache.openjpa.persistence.EntityManagerFactoryImpl -param-style-mismatch: Query "{0}" is declared with named parameters "{1}" but \ - actual parameters "{2}" are bound by position. -param-missing: Parameter "{0}" declared in "{1}" but is missing from the bound \ - parameters "{2}". -param-extra: Parameter "{0}" is bound to "{1}" but is missing from the \ - declared parameters "{2}". -param-type-mismatch: Parameter "{0}" declared in "{1}" is set to value of \ - "{2}" of type "{3}", but this parameter is bound to a field of type "{4}". -param-type-null: Parameter "{0}" declared in "{1}" is set to null, \ - but this parameter is bound to a field of primitive type "{2}". -version-check-error: An error occurred while attempting to determine the \ - version of "{0}". -no-result: Query "{0}" selected no result, but expected unique result. -non-unique-result: Query "{0}" selected {1} results, but expected unique result. -unwrap-em-invalid: EntityManager can not be unwrapped to an instance of "{0}". -unwrap-query-invalid: Query can not be unwrapped to an instance of "{0}". -invalid_entity_argument: Object being locked must be an valid and not detached \ - entity. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +close-invoked: You have closed the EntityManager, though the persistence \ + context will remain active until the current transaction commits. +no-managed-trans: There is no managed transaction in progress to sync this \ + EntityManager with. +get-managed-trans: You cannot access the EntityTransaction when using managed \ + transactions. +trans-ctx-notactive: When using a persistence context type of TRANSACTION, you \ + can only perform this operation during an active transaction. +not-entity: The class "{0}" is not an entity. +not-managed: Object "{0}" is not managed by this context. +parse-class: Parsing class "{0}". +parse-package: Parsing package "{0}". +parse-sequence: Parsing sequence "{0}". +parse-query: Parsing query "{0}". +parse-native-query: Parsing native query "{0}". +dup-metadata: Found duplicate metadata or mapping for "{0}". Ignoring. +dup-sequence: Found duplicate generator "{0}" in "{1}". Ignoring. +override-sequence: Found duplicate generator "{0}" in "{1}". Overriding \ + previous definition. +dup-query: Ignoring duplicate query "{0}" in "{1}". A query with the same name \ + been already declared in "{2}". +override-query: Found duplicate query "{0}" in "{1}". Overriding previous \ + definition. +no-seq-name: The sequence generator in "{0}" must declare a name. +no-query-name: The named query in "{0}" must declare a name. +no-native-query-name: The named native query in "{0}" must declare a name. +no-query-string: The named query "{0}" in "{1}" must declare a query string. +no-native-query-string: The named native query "{0}" in "{1}" must declare a \ + query string. +already-pers: Field "{0}" cannot be annotated by two persistence strategy \ + annotations. +unsupported: OpenJPA does not yet support "{1}" as used in "{0}". +bad-meta-anno: The type of field "{0}" isn''t supported by declared \ + persistence strategy "{1}". Please choose a different strategy. +no-pers-strat: Fields "{0}" are not a default persistent type, and do not \ + have any annotations indicating their persistence strategy. If you do \ + not want these fields to be persisted, annotate them with @Transient. +generator-bad-strategy: "{0}" declares generator name "{1}", but uses the AUTO \ + generation type. The only valid generator names under AUTO are "uuid-hex" \ + and "uuid-string". +unnamed-fg: "{0}" declares an unnamed fetch group. All fetch groups \ + must have names. +bad-fg-field: Fetch group "{0}" in type "{1}" includes field "{2}", but \ + this field is not declared in "{1}", or is not persistent. Currently, \ + OpenJPA only supports declared fields in fetch groups. +missing-included-fg:"{0}" declares a fetch group "{1}" includes "{2}". But \ + the included fetch group "{2}" can not be found in "{0}". Currently, all \ + included fetch groups must be declared within the same entity scope. +not-update-delete-query: Cannot perform an update or delete operation \ + on select query: "{0}". +not-select-query: Cannot perform a select on update or delete query: "{0}". +no-results: Query did not return any results: "{0}". +mult-results: Query returned multiple results: "{0}". +no-pos-named-params-mix: Cannot mix named and positional parameters in query \ + "{0}". +bad-query-hint: "{0}" is not a supported query hint. May be you meant "{1}"? +bad-query-hint-value: Invalid value specified for query hint "{0}": {1} +detached: Cannot perform this operation on detached entity "{0}". +removed: Cannot perform this operation on removed entity "{0}". +bad-alias: There is no known entity class for entity name "{0}". It is \ + possible that the corresponding class has not yet been registered in the \ + JVM. +naming-exception: A NamingException was thrown while obtaining the \ + factory at "{0}" from JNDI. +bad-jar-name: The jar resource "{0}" cannot be loaded. +missing-xml-config: The specified XML resource "{0}" for persistence unit \ + "{1}" can''t be found in your class path. +cantload-xml-config: The specified XML resource "{0}" for persistence unit \ + "{1}" can''t be parsed. +unknown-provider: Persistence provider "{2}" specified in persistence unit \ + "{1}" in "{0}" is not a recognized provider. +illegal-index: The parameter index {0} is invalid. Parameters must be \ + integers starting at 1. +conf-load: Setting the following properties from "{0}" into configuration: {1} +no-named-field: Type "{0}" does not have a managed field named "{1}". +unsupported-tag: OpenJPA does not currently support XML element "{0}". Ignoring. +no-class: No class attribute was specified. +invalid-id-class: Could not load id class "{1}" for type "{0}". +invalid-attr: Could not find property/field with the name "{0}" in type "{1}". +ser-class: Writing class "{0}". +ser-cls-query: Writing query "{1}" in class "{0}". +ser-query: Writing query "{1}". +ser-sequence: Writing sequence "{0}". +no-sql: You must provide a SQL string when creating a native query. +no-named-params: Named parameter "{0}" is invalid for native query "{1}". \ + Use only 1-based positional parameter in native queries. +bad-pos-params: Positional parameter "{0}" is invalid for native query "{1}". \ + Use only 1-based positional parameter in native queries. +bad-param-type: The parameter "{1}" in query "{0}" is set to a value of type \ + "{2}", but the parameter binds to a field of type "{3}". +missing-param-name: The parameter "{1}" in query "{0}" is not found in the \ + available list of parameters "{2}". +bad-em-prop: Invalid EntityManager property passed to createEntityManager. \ + Key: "{0}", Value: "{1}". +bad-em-props: Invalid EntityManager properties passed to createEntityManager. \ + See nested exceptions for details. +system-listener-err: An error occurred invoking system entity listener \ + callback on instance "{0}". +no-transaction: Cannot perform operation with no transaction. +multiple-methods-on-callback: Class "{0}" declares method "{1}" as well \ + as "{2}" for handling the same "{3}" callback. +unloadable-provider: WARNING: Unable to load persistence provider "{0}" due \ + to "{1}" +unrecognized-provider: WARNING: Found unrecognized persistence provider "{0}" \ + in place of OpenJPA provider. This provider''s properties will not be used. +cant-convert-brokerfactory: Unable to convert EntityManagerFactory of type \ + "{0}" into a BrokerFactory. +cant-convert-broker: Unable to convert EntityManager of type "{0}" into a \ + Broker. +map-persistent-type-names: Mapping resource location "{0}" to persistent \ + types "{1}". +map-persistent-types-skipping-non-url: Skipping persistent type location \ + association for location "{0}" since it is not a URL. +map-persistent-types-skipping-class: Skipping persistent type location \ + association for location "{0}" since it is a class, and will not \ + need to be re-parsed later. +no-setter-for-getter: No setter was found for method {0} in type {1} while \ + searching for persistent properties. This method will be ignored. If you \ + intended for this to be persistent, please add a corresponding setter, \ + or switch to field access for this type hierarchy. +transformer-registration-error: An error occurred while registering a \ + ClassTransformer with {0}. The error has been consumed. To see it, set \ + your openjpa.Runtime log level to TRACE. Load-time class transformation \ + will not be available. +transformer-registration-error-ex: An error occurred while registering a \ + ClassTransformer with {0}. The error is logged along with this warning. \ + Load-time class transformation will not be available. + +EntityManagerFactory-name: EntityManagerFactory implementation +EntityManagerFactory-desc: Allows extension of standard \ + org.apache.openjpa.persistence.EntityManagerFactoryImpl for custom behavior. +EntityManagerFactory-type: General +EntityManagerFactory-cat: Persistence.Advanced +EntityManagerFactory-displayorder: 50 +EntityManagerFactory-expert: true +EntityManagerFactory-interface: org.apache.openjpa.persistence.EntityManagerFactoryImpl +param-style-mismatch: Query "{0}" is declared with named parameters "{1}" but \ + actual parameters "{2}" are bound by position. +param-missing: Parameter "{0}" declared in "{1}" but is missing from the bound \ + parameters "{2}". +param-extra: Parameter "{0}" is bound to "{1}" but is missing from the \ + declared parameters "{2}". +param-type-mismatch: Parameter "{0}" declared in "{1}" is set to value of \ + "{2}" of type "{3}", but this parameter is bound to a field of type "{4}". +param-type-null: Parameter "{0}" declared in "{1}" is set to null, \ + but this parameter is bound to a field of primitive type "{2}". +version-check-error: An error occurred while attempting to determine the \ + version of "{0}". +no-result: Query "{0}" selected no result, but expected unique result. +non-unique-result: Query "{0}" selected {1} results, but expected unique result. +unwrap-em-invalid: EntityManager can not be unwrapped to an instance of "{0}". +unwrap-query-invalid: Query can not be unwrapped to an instance of "{0}". +invalid_entity_argument: Object being locked must be an valid and not detached \ + entity. +bad-lock-level: Invalid lock mode/level. Valid values are \ + "none"(0), "optimistic"(10), "optimistic-force-increment"(20), \ + "pessimistic-read"(30), "pessimistic-write"(40) or \ + "pessimistic-force-increment"(50). Specified value: {0}.
Modified: openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml?rev=762161&r1=762160&r2=762161&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml (original) +++ openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml Sun Apr 5 21:29:42 2009 @@ -814,6 +814,40 @@ </programlisting> </example> </section> + <section id="multi-hints-handling"> + <title> + Handling of Multiple Similar Query Hints + </title> + <para> +When similar hints in different prefix scopes are specified in a query, +the following prefix precedence order is used to select the effective hint: + <itemizedlist> + <listitem> +javax.persistence.* + </listitem> + <listitem> +openjpa.FetchPlan.* + </listitem> + <listitem> +openjpa.jdbc.* + </listitem> + <listitem> +openjpa.* + </listitem> + </itemizedlist> + <example id="multi-hints-example"> +<programlisting> +... +Query q = em.createQuery(.....); +q.setHint("openjpa.FetchPlan.LockTimeout", 1000); +q.setHint("javax.persistence.lock.timeout", 2000); +q.setHint("openjpa.LockTimeout", 3000); +// Lock time out of 2000 ms is in effect for query q +... +</programlisting> + </example> + </para> + </section> </section> <section id="jpa_overview_query_ordering"> <title>
