[Seasar-user:17713] Re: [dbflute-OR condition in conditionBean]使い方法
thomas
[E-MAIL ADDRESS DELETED]
2009年 6月 11日 (木) 18:34:24 JST
Hello,
Thanks for your help.
I achieved it...
Regards,
トマス
On Thu, Jun 11, 2009 at 5:19 PM, kubo <[E-MAIL ADDRESS DELETED]> wrote:
> Hello, this is jflute.
>
> > select * from employeemaster where (employeenamekanji ilike 'asd%' or
> > employeefirstname ilike 'og%') and deleteflg=false
> >
> > How can i achieve in conditionBean.
> >
> > can i use Union for these.Please give some tips..
>
> Please use Union and you can achieve.
> Like this:
>
> EmployeeMasterCB cb = new EmployeeMasterCB();
> cb.query().setEmployeeNameKanji(...);
> cb.query().setDeleteFlg_Equal_True();
> cb.union(new UnionQuery<EmployeeMasterCB>() {
> public void query(EmployeeMasterCB unionCB) {
> unionCB.query().setEmployeeFirstName(...);
> unionCB.query().setDeleteFlg_Equal_True();
> }
> });
>
> The method "test_union_Tx()" may be a help.
>
> https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-basic-example/src/test/java/com/example/dbflute/basic/dbflute/howto/jp/BehaviorMiddleTest.java
>
> 2009/6/11 thomas <[E-MAIL ADDRESS DELETED]>:
> > hai,
> >
> > I have one more query.
> >
> > How can i use OR condition in CBean
> >
> > select * from employeemaster where (employeenamekanji ilike 'asd%' or
> > employeefirstname ilike 'og%') and deleteflg=false
> >
> > How can i achieve in conditionBean.
> >
> > can i use Union for these.Please give some tips..
> >
> > Thanks,
> > トマス
> >
> >
> > On 6/10/09, kubo <[E-MAIL ADDRESS DELETED]> wrote:
> >> Hello,
> >>
> >>> After changing the version of my dbflute-runtime i got ilike in SQL
> log.
> >>
> >> Oh, OK. I'm happy.
> >> Thanks
> >>
> >>
> >> #
> >> # I'm sorry that DBFlute documents are written in Japanese.
> >> # Though I want to write in English at the future,
> >> # It may take a lot of time.
> >> #
> >>
> >> On Wed, Jun 10, 2009 at 7:20 PM, kubo<[E-MAIL ADDRESS DELETED]> wrote:
> >>> Hello,
> >>>
> >>> Thank you for confirming.
> >>>
> >>>> i got the following Exception.
> >>> That means that Framework calls the method.
> >>> It is right result.
> >>>
> >>>> I have the following file in my lib folder
> >>>>
> >>>> WEB-INF/lib
> >>>> |-dbflute-runtime.jar
> >>>> |-other...jar
> >>>>
> >>>> whether i have to replace dbflute-runtime.jar with
> >>>> dbflute-runtime.jar-0.9.5?
> >>>
> >>> Is that dbflute-runtime.jar 0.9.5?
> >>> (How did you upgrade DBFlute to 0.9.5?)
> >>>
> >>> This dbflute-runtime.jar should be 0.9.5.
> >>> Download dbflute-runtime-0.9.5.jar from this:
> >>>
> http://maven.seasar.org/maven2/org/seasar/dbflute/dbflute-runtime/0.9.5/dbflute-runtime-0.9.5.jar
> >>> And then replace dbflute-runtime.jar with dbflute-runtime-0.9.5.jar.
> >>> And try again(selectPage()).
> >>>
> >>>
> >>>
> >>> 2009/6/10 thomas <[E-MAIL ADDRESS DELETED]>:
> >>>> Hai
> >>>> i got the following Exception.
> >>>>
> >>>> DEBUG 2009-06-10 18:20:54,171 [http-8080-1] END
> >>>> projectmgnt.web.employeemaster.EmployeemasterListPage#prerender()
> >>>> Throwable:java.lang.IllegalStateException
> >>>> DEBUG 2009-06-10 18:20:54,203 [http-8080-1]
> >>>> java.lang.IllegalStateException
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$1.getExtensionOperand(EmployeemasterListPage.java:127)
> >>>> at
> >>>>
> org.seasar.dbflute.cbean.ckey.ConditionKeyLikeSearch.doAddWhereClause(ConditionKeyLikeSearch.java:83)
> >>>> at
> >>>>
> org.seasar.dbflute.cbean.ckey.ConditionKey.addWhereClause(ConditionKey.java:127)
> >>>> at
> >>>>
> org.seasar.dbflute.cbean.sqlclause.AbstractSqlClause.registerWhereClause(AbstractSqlClause.java:770)
> >>>> at
> >>>>
> org.seasar.dbflute.cbean.AbstractConditionQuery.setupConditionValueAndRegisterWhereClause(AbstractConditionQuery.java:1347)
> >>>> at
> >>>>
> org.seasar.dbflute.cbean.AbstractConditionQuery.registerLikeSearchQuery(AbstractConditionQuery.java:489)
> >>>> at
> >>>>
> org.seasar.dbflute.cbean.AbstractConditionQuery.regLSQ(AbstractConditionQuery.java:467)
> >>>> at
> >>>>
> projectmgnt.dbflute.cbean.cq.bs.AbstractBsEmployeemasterCQ.setEmployeecode_LikeSearch(AbstractBsEmployeemasterCQ.java:126)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage.prerender(EmployeemasterListPage.java:124)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990.$$prerender$$invokeSuperMethod$$(EmployeemasterListPage$$EnhancedByS2AOP$$d8d990.java)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990$$MethodInvocation$$prerender4.proceed(MethodInvocationClassGenerator.java)
> >>>> at
> >>>>
> org.seasar.extension.tx.DefaultTransactionCallback.execute(DefaultTransactionCallback.java:58)
> >>>> at
> >>>>
> org.seasar.extension.tx.adapter.JTATransactionManagerAdapter.required(JTATransactionManagerAdapter.java:65)
> >>>> at
> >>>>
> org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:41)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990$$MethodInvocation$$prerender4.proceed(MethodInvocationClassGenerator.java)
> >>>> at
> >>>>
> org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:77)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990$$MethodInvocation$$prerender4.proceed(MethodInvocationClassGenerator.java)
> >>>> at
> >>>>
> projectmgnt.interceptor.LoginUserInterceptor.invoke(LoginUserInterceptor.java:48)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990$$MethodInvocation$$prerender4.proceed(MethodInvocationClassGenerator.java)
> >>>> at
> >>>>
> projectmgnt.interceptor.LoginAuthInterceptor.invoke(LoginAuthInterceptor.java:46)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990$$MethodInvocation$$prerender4.proceed(MethodInvocationClassGenerator.java)
> >>>> at
> >>>>
> org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:73)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990$$MethodInvocation$$prerender4.proceed(MethodInvocationClassGenerator.java)
> >>>> at
> >>>>
> projectmgnt.web.employeemaster.EmployeemasterListPage$$EnhancedByS2AOP$$d8d990.prerender(EmployeemasterListPage$$EnhancedByS2AOP$$d8d990.java)
> >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >>>> at java.lang.reflect.Method.invoke(Unknown Source)
> >>>> at org.seasar.framework.util.MethodUtil.invoke(MethodUtil.java:93)
> >>>> at
> >>>>
> org.seasar.framework.beans.impl.BeanDescImpl.invoke(BeanDescImpl.java:213)
> >>>> at
> >>>>
> org.seasar.teeda.extension.html.impl.HtmlComponentInvokerImpl.invoke(HtmlComponentInvokerImpl.java:163)
> >>>> at
> >>>>
> org.seasar.teeda.extension.html.impl.HtmlComponentInvokerImpl.invokePrerender(HtmlComponentInvokerImpl.java:138)
> >>>> at
> >>>>
> org.seasar.teeda.extension.render.TViewRootRenderer.invoke(TViewRootRenderer.java:101)
> >>>> at
> >>>>
> org.seasar.teeda.extension.render.TViewRootRenderer.invokeAll(TViewRootRenderer.java:81)
> >>>> at
> >>>>
> org.seasar.teeda.extension.render.TViewRootRenderer.encodeBegin(TViewRootRenderer.java:61)
> >>>> at
> >>>>
> javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:330)
> >>>> at
> javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:100)
> >>>> at
> >>>> javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:247)
> >>>> at
> >>>> javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:184)
> >>>> at
> >>>>
> org.seasar.teeda.extension.taglib.TViewTag.doStartTag(TViewTag.java:98)
> >>>> at
> >>>>
> org.seasar.teeda.extension.html.processor.ElementProcessorImpl.processTag(ElementProcessorImpl.java:145)
> >>>> at
> >>>>
> org.seasar.teeda.extension.html.processor.ElementProcessorImpl.process(ElementProcessorImpl.java:138)
> >>>> at
> >>>>
> org.seasar.teeda.extension.html.processor.ElementProcessorImpl.process(ElementProcessorImpl.java:119)
> >>>> at
> >>>>
> org.seasar.teeda.extension.html.impl.HtmlViewHandler.renderView(HtmlViewHandler.java:157)
> >>>> at
> >>>>
> org.seasar.teeda.extension.html.impl.HtmlViewHandler.renderView(HtmlViewHandler.java:143)
> >>>> at
> >>>>
> org.seasar.teeda.core.lifecycle.impl.RenderResponsePhase.executePhase(RenderResponsePhase.java:39)
> >>>> at
> >>>>
> org.seasar.teeda.core.lifecycle.AbstractPhase.execute(AbstractPhase.java:57)
> >>>> at
> >>>>
> org.seasar.teeda.core.lifecycle.LifecycleImpl.render(LifecycleImpl.java:131)
> >>>> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:101)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >>>> at
> >>>> projectmgnt.util.RequestDumpFilter.doFilter(RequestDumpFilter.java:74)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >>>> at
> >>>>
> org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:63)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >>>> at
> >>>>
> org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:77)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >>>> at
> >>>>
> org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:69)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> >>>> at
> >>>>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >>>> at
> >>>>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> >>>> at
> >>>>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> >>>> at
> >>>>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> >>>> at
> >>>>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> >>>> at
> >>>>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >>>> at
> >>>>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
> >>>> at
> >>>>
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> >>>> at
> >>>>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
> >>>> at
> >>>>
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> >>>> at java.lang.Thread.run(Unknown Source)
> >>>>
> >>>> I have the following file in my lib folder
> >>>>
> >>>> WEB-INF/lib
> >>>> |-dbflute-runtime.jar
> >>>> |-other...jar
> >>>>
> >>>>
> >>>>
> >>>> whether i have to replace dbflute-runtime.jar with
> >>>> dbflute-runtime.jar-0.9.5?
> >>>>
> >>>> Regards,
> >>>> トマス
> >>>>
> >>>>
> >>>> On Wed, Jun 10, 2009 at 5:47 PM, kubo <[E-MAIL ADDRESS DELETED]> wrote:
> >>>>>
> >>>>> Hello,
> >>>>>
> >>>>> Thanks you for watching your log.
> >>>>> The problem is that the code doesn't use 'ilike'.
> >>>>> Now I don't know why the code doesn't...
> >>>>> (Because the example works well)
> >>>>>
> >>>>> There are several things I want to confirm...
> >>>>>
> >>>>>
> >>>>> 1. Does this code throw the exception?
> >>>>>
> >>>>> empCB.query().setEmployeecode_LikeSearch("emp", new
> LikeSearchOption()
> >>>>> {
> >>>>> @Override
> >>>>> public ExtensionOperand getExtensionOperand() {
> >>>>> throw new IllegalStateException();
> >>>>> //return WayOfPostgreSQL.OperandOfLikeSearch.CASE_INSENSITIVE;
> >>>>> }
> >>>>> }.likePrefix());
> >>>>>
> >>>>> *I want to confirm that the method is called by DBFlute Framework.
> >>>>>
> >>>>>
> >>>>> 2. Is dbflute-runtime-0.9.5.jar valid on your Runtime Environment
> >>>>> (Did you remove an old jar file 'dbflute-runtime-0.9.4.1.jar' from
> >>>>> Runtime Environment?)
> >>>>>
> >>>>> For example:
> >>>>>
> >>>>> {o}
> >>>>> WEB-INF/lib
> >>>>> |-dbflute-runtime-0.9.5.jar
> >>>>> |-other...jar
> >>>>>
> >>>>> {x}
> >>>>> WEB-INF/lib
> >>>>> |-dbflute-runtime-0.9.4.1.jar
> >>>>> |-dbflute-runtime-0.9.5.jar
> >>>>> |-other...jar
> >>>>>
> >>>>>
> >>>>>
> >>>>> 2009/6/10 thomas <[E-MAIL ADDRESS DELETED]>:
> >>>>> > Hai,
> >>>>> >
> >>>>> > it uses like in SQL not ilike.
> >>>>> >
> >>>>> >
> >>>>> > EmployeemasterBhv.selectPage():paging()
> >>>>> > DEBUG 2009-06-10 17:03:23,437
> >>>>> > [http-8080-1]
> >>>>> > ======================================/
> >>>>> > DEBUG 2009-06-10 17:03:23,437 [http-8080-1]
> >>>>> > EmployeemasterListPage.prerender():154 -->
> >>>>> > EmployeemasterBhv.selectPage()
> >>>>> > --> ...
> >>>>> > DEBUG 2009-06-10 17:03:23,437 [http-8080-1]
> >>>>> > 論理的なコネクションを取得しました。tx=[FormatId=4360, GlobalId=1244620931796/5,
> >>>>> > BranchId=]
> >>>>> > DEBUG 2009-06-10 17:03:23,437 [http-8080-1]
> >>>>> > select dflocal.deleteflg as c1, dflocal.costrank as c2,
> >>>>> > dflocal.address1
> >>>>> > as
> >>>>> > c3, dflocal.address2 as c4, dflocal.postalcode as c5,
> >>>>> > dflocal.lastupdated as
> >>>>> > c6, dflocal.employeecode as c7, dflocal.employeenamekanji as c8,
> >>>>> > dflocal.employeenamekana as c9, dflocal.employeefirstname as c10,
> >>>>> > dflocal.employeelastname as c11, dflocal.dob as c12, dflocal.age as
> >>>>> > c13,
> >>>>> > dflocal.joiningdate as c14, dflocal.designation as c15,
> >>>>> > dflocal.joblevel
> >>>>> > as
> >>>>> > c16, dflocal.yearofexperience as c17, dflocal.housephoneno as c18,
> >>>>> > dflocal.mobilephoneno as c19, dflocal.email as c20,
> >>>>> > dflocal.terminationdate
> >>>>> > as c21, dflocal.registerdate as c22
> >>>>> > from employeemaster dflocal
> >>>>> > where dflocal.employeecode like 'emp%' escape '|'
> >>>>> > offset 0 limit 10
> >>>>> >
> >>>>> >
> >>>>> > Regards,
> >>>>> > トマス
> >>>>> >
> >>>>> >
> >>>>> > On Tue, Jun 9, 2009 at 8:03 PM, kubo <[E-MAIL ADDRESS DELETED]> wrote:
> >>>>> >>
> >>>>> >> Hello,
> >>>>> >>
> >>>>> >> Please confirm your SQL on console log.
> >>>>> >> Does the SQL use 'ilike'?
> >>>>> >> (where EMPLOYEE_CODE ilike 'emp%')
> >>>>> >>
> >>>>> >> 2009/6/9 thomas <[E-MAIL ADDRESS DELETED]>:
> >>>>> >> > 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
> >>>>> >> >>
> >>>>> >> >
> >>>>> >> >
> >>>>> >> > _______________________________________________
> >>>>> >> > 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
> >>
> > _______________________________________________
> > 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/20090611/c14c1bc0/attachment.html>
Seasar-user メーリングリストの案内