Package org.opencustomer.framework.db.util.engine.configuration

Examples of org.opencustomer.framework.db.util.engine.configuration.DateSearch


                ListSelectSearch search = (ListSelectSearch)column.getSearch();
               
                if(search.getValue() != null)
                    dynamicRestrictions.add(new Restriction(search.getSearchProperty()+" = {0}", property.isGroup(), search.getValue()));
            } else if(column.getSearch() instanceof DateSearch) {
                DateSearch search = (DateSearch)column.getSearch();
               
                Date start = search.getValueStart();
                Date end   = search.getValueEnd();
                if(end != null) {
                    Calendar cal = GregorianCalendar.getInstance();
                    cal.setTime(end);
                    cal.add(Calendar.DAY_OF_MONTH, 1);
                    cal.add(Calendar.SECOND, -1);
View Full Code Here


                        builder.append(" name=\"search_").append(column.getPosition()).append("\"");
                        builder.append(" id=\"search_").append(column.getPosition()).append("\"");
                        builder.append(" value=\"").append(search.getValue() == null ? "" : search.getValue()).append("\"");
                        builder.append("/>");
                    } else if(column.getSearch() instanceof DateSearch) {
                        DateSearch search = (DateSearch)column.getSearch();
                       
                        SimpleDateFormat sdf = new SimpleDateFormat(resources.getMessage(locale, search.getFormatKey()));
                       
                        builder.append("<input");
                        builder.append(" type=\"text\"");
                        if(settings.getProperty(HALF_INPUT_CLASS) != null) {
                            builder.append(" class=\"").append(settings.getProperty(HALF_INPUT_CLASS)).append("\"");
                        }
                        builder.append(" name=\"search_").append(column.getPosition()).append("_start\"");
                        builder.append(" id=\"search_").append(column.getPosition()).append("_start\"");
                        builder.append(" value=\"").append(search.getValueStart() == null ? "" : sdf.format(search.getValueStart())).append("\"");
                        builder.append("/>");
                       
                        builder.append("<input");
                        builder.append(" type=\"text\"");
                        if(settings.getProperty(HALF_INPUT_CLASS) != null) {
                            builder.append(" class=\"").append(settings.getProperty(HALF_INPUT_CLASS)).append("\"");
                        }
                        builder.append(" name=\"search_").append(column.getPosition()).append("_end\"");
                        builder.append(" id=\"search_").append(column.getPosition()).append("_end\"");
                        builder.append(" value=\"").append(search.getValueEnd() == null ? "" : sdf.format(search.getValueEnd())).append("\"");
                        builder.append("/>");
                    }
                    builder.append("</td>");
                    builder.append("</tr>");
                    builder.append("</table>");
View Full Code Here

                            throw new TableEngineException("could get attribute 'class'", e);
                        }
                    } else if("text".equals(attributeNode.getNodeValue())) {
                        search = new TextSearch(attributes.getNamedItem("pattern").getNodeValue());
                    } else if("date".equals(attributeNode.getNodeValue())) {
                        search = new DateSearch(attributes.getNamedItem("formatKey").getNodeValue());
                    } else if("text.select".equals(attributeNode.getNodeValue())) {
                        TextSelectSearch textSelectSearch = new TextSelectSearch();
                        if(attributes.getNamedItem("hql") != null)
                            textSelectSearch.setHql(attributes.getNamedItem("hql").getNodeValue().equalsIgnoreCase("true") ? true : false);
                       
View Full Code Here

TOP

Related Classes of org.opencustomer.framework.db.util.engine.configuration.DateSearch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.