com.trackstudio.app.filter
Class AbstractFilter

java.lang.Object
  extended by com.trackstudio.app.filter.AbstractFilter
Direct Known Subclasses:
AbstractComparator, MessageFilter, TaskFilter, UserFilter

public abstract class AbstractFilter
extends java.lang.Object


Field Summary
static java.lang.String BA
           
static java.lang.String CURRENT_USER_ID
           
static java.lang.String EL
           
static java.lang.String EMPTY
           
static java.lang.String IAND_MANAGER
           
static java.lang.String IAND_MANAGERS
           
static java.lang.String IAND_SUB_USERS
           
protected static org.apache.commons.logging.Log log
           
static java.lang.String ZERO
           
 
Constructor Summary
AbstractFilter()
           
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
           
 int compareObject(java.lang.Object value1, java.lang.Object value2)
           
 int compareTreeSet(java.util.TreeSet value1, java.util.TreeSet value2)
           
static boolean emptyOperand(java.lang.String propertyValue)
           
static int getOffset(java.lang.String propertyString)
           
 boolean passUdf(FValue fv, AbstractBeanWithUdf bean, java.util.ArrayList useForUdf)
           
 boolean testCheckBox(FValue flt, java.lang.String property, boolean databaseValue)
          Test filter condition and CheckBox value set: value "on" unset: no property, no value
 boolean testFloat(FValue flt, java.lang.String property, java.lang.Double databaseValue)
          Returns true when value pass the filter and false otherwise Fvalue coding: <=5: '5' >=5: '_5' <>5: '_ne_5' ==5: '_eq_5'
 boolean testInteger(FValue flt, java.lang.String property, java.lang.Integer databaseValue)
          Returns true when value pass the filter and false otherwise Fvalue coding: <=5: '5' >=5: '_5' <>5: '_ne_5' ==5: '_eq_5'
 boolean testList(FValue flt, java.lang.String property, java.lang.Object databaseValue)
          Test filter condition and List value Fvalue coding: is All: '0' is not All: 0 is new: '1' is not new: '_1' new&processed: '1&2'
 boolean testMultiList(FValue flt, java.lang.String property, java.lang.Object databaseValue)
           
 boolean testString(FValue flt, java.lang.String property, java.lang.String databaseValue)
          Returns true when value pass the filter and false otherwise Fvalue coding: contains TEST: 'TEST' start with TEST: '_TEST' equals TEST: '_eq_TEST' not equals TEST: '_ne_TEST'
 boolean testTimestamp(FValue flt, java.lang.String property, java.util.Calendar databaseValue)
          Test filter condition and Timestamp value
 boolean testURL(FValue flt, java.lang.String property, java.lang.String strValue)
           
 boolean testUser(FValue flt, java.lang.String property, java.lang.String databaseValue, java.lang.String userid)
           
 boolean testUserList(FValue flt, java.lang.String property, java.lang.Object databaseValue, java.lang.String currentUser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

BA

public static final java.lang.String BA
See Also:
Constant Field Values

EL

public static final java.lang.String EL
See Also:
Constant Field Values

EMPTY

public static final java.lang.String EMPTY
See Also:
Constant Field Values

ZERO

public static final java.lang.String ZERO
See Also:
Constant Field Values

CURRENT_USER_ID

public static final java.lang.String CURRENT_USER_ID
See Also:
Constant Field Values

IAND_SUB_USERS

public static final java.lang.String IAND_SUB_USERS
See Also:
Constant Field Values

IAND_MANAGER

public static final java.lang.String IAND_MANAGER
See Also:
Constant Field Values

IAND_MANAGERS

public static final java.lang.String IAND_MANAGERS
See Also:
Constant Field Values
Constructor Detail

AbstractFilter

public AbstractFilter()
Method Detail

passUdf

public boolean passUdf(FValue fv,
                       AbstractBeanWithUdf bean,
                       java.util.ArrayList useForUdf)
                throws GranException
Throws:
GranException

compare

public int compare(java.lang.Object a,
                   java.lang.Object b)

compareTreeSet

public int compareTreeSet(java.util.TreeSet value1,
                          java.util.TreeSet value2)

compareObject

public int compareObject(java.lang.Object value1,
                         java.lang.Object value2)

testInteger

public boolean testInteger(FValue flt,
                           java.lang.String property,
                           java.lang.Integer databaseValue)
Returns true when value pass the filter and false otherwise Fvalue coding: <=5: '5' >=5: '_5' <>5: '_ne_5' ==5: '_eq_5'


testString

public boolean testString(FValue flt,
                          java.lang.String property,
                          java.lang.String databaseValue)
Returns true when value pass the filter and false otherwise Fvalue coding: contains TEST: 'TEST' start with TEST: '_TEST' equals TEST: '_eq_TEST' not equals TEST: '_ne_TEST'


testURL

public boolean testURL(FValue flt,
                       java.lang.String property,
                       java.lang.String strValue)

testFloat

public boolean testFloat(FValue flt,
                         java.lang.String property,
                         java.lang.Double databaseValue)
Returns true when value pass the filter and false otherwise Fvalue coding: <=5: '5' >=5: '_5' <>5: '_ne_5' ==5: '_eq_5'


testCheckBox

public boolean testCheckBox(FValue flt,
                            java.lang.String property,
                            boolean databaseValue)
Test filter condition and CheckBox value set: value "on" unset: no property, no value


testTimestamp

public boolean testTimestamp(FValue flt,
                             java.lang.String property,
                             java.util.Calendar databaseValue)
Test filter condition and Timestamp value


testList

public boolean testList(FValue flt,
                        java.lang.String property,
                        java.lang.Object databaseValue)
Test filter condition and List value Fvalue coding: is All: '0' is not All: 0 is new: '1' is not new: '_1' new&processed: '1&2'


testMultiList

public boolean testMultiList(FValue flt,
                             java.lang.String property,
                             java.lang.Object databaseValue)

testUserList

public boolean testUserList(FValue flt,
                            java.lang.String property,
                            java.lang.Object databaseValue,
                            java.lang.String currentUser)
                     throws GranException
Throws:
GranException

testUser

public boolean testUser(FValue flt,
                        java.lang.String property,
                        java.lang.String databaseValue,
                        java.lang.String userid)
                 throws GranException
Throws:
GranException

getOffset

public static int getOffset(java.lang.String propertyString)

emptyOperand

public static boolean emptyOperand(java.lang.String propertyValue)


Copyright © 2002-2006 TrackStudio, Ltd. All Rights Reserved.