[Seasar-user:17664] Re: [dbflute-ignoreCase in conditionBean]使い方法

thomas [E-MAIL ADDRESS DELETED]
2009年 6月 9日 (火) 19:47:18 JST


hai,

I upgraded my dbflute to 0.9.5.

EmployeemasterCB empCB = employeemasterBhv.newMyConditionBean();
        empCB.query().setEmployeecode_LikeSearch("emp", new
LikeSearchOption() {
            @Override
            public ExtensionOperand getExtensionOperand() {
                return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
            }
        }.likePrefix());

if i give "emp" as search condition it retrieves only The values starts with
emp.

InMy table i have the values

emp22
EMP22
emp20
EMP20
.........
.........
..........

The above coding retrieves only emp22 and emp20
I want to retrieve EMP22 and EMP20 also.


Thanks
トマス



2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>

> hai,
>
> Thanks for your helps!..
>
>
>
>
> On Tue, Jun 9, 2009 at 6:00 PM, kubo <[E-MAIL ADDRESS DELETED]> wrote:
>
>> Hello,
>>
>> Sorry! I mistook your DBFlute version.
>> The method and class are supported since 0.9.5.
>> So please upgrade DBFlute to 0.9.5 if possible.
>>
>> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
>> > hai,
>> >
>> > cb.query().setMemberName_
>> >>
>> >> LikeSearch("s", new LikeSearchOption() {
>> >>    @Override
>> >>    public ExtensionOperand getExtensionOperand() {
>> >>        return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
>> >>    }
>> >> }.likePrefix());
>> >
>> > import org.seasar.dbflute.dbway.ExtensionOperand;//Error
>> >
>> > there is no class in org.seasar.dbflute.dbway like ExtensionOperand
>> >
>> >
>> >
>> > 2009/6/9 kubo <[E-MAIL ADDRESS DELETED]>
>> >>
>> >> Hello,
>> >>
>> >> Please watch this test case:
>> >> The method is 'test_likeSearch_caseInsensitive_Tx()'.
>> >>
>> >>
>> >>
>> https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-postgresql-example/src/test/java/com/example/dbflute/postgresql/dbflute/various/VendorCheckTest.java
>> >>
>> >> cb.query().setMemberName_LikeSearch("s", new LikeSearchOption() {
>> >>    @Override
>> >>    public ExtensionOperand getExtensionOperand() {
>> >>        return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
>> >>    }
>> >> }.likePrefix());
>> >>
>> >> This code uses 'ilike' in the SQL.
>> >> (But this way is only available at PostgreSQL)
>> >>
>> >> If you have many many points that must be without case sensitive,
>> >> you should create CaseInsensitiveLikeSearchOption as your original
>> class.
>> >> Like this:
>> >>
>> >> public class CaseInsensitiveLikeSearchOption extends LikeSearchOption {
>> >>    @Override
>> >>    public ExtensionOperand getExtensionOperand() {
>> >>        return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
>> >>    }
>> >> }
>> >>
>> >> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
>> >> > Hai,
>> >> >
>> >> > I am using PostgresQL 8.3
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > 2009/6/9 kubo <[E-MAIL ADDRESS DELETED]>
>> >> >>
>> >> >> Hello, this is jflute.
>> >> >>
>> >> >> For starters, there is one thing I want to confirm.
>> >> >> What kind of database do you use?
>> >> >> Oracle? MySQL? PostgreSQL? ...
>> >> >>
>> >> >> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
>> >> >> > Hai,
>> >> >> >
>> >> >> > I want to retrieve data without case sensitive using condition
>> Bean.
>> >> >> >
>> >> >> > dbflute version 0.9.4.1
>> >> >> >
>> >> >> > empCB.query().setEmployeecode_LikeSearch(empcodes,new
>> >> >> > LikeSearchOption());
>> >> >> >
>> >> >> > How to change this code to get case sensitive result?
>> >> >> >
>> >> >> > Please give steps to achieve this...
>> >> >> >
>> >> >> > Thanks in advance.
>> >> >> > トマス
>> >> >> >
>> >> >> >
>> >> >> > _______________________________________________
>> >> >> > Seasar-user mailing list
>> >> >> > [E-MAIL ADDRESS DELETED]
>> >> >> > https://ml.seasar.org/mailman/listinfo/seasar-user
>> >> >> >
>> >> >> >
>> >> >> _______________________________________________
>> >> >> Seasar-user mailing list
>> >> >> [E-MAIL ADDRESS DELETED]
>> >> >> https://ml.seasar.org/mailman/listinfo/seasar-user
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Seasar-user mailing list
>> >> > [E-MAIL ADDRESS DELETED]
>> >> > https://ml.seasar.org/mailman/listinfo/seasar-user
>> >> >
>> >> >
>> >> _______________________________________________
>> >> Seasar-user mailing list
>> >> [E-MAIL ADDRESS DELETED]
>> >> https://ml.seasar.org/mailman/listinfo/seasar-user
>> >
>> >
>> > _______________________________________________
>> > Seasar-user mailing list
>> > [E-MAIL ADDRESS DELETED]
>> > https://ml.seasar.org/mailman/listinfo/seasar-user
>> >
>> >
>> _______________________________________________
>> Seasar-user mailing list
>> [E-MAIL ADDRESS DELETED]
>> https://ml.seasar.org/mailman/listinfo/seasar-user
>>
>
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20090609/cb859fd3/attachment.html>


Seasar-user メーリングリストの案内