1 26 27 package com.opensugar.cube.ldap; 28 29 import java.util.Dictionary ; 30 31 public class PresenceClause extends SimpleClause { 32 33 public PresenceClause( String key, boolean keysCaseSensitive ) { 34 super( key, "*", keysCaseSensitive ); 35 } 36 37 public boolean filter( Dictionary props ) { 38 Object obj = getProperty( getKey(), props ); 39 if ( obj == null ) { 40 return false; 41 } 42 43 return true; 44 } 45 46 public String getCanonicalForm() { 47 return "(" + getKey() + Filter.EQUALS + getValue() + ")"; 48 } 49 50 } | Popular Tags |