001 /*
002 * Copyright 2011-2016 UnboundID Corp.
003 * All Rights Reserved.
004 */
005 /*
006 * Copyright (C) 2011-2016 UnboundID Corp.
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021 package com.unboundid.ldap.sdk.persist;
022
023
024
025 /**
026 * This enum defines a set of filter types for filters that may be generated
027 * for an object using the LDAP SDK persistence framework. Classes created by
028 * {@link GenerateSourceFromSchema} (including the
029 * {@code generate-source-from-schema} command-line tool) will include methods
030 * that may be used to generate filters for object contents.
031 */
032 public enum PersistFilterType
033 {
034 /**
035 * The filter type that may be used to generate a presence filter, like
036 * "(attrName=*)".
037 */
038 PRESENCE,
039
040
041
042 /**
043 * The filter type that may be used to generate an equality filter, like
044 * "(attrName=value)".
045 */
046 EQUALITY,
047
048
049
050 /**
051 * The filter type that may be used to generate a substring filter with a
052 * subInitial element, like "(attrName=value*)".
053 */
054 STARTS_WITH,
055
056
057
058 /**
059 * The filter type that may be used to generate a substring filter with a
060 * subFinal element, like "(attrName=*value)".
061 */
062 ENDS_WITH,
063
064
065
066 /**
067 * The filter type that may be used to generate a substring filter with a
068 * subAny element, like "(attrName=*value*)".
069 */
070 CONTAINS,
071
072
073
074 /**
075 * The filter type that may be used to generate a greater-than-or-equal-to
076 * filter, like "(attrName>=value)".
077 */
078 GREATER_OR_EQUAL,
079
080
081
082 /**
083 * The filter type that may be used to generate a less-than-or-equal-to
084 * filter, like "(attrName<=value)".
085 */
086 LESS_OR_EQUAL,
087
088
089
090 /**
091 * The filter type that may be used to generate an approximate match filter,
092 * like "(attrName~=value)".
093 */
094 APPROXIMATELY_EQUAL_TO;
095 }