Package net.sf.logsaw.core.field

Examples of net.sf.logsaw.core.field.LogEntryFieldVisitorAdapter


      /* (non-Javadoc)
       * @see net.sf.logsaw.core.query.IRestrictionVisitor#visit(net.sf.logsaw.core.query.DateRestriction)
       */
      @Override
      public void visit(final DateRestriction restriction) {
        ILogEntryFieldVisitor visitor = new LogEntryFieldVisitorAdapter() {
          /* (non-Javadoc)
           * @see net.sf.logsaw.core.model.LogEntryFieldVisitorAdapter#visit(net.sf.logsaw.core.model.DateLogEntryField)
           */
          @Override
          public void visit(DateLogEntryField fld) {
            if (restriction.getOperator().equals(Operators.OPERATOR_BEFORE)) {
              query.add(NumericRangeQuery.newLongRange(
                  fld.getKey(), null,
                  fld.toIndexedValue(restriction.getValue()),
                  false, false), Occur.MUST);
            } else if (restriction.getOperator().equals(Operators.OPERATOR_AFTER)) {
              query.add(NumericRangeQuery.newLongRange(
                  fld.getKey(),
                  fld.toIndexedValue(restriction.getValue()), null,
                  false, false), Occur.MUST);
            }
          }
        };
        restriction.getField().visit(visitor);
      }

      /* (non-Javadoc)
       * @see net.sf.logsaw.core.query.IRestrictionVisitor#visit(net.sf.logsaw.core.query.LevelRestriction)
       */
      @Override
      public void visit(final LevelRestriction restriction) {
        ILogEntryFieldVisitor visitor = new LogEntryFieldVisitorAdapter() {
          /* (non-Javadoc)
           * @see net.sf.logsaw.core.model.LogEntryFieldVisitorAdapter#visit(net.sf.logsaw.core.model.LevelLogEntryField)
           */
          @Override
          public void visit(LevelLogEntryField fld) {
View Full Code Here

TOP

Related Classes of net.sf.logsaw.core.field.LogEntryFieldVisitorAdapter

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.