• Post Reply Bookmark Topic Watch Topic
  • New Topic

Who use sql-mapping with java.util.regex?

 
lyo Yashnoo
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:
I use the IBatis SQL-Mapping and I think it is very good.Now I want to add the search function to my BBS forum.I also want to display the content high light like jive.I mean that if I want to find the string "ibatis",then the search result "ibatis" will be high light displayed.
So I must use the java.util.regex in jsdk1.4.But the problem is that what I get is a List if I use sql-mapping.For example:
///////////////////////////////////////////////////////////
String resource="conf/XML/sql/lyo-sql-map.xml";
Reader reader=Resources.getResourceAsReader(resource);
sqlmap=XmlSqlMapBuilder.buildSqlMap(reader);

List articlelist=sqlmap.executeQueryForList("selectSiteArticle","%"+icontent+"%");
///////////////////////////////////////////////////////////////
The result I get is a List and I have no time to use regex.
I don't know whether I could do this:
Iterate the List,use the regex and later place all the object back to the List.
It's right?
How to use regex with sql-mapping?Thks :roll:
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I'm sure exactly where this belongs, but it's certainly not a JSP question. I'm going to move it off to Other Java APIs so please continue any discussion there.
bear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!