Package org.teiid.translator.ldap
Class LDAPExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<ConnectionFactory,LdapContext>
-
- org.teiid.translator.ldap.LDAPExecutionFactory
-
@Translator(name="ldap", description="A translator for LDAP directory") public class LDAPExecutionFactory extends ExecutionFactory<ConnectionFactory,LdapContext>
LDAP translator. This is responsible for initializing a connection factory, and obtaining connections to LDAP.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LDAPExecutionFactory.SearchDefaultScope
-
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
-
-
Field Summary
Fields Modifier and Type Field Description static String
DN_PREFIX
static String
RDN_TYPE
static String
UNWRAP
-
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description LDAPExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcedureExecution
createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext context)
ProcedureExecution
createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext connection)
ResultSetExecution
createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext context)
UpdateExecution
createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext context)
int
getMaxFromGroups()
The number of groups supported in the from clause.String
getSearchDefaultBaseDN()
LDAPExecutionFactory.SearchDefaultScope
getSearchDefaultScope()
boolean
isExceptionOnSizeLimitExceeded()
boolean
isRestrictToObjectClass()
void
setExceptionOnSizeLimitExceeded(boolean exceptionOnSizeLimitExceeded)
void
setRestrictToObjectClass(boolean restrictToObjectClass)
void
setSearchDefaultBaseDN(String searchDefaultBaseDN)
void
setSearchDefaultScope(LDAPExecutionFactory.SearchDefaultScope searchDefaultScope)
void
setUsePagination(boolean usePagination)
boolean
supportsCompareCriteriaEquals()
Support indicates connector accepts criteria of form (element = constant)boolean
supportsCompareCriteriaOrdered()
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.boolean
supportsInCriteria()
Support indicates connector accepts criteria of form (element IN set)boolean
supportsLikeCriteria()
Support indicates connector accepts criteria of form (element LIKE constant)boolean
supportsLikeCriteriaEscapeCharacter()
Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char)boolean
supportsNotCriteria()
Support indicates connector accepts logical criteria NOTboolean
supportsOnlyLiteralComparison()
boolean
supportsOrCriteria()
Support indicates connector accepts logical criteria connected by ORboolean
supportsPartialFiltering()
Return true if the source has columns marked with the teiid_rel:partial that can return more rows than specified by a filter if the column is also projected.boolean
supportsRowLimit()
Gets whether the connector can limit the number of rows returned by a query.boolean
supportsRowOffset()
Gets whether the connector supports a SQL clause (similar to the LIMIT with an offset) that can return result sets that start in the middle of the resulting rows returned by a queryboolean
useAnsiJoin()
Whether the source prefers to use ANSI style joins.boolean
usePagination()
-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, areLobsUsableAfterClose, closeConnection, createExecution, getCacheDirective, getCollationLocale, getConnection, getConnection, getDefaultNullOrder, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxInCriteriaSize, getMaxProjectedColumns, getMetadata, getMetadataProcessor, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedFunctions, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, initCapabilities, isCopyLobs, isForkable, isImmutable, isSourceRequired, isSourceRequiredForCapabilities, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, returnsSingleUpdateCount, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, start, supportsAdvancedOlapOperations, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountBig, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesEnhancedNumeric, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsArrayAgg, supportsArrayType, supportsBatchedUpdates, supportsBulkUpdate, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueries, supportsCorrelatedSubqueryLimit, supportsDependentJoins, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsExistsCriteria, supportsFormatLiteral, supportsFullDependentJoins, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupBy, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsHaving, supportsInCriteriaSubquery, supportsInlineViews, supportsInnerJoins, supportsInsertWithQueryExpression, supportsIntersect, supportsIsDistinctCriteria, supportsIsNullCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyRelationshipStyleJoins, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByUnrelated, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsProcedureParameterExpression, supportsProcedureTable, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRecursiveCommonTableExpressions, supportsScalarSubqueries, supportsScalarSubqueryProjection, supportsSearchedCaseExpressions, supportsSelectDistinct, supportsSelectExpression, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSelfJoins, supportsSetQueryLimitOffset, supportsSetQueryOrderBy, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUnions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useBindingsForDependentJoin
-
-
-
-
Field Detail
-
DN_PREFIX
public static final String DN_PREFIX
- See Also:
- Constant Field Values
-
RDN_TYPE
public static final String RDN_TYPE
- See Also:
- Constant Field Values
-
UNWRAP
public static final String UNWRAP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSearchDefaultBaseDN
@TranslatorProperty(display="Default Search Base DN", description="Default Base DN for LDAP Searches") public String getSearchDefaultBaseDN()
-
setSearchDefaultBaseDN
public void setSearchDefaultBaseDN(String searchDefaultBaseDN)
-
isRestrictToObjectClass
@TranslatorProperty(display="Restrict Searches To Named Object Class", description="Restrict Searches to objectClass named in the Name field for a table", advanced=true) public boolean isRestrictToObjectClass()
-
setRestrictToObjectClass
public void setRestrictToObjectClass(boolean restrictToObjectClass)
-
getSearchDefaultScope
@TranslatorProperty(display="Default Search Scope", description="Default Scope for LDAP Searches") public LDAPExecutionFactory.SearchDefaultScope getSearchDefaultScope()
-
setSearchDefaultScope
public void setSearchDefaultScope(LDAPExecutionFactory.SearchDefaultScope searchDefaultScope)
-
createResultSetExecution
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext context) throws TranslatorException
- Overrides:
createResultSetExecution
in classExecutionFactory<ConnectionFactory,LdapContext>
- Throws:
TranslatorException
-
createUpdateExecution
public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext context) throws TranslatorException
- Overrides:
createUpdateExecution
in classExecutionFactory<ConnectionFactory,LdapContext>
- Throws:
TranslatorException
-
createDirectExecution
public ProcedureExecution createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext context) throws TranslatorException
- Overrides:
createDirectExecution
in classExecutionFactory<ConnectionFactory,LdapContext>
- Throws:
TranslatorException
-
createProcedureExecution
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, LdapContext connection) throws TranslatorException
- Overrides:
createProcedureExecution
in classExecutionFactory<ConnectionFactory,LdapContext>
- Throws:
TranslatorException
-
supportsCompareCriteriaEquals
public boolean supportsCompareCriteriaEquals()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element = constant)- Overrides:
supportsCompareCriteriaEquals
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsInCriteria
public boolean supportsInCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element IN set)- Overrides:
supportsInCriteria
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsLikeCriteria
public boolean supportsLikeCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element LIKE constant)- Overrides:
supportsLikeCriteria
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsOrCriteria
public boolean supportsOrCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria connected by OR- Overrides:
supportsOrCriteria
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsRowLimit
public boolean supportsRowLimit()
Description copied from class:ExecutionFactory
Gets whether the connector can limit the number of rows returned by a query.- Overrides:
supportsRowLimit
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsRowOffset
public boolean supportsRowOffset()
Description copied from class:ExecutionFactory
Gets whether the connector supports a SQL clause (similar to the LIMIT with an offset) that can return result sets that start in the middle of the resulting rows returned by a query- Overrides:
supportsRowOffset
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsCompareCriteriaOrdered
public boolean supportsCompareCriteriaOrdered()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.- Overrides:
supportsCompareCriteriaOrdered
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsNotCriteria
public boolean supportsNotCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria NOT- Overrides:
supportsNotCriteria
in classExecutionFactory<ConnectionFactory,LdapContext>
-
usePagination
@TranslatorProperty(display="Use Pagination", description="Use a PagedResultsControl to page through large results. This is not supported by all directory servers.") public boolean usePagination()
-
setUsePagination
public void setUsePagination(boolean usePagination)
-
isExceptionOnSizeLimitExceeded
@TranslatorProperty(display="Exception on Size Limit Exceeded", description="Set to true to throw an exception when a SizeLimitExceededException is received and a LIMIT is not properly enforced.") public boolean isExceptionOnSizeLimitExceeded()
-
setExceptionOnSizeLimitExceeded
public void setExceptionOnSizeLimitExceeded(boolean exceptionOnSizeLimitExceeded)
-
supportsOnlyLiteralComparison
public boolean supportsOnlyLiteralComparison()
- Overrides:
supportsOnlyLiteralComparison
in classExecutionFactory<ConnectionFactory,LdapContext>
- Returns:
- true if only Literal comparisons (equality, ordered, like, etc.) are supported for non-join conditions.
-
supportsLikeCriteriaEscapeCharacter
public boolean supportsLikeCriteriaEscapeCharacter()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char)- Overrides:
supportsLikeCriteriaEscapeCharacter
in classExecutionFactory<ConnectionFactory,LdapContext>
-
getMaxFromGroups
public int getMaxFromGroups()
Description copied from class:ExecutionFactory
The number of groups supported in the from clause. Added for a Sybase limitation.- Overrides:
getMaxFromGroups
in classExecutionFactory<ConnectionFactory,LdapContext>
- Returns:
- the number of groups supported in the from clause, or -1 if there is no limit
-
useAnsiJoin
public boolean useAnsiJoin()
Description copied from class:ExecutionFactory
Whether the source prefers to use ANSI style joins.- Overrides:
useAnsiJoin
in classExecutionFactory<ConnectionFactory,LdapContext>
-
supportsPartialFiltering
public boolean supportsPartialFiltering()
Description copied from class:ExecutionFactory
Return true if the source has columns marked with the teiid_rel:partial that can return more rows than specified by a filter if the column is also projected. This most closely matches the semantics of ldap queries with multi-valued attributes marked as partial.
When true, the following supports cannot also be true:- supportsOuterJoins()
- supportsFullOuterJoins()
- supportsInlineViews()
- supportsIntersect()
- supportsExcept()
- supportsSelectExpression()
- supportsUnions()
- supportsSelectDistinct()
- supportsGroupBy()
- Overrides:
supportsPartialFiltering
in classExecutionFactory<ConnectionFactory,LdapContext>
- Returns:
-
-