Package net.tirasa.connid.commons.db
Class DatabaseFilterTranslator
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
- net.tirasa.connid.commons.db.DatabaseFilterTranslator
-
- All Implemented Interfaces:
org.identityconnectors.framework.common.objects.filter.FilterTranslator<FilterWhereBuilder>
public abstract class DatabaseFilterTranslator extends org.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
DatabaseFilterTranslator abstract class translate filters to database WHERE clause The resource specific getAttributeName must be provided in real translator- Since:
- 1.0
- Version:
- $Revision 1.0$
-
-
Constructor Summary
Constructors Constructor Description DatabaseFilterTranslator(org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.OperationOptions options)DatabaseFilterTranslator translate filters to database WHERE clause
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected FilterWhereBuildercreateAndExpression(FilterWhereBuilder leftExpression, FilterWhereBuilder rightExpression)protected FilterWhereBuildercreateBuilder()protected FilterWhereBuildercreateContainsExpression(org.identityconnectors.framework.common.objects.filter.ContainsFilter filter, boolean not)protected FilterWhereBuildercreateEndsWithExpression(org.identityconnectors.framework.common.objects.filter.EndsWithFilter filter, boolean not)protected FilterWhereBuildercreateEqualsExpression(org.identityconnectors.framework.common.objects.filter.EqualsFilter filter, boolean not)protected FilterWhereBuildercreateEqualsIgnoreCaseExpression(org.identityconnectors.framework.common.objects.filter.EqualsIgnoreCaseFilter filter, boolean not)protected FilterWhereBuildercreateGreaterThanExpression(org.identityconnectors.framework.common.objects.filter.GreaterThanFilter filter, boolean not)protected FilterWhereBuildercreateGreaterThanOrEqualExpression(org.identityconnectors.framework.common.objects.filter.GreaterThanOrEqualFilter filter, boolean not)protected FilterWhereBuildercreateLessThanExpression(org.identityconnectors.framework.common.objects.filter.LessThanFilter filter, boolean not)protected FilterWhereBuildercreateLessThanOrEqualExpression(org.identityconnectors.framework.common.objects.filter.LessThanOrEqualFilter filter, boolean not)protected FilterWhereBuildercreateOrExpression(FilterWhereBuilder leftExpression, FilterWhereBuilder rightExpression)protected FilterWhereBuildercreateStartsWithExpression(org.identityconnectors.framework.common.objects.filter.StartsWithFilter filter, boolean not)protected abstract SQLParamgetSQLParam(org.identityconnectors.framework.common.objects.Attribute attribute, org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.OperationOptions options)Get the SQLParam for given attributeprotected booleanvalidateSearchAttribute(org.identityconnectors.framework.common.objects.Attribute attribute)Validate the attribute to supported search types
-
-
-
Constructor Detail
-
DatabaseFilterTranslator
public DatabaseFilterTranslator(org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.OperationOptions options)DatabaseFilterTranslator translate filters to database WHERE clause- Parameters:
oclass- the object classoptions- the filter options
-
-
Method Detail
-
createBuilder
protected FilterWhereBuilder createBuilder()
-
createAndExpression
protected FilterWhereBuilder createAndExpression(FilterWhereBuilder leftExpression, FilterWhereBuilder rightExpression)
- Overrides:
createAndExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createOrExpression
protected FilterWhereBuilder createOrExpression(FilterWhereBuilder leftExpression, FilterWhereBuilder rightExpression)
- Overrides:
createOrExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createEqualsExpression
protected FilterWhereBuilder createEqualsExpression(org.identityconnectors.framework.common.objects.filter.EqualsFilter filter, boolean not)
- Overrides:
createEqualsExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createEqualsIgnoreCaseExpression
protected FilterWhereBuilder createEqualsIgnoreCaseExpression(org.identityconnectors.framework.common.objects.filter.EqualsIgnoreCaseFilter filter, boolean not)
- Overrides:
createEqualsIgnoreCaseExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createContainsExpression
protected FilterWhereBuilder createContainsExpression(org.identityconnectors.framework.common.objects.filter.ContainsFilter filter, boolean not)
- Overrides:
createContainsExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createEndsWithExpression
protected FilterWhereBuilder createEndsWithExpression(org.identityconnectors.framework.common.objects.filter.EndsWithFilter filter, boolean not)
- Overrides:
createEndsWithExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createStartsWithExpression
protected FilterWhereBuilder createStartsWithExpression(org.identityconnectors.framework.common.objects.filter.StartsWithFilter filter, boolean not)
- Overrides:
createStartsWithExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createGreaterThanExpression
protected FilterWhereBuilder createGreaterThanExpression(org.identityconnectors.framework.common.objects.filter.GreaterThanFilter filter, boolean not)
- Overrides:
createGreaterThanExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createGreaterThanOrEqualExpression
protected FilterWhereBuilder createGreaterThanOrEqualExpression(org.identityconnectors.framework.common.objects.filter.GreaterThanOrEqualFilter filter, boolean not)
- Overrides:
createGreaterThanOrEqualExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createLessThanExpression
protected FilterWhereBuilder createLessThanExpression(org.identityconnectors.framework.common.objects.filter.LessThanFilter filter, boolean not)
- Overrides:
createLessThanExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
createLessThanOrEqualExpression
protected FilterWhereBuilder createLessThanOrEqualExpression(org.identityconnectors.framework.common.objects.filter.LessThanOrEqualFilter filter, boolean not)
- Overrides:
createLessThanOrEqualExpressionin classorg.identityconnectors.framework.common.objects.filter.AbstractFilterTranslator<FilterWhereBuilder>
-
getSQLParam
protected abstract SQLParam getSQLParam(org.identityconnectors.framework.common.objects.Attribute attribute, org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.OperationOptions options)
Get the SQLParam for given attribute- Parameters:
attribute- to translateoclass- object classoptions- operation options- Returns:
- the expected SQLParam, or null if filter not supported
Types
-
validateSearchAttribute
protected boolean validateSearchAttribute(org.identityconnectors.framework.common.objects.Attribute attribute)
Validate the attribute to supported search types- Parameters:
attribute- attribute- Returns:
- wheter attribute is valid
-
-