com.fatwire.assetapi.query
Class ConditionFactory

java.lang.Object
  extended by com.fatwire.assetapi.query.ConditionFactory

public final class ConditionFactory
extends java.lang.Object

A utility for creating Conditions


Constructor Summary
ConditionFactory()
           
 
Method Summary
 Condition createBetweenCondition(java.lang.String attName, java.lang.Object lower, java.lang.Object upper)
          default open between condition
 Condition createBetweenCondition(java.lang.String attName, java.lang.Object lower, java.lang.Object upper, boolean lowerEqual, boolean upperEqual)
          default open between condition
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.util.Date value)
          Create the condtion with Date values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.util.Date value, boolean caseSensiive, boolean immediateOnly)
          Create the condtion with Date values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.Float value)
          Create the condtion with Float values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.Float value, boolean caseSensiive, boolean immediateOnly)
          Create the condtion with Float values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.Integer value)
          Conditions for Integer Values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.Integer value, boolean caseSensiive, boolean immediateOnly)
          Create the condtion with Integer values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.util.List<java.lang.String> values)
          create a String type condition with a list of values as input
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.util.List<java.lang.String> values, boolean containsAll)
          Create an condtion with a list of values and operation type
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.util.List<java.lang.String> values, boolean caseSensiive, boolean immediateOnly)
          create a String type condition with a list of values as input
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.Long value)
          Create the condtion with Long values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.Long value, boolean caseSensiive, boolean immediateOnly)
          Create the condtion with Long values
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.String value)
          create a String condition
static Condition createCondition(java.lang.String attName, OpTypeEnum opType, java.lang.String value, boolean caseSensiive, boolean immediateOnly)
          create a String type condition with a list of values as input
protected static Condition createConditionExpression(java.lang.String attName, OpTypeEnum opType, java.util.List<java.lang.String> values, boolean caseSensiive, boolean immediateOnly)
          Create the condtion with ConditionExpression Create the condtion with ConditionExpression
protected static Condition createConditionExpression(java.lang.String attName, OpTypeEnum opType, java.util.List<java.lang.String> values, QueryProperties props)
          Create the condtion with ConditionExpression
protected static Condition createConditionExpression(java.lang.String attName, OpTypeEnum opType, java.lang.String value, boolean caseSensiive, boolean immediateOnly)
          Create the condtion with ConditionExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionFactory

public ConditionFactory()
Method Detail

createConditionExpression

protected static Condition createConditionExpression(java.lang.String attName,
                                                     OpTypeEnum opType,
                                                     java.lang.String value,
                                                     boolean caseSensiive,
                                                     boolean immediateOnly)
Create the condtion with ConditionExpression

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createConditionExpression

protected static Condition createConditionExpression(java.lang.String attName,
                                                     OpTypeEnum opType,
                                                     java.util.List<java.lang.String> values,
                                                     boolean caseSensiive,
                                                     boolean immediateOnly)
Create the condtion with ConditionExpression Create the condtion with ConditionExpression

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
values - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createConditionExpression

protected static Condition createConditionExpression(java.lang.String attName,
                                                     OpTypeEnum opType,
                                                     java.util.List<java.lang.String> values,
                                                     QueryProperties props)
Create the condtion with ConditionExpression

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
values - the value for the condition
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.String value)
create a String condition

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.util.List<java.lang.String> values,
                                        boolean caseSensiive,
                                        boolean immediateOnly)
create a String type condition with a list of values as input

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
values - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.util.List<java.lang.String> values)
create a String type condition with a list of values as input

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
values - the value for the condition
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.String value,
                                        boolean caseSensiive,
                                        boolean immediateOnly)
create a String type condition with a list of values as input

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.Integer value)
Conditions for Integer Values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.Integer value,
                                        boolean caseSensiive,
                                        boolean immediateOnly)
Create the condtion with Integer values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.util.Date value)
Create the condtion with Date values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.util.Date value,
                                        boolean caseSensiive,
                                        boolean immediateOnly)
Create the condtion with Date values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.Float value)
Create the condtion with Float values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.Float value,
                                        boolean caseSensiive,
                                        boolean immediateOnly)
Create the condtion with Float values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.Long value)
Create the condtion with Long values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.lang.Long value,
                                        boolean caseSensiive,
                                        boolean immediateOnly)
Create the condtion with Long values

Parameters:
attName - the attribute name that this condition is restricted on
opType - the operation type of this condition
value - the value for the condition
caseSensiive - whether the query for this condition is case sensitive or not
immediateOnly - whether the retrieved value is immediateOnly or inherited (for flex asset)
Returns:
Condtion the created condition

createCondition

public static Condition createCondition(java.lang.String attName,
                                        OpTypeEnum opType,
                                        java.util.List<java.lang.String> values,
                                        boolean containsAll)
Create an condtion with a list of values and operation type

Parameters:
attName - the attribute name
opType - the query condtion type
values - the list of values
containsAll - whether to contain all the attributes
Returns:
the created condition

createBetweenCondition

public Condition createBetweenCondition(java.lang.String attName,
                                        java.lang.Object lower,
                                        java.lang.Object upper)
                                 throws AssetAccessException
default open between condition

Parameters:
attName - the attribute name
lower - the lower bound
upper - the upper bound
Returns:
created condition
Throws:
AssetAccessException

createBetweenCondition

public Condition createBetweenCondition(java.lang.String attName,
                                        java.lang.Object lower,
                                        java.lang.Object upper,
                                        boolean lowerEqual,
                                        boolean upperEqual)
                                 throws AssetAccessException
default open between condition

Parameters:
attName - the attribute name
lower - the lower bound
upper - the upper bound
lowerEqual - whether the lower bound is open or closed?
upperEqual - whether the upper bound is open or closed
Returns:
created condition
Throws:
AssetAccessException