public class OperatorCountRestrictionConfig
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
OperatorCountRestrictionConfig.Action |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
action |
static java.lang.String |
DEFAULT_ACTION |
static int |
DEFAULT_MAXIMUM_OPERATOR_COUNT |
static int |
DEFAULT_MAXIMUM_PROXIMITY_OPERATOR_COUNT |
int |
maximumOperatorCount |
int |
maximumProximityOperatorCount |
Constructor and Description |
---|
OperatorCountRestrictionConfig() |
OperatorCountRestrictionConfig(OperatorCountRestrictionConfig o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this OperatorCountRestrictionConfig.
|
static OperatorCountRestrictionConfig |
fromString(java.lang.String s)
String representation of this OperatorCountRestrictionConfig.
|
java.lang.String |
getAction()
Action when maximumOperatorCount is reached: drop query or remove extra operators.
The 'cleanup' mode does not guarantee the order in which extra operators are discarded. |
OperatorCountRestrictionConfig.Action |
getActionAsEnum()
Action when maximumOperatorCount is reached: drop query or remove extra operators.
The 'cleanup' mode does not guarantee the order in which extra operators are discarded. |
int |
getMaximumOperatorCount()
Maximum number of operators allowed in a query.
|
int |
getMaximumProximityOperatorCount()
Maximum number of proximity operators allowed in a query.
The proximity operators are: NEAR NEXT AFTER BEFORE |
static boolean |
isA(java.lang.String str,
OperatorCountRestrictionConfig.Action item) |
static boolean |
isOneOf(java.lang.String str,
OperatorCountRestrictionConfig.Action... items) |
OperatorCountRestrictionConfig |
makeCopy()
Creates and returns a deep copy of this OperatorCountRestrictionConfig.
|
static OperatorCountRestrictionConfig |
readFrom(java.io.InputStream is)
Read this OperatorCountRestrictionConfig from an XML fragment.
|
void |
setAction(OperatorCountRestrictionConfig.Action item)
Action when maximumOperatorCount is reached: drop query or remove extra operators.
The 'cleanup' mode does not guarantee the order in which extra operators are discarded. |
void |
setAction(java.lang.String action)
Action when maximumOperatorCount is reached: drop query or remove extra operators.
The 'cleanup' mode does not guarantee the order in which extra operators are discarded. |
void |
setMaximumOperatorCount(int maximumOperatorCount)
Maximum number of operators allowed in a query.
|
void |
setMaximumProximityOperatorCount(int maximumProximityOperatorCount)
Maximum number of proximity operators allowed in a query.
The proximity operators are: NEAR NEXT AFTER BEFORE |
java.lang.String |
toString()
String representation of this OperatorCountRestrictionConfig.
|
OperatorCountRestrictionConfig |
withAction(java.lang.String action) |
OperatorCountRestrictionConfig |
withMaximumOperatorCount(int maximumOperatorCount) |
OperatorCountRestrictionConfig |
withMaximumOperatorCount(java.lang.Integer maximumOperatorCount) |
OperatorCountRestrictionConfig |
withMaximumProximityOperatorCount(int maximumProximityOperatorCount) |
OperatorCountRestrictionConfig |
withMaximumProximityOperatorCount(java.lang.Integer maximumProximityOperatorCount) |
void |
writeTo(java.io.OutputStream os)
Write this OperatorCountRestrictionConfig as an XML fragment
|
public int maximumOperatorCount
public static final int DEFAULT_MAXIMUM_OPERATOR_COUNT
public int maximumProximityOperatorCount
public static final int DEFAULT_MAXIMUM_PROXIMITY_OPERATOR_COUNT
public java.lang.String action
public static final java.lang.String DEFAULT_ACTION
public OperatorCountRestrictionConfig()
public OperatorCountRestrictionConfig(OperatorCountRestrictionConfig o)
public static boolean isA(java.lang.String str, OperatorCountRestrictionConfig.Action item)
public static boolean isOneOf(java.lang.String str, OperatorCountRestrictionConfig.Action... items)
public void setAction(OperatorCountRestrictionConfig.Action item)
public OperatorCountRestrictionConfig.Action getActionAsEnum()
public void setMaximumOperatorCount(int maximumOperatorCount)
public int getMaximumOperatorCount()
public OperatorCountRestrictionConfig withMaximumOperatorCount(int maximumOperatorCount)
public OperatorCountRestrictionConfig withMaximumOperatorCount(java.lang.Integer maximumOperatorCount)
public void setMaximumProximityOperatorCount(int maximumProximityOperatorCount)
public int getMaximumProximityOperatorCount()
public OperatorCountRestrictionConfig withMaximumProximityOperatorCount(int maximumProximityOperatorCount)
public OperatorCountRestrictionConfig withMaximumProximityOperatorCount(java.lang.Integer maximumProximityOperatorCount)
public void setAction(java.lang.String action)
public java.lang.String getAction()
public OperatorCountRestrictionConfig withAction(java.lang.String action)
public OperatorCountRestrictionConfig makeCopy()
public static OperatorCountRestrictionConfig readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static OperatorCountRestrictionConfig fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.