com.im.df.api 5.9

com.im.df.api.support
Class EntitySQLFilterProperty

java.lang.Object
  extended by com.im.df.api.support.EntitySQLFilterProperty
All Implemented Interfaces:
ExtraDFItemProperty<DFEntity>

public class EntitySQLFilterProperty
extends Object
implements ExtraDFItemProperty<DFEntity>

SQL filter extra attribute for entities.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.im.df.api.util.ExtraDFItemProperty
ExtraDFItemProperty.Customizer
 
Constructor Summary
EntitySQLFilterProperty()
           
 
Method Summary
 ExtraDFItemProperty.Customizer create(DFEntity ent, String value)
          Create customizer for property value modification.
 String getDisplayName()
           
static String getFilterForEntity(DFEntity entity)
          Helper method to find the SQL to be used as a row filter.
 String getPropertyName()
           
 String getShortDescription()
           
 boolean isCompatible(DFItem item)
          Check if this property can be applied to the input field.
 String toString()
           
 boolean validate(DFEntity ent, String value)
          Check validity of value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntitySQLFilterProperty

public EntitySQLFilterProperty()
Method Detail

isCompatible

public boolean isCompatible(DFItem item)
Description copied from interface: ExtraDFItemProperty
Check if this property can be applied to the input field.

Specified by:
isCompatible in interface ExtraDFItemProperty<DFEntity>
Parameters:
item - The field for testing
Returns:
True if property can be applied

getPropertyName

public String getPropertyName()
Specified by:
getPropertyName in interface ExtraDFItemProperty<DFEntity>
Returns:
The xattribute unique property name

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface ExtraDFItemProperty<DFEntity>
Returns:
display name shown in JList.

getShortDescription

public String getShortDescription()
Specified by:
getShortDescription in interface ExtraDFItemProperty<DFEntity>
Returns:
Short description - tooltip.

create

public ExtraDFItemProperty.Customizer create(DFEntity ent,
                                             String value)
Description copied from interface: ExtraDFItemProperty
Create customizer for property value modification.

Specified by:
create in interface ExtraDFItemProperty<DFEntity>
Parameters:
ent - item for customization.
value - default value.
Returns:
The customizer.

validate

public boolean validate(DFEntity ent,
                        String value)
Description copied from interface: ExtraDFItemProperty
Check validity of value.

Specified by:
validate in interface ExtraDFItemProperty<DFEntity>
Parameters:
ent - Item for validation.
value - value for validation.
Returns:
True if value valid.

getFilterForEntity

public static String getFilterForEntity(DFEntity entity)
Helper method to find the SQL to be used as a row filter. If none is defined then null will be returned

Parameters:
entity - The entity for the filter
Returns:
SQL to append to the where clause as a filter

toString

public String toString()
Overrides:
toString in class Object

com.im.df.api 5.9