[ http://issues.apache.org/jira/browse/JUDDI-65?page=history ]
Steve Viens closed JUDDI-65:
----------------------------
Resolution: Fixed
Recommended patch applied and tested.
> Searching for Business & Service by LANG_CODE shouldn't require exact match
> ---------------------------------------------------------------------------
>
> Key: JUDDI-65
> URL: http://issues.apache.org/jira/browse/JUDDI-65
> Project: jUDDI
> Type: Bug
> Versions: 0.9rc1, 0.9rc2, 0.9rc3
> Reporter: Steve Viens
> Assignee: Steve Viens
> Fix For: 0.9
>
> Searching for Business & Service by LANG_CODE shouldn't require an exact
> match. Right now when searching for a BusinessEntity or BusinessService using
> name and lang code the lang value used in the search must match the lang
> value in the registry exactly.
> For example, if two BusinessEntities exist and have names saved with language
> codes of "en_US" and "en_UK" respectively ... when searching for
> BusinessEntities using a language code of "en" both of these businessEntities
> should returned. Currently neither will be returned because the language code
> values in the registry do not match the language code value used in the
> search 'exactly'.
> To fix this edit the source of the following two classes:
> o.a.j.datastore.jdbc.FindBusinessByNameQuery.java
> o.a.j.datastore.jdbc.FindServiceByNameQuery.java
> And replace this:
> if ((lang != null) && (lang.length() > 0))
> {
> sql.append(" AND LANG_CODE = ?");
> sql.addValue(lang);
> }
> With this:
> // If lang is "en" we'll need to match with "en", "en_US" or "en_UK"
> if ((lang != null) && (lang.length() > 0))
> {
> sql.append(" AND (UPPER(LANG_CODE) LIKE ?)");
> sql.addValue(lang.toUpperCase()+"%");
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira