Class EntityFunction<T extends java.lang.Comparable<?>>
- java.lang.Object
-
- org.apache.ofbiz.entity.condition.EntityConditionBase
-
- org.apache.ofbiz.entity.condition.EntityConditionValue
-
- org.apache.ofbiz.entity.condition.EntityFunction<T>
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
EntityFunction.EntityFunctionNested
,EntityFunction.EntityFunctionSingle
public abstract class EntityFunction<T extends java.lang.Comparable<?>> extends EntityConditionValue
Base class for entity functions.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityFunction.EntityFunctionNested<T extends java.lang.Comparable<?>>
static class
EntityFunction.EntityFunctionSingle<T extends java.lang.Comparable<?>>
static interface
EntityFunction.Fetcher<T>
static class
EntityFunction.LENGTH
Length() entity function.static class
EntityFunction.LOWER
Lower() entity function.static class
EntityFunction.SQLFunction
static class
EntityFunction.TRIM
Trim() entity function.static class
EntityFunction.UPPER
Upper() entity function.-
Nested classes/interfaces inherited from class org.apache.ofbiz.entity.condition.EntityConditionValue
EntityConditionValue.ConstantNumberValue
-
-
Field Summary
Fields Modifier and Type Field Description protected EntityFunction.Fetcher<T>
fetcher
protected ModelField
field
protected EntityFunction.SQLFunction
function
static int
ID_LENGTH
static int
ID_LOWER
static int
ID_TRIM
static int
ID_UPPER
protected EntityConditionValue
nested
protected java.lang.Object
value
-
Fields inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
_emptyMap, emptyAliases, emptyList
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EntityFunction(EntityFunction.Fetcher<T> fetcher, EntityFunction.SQLFunction function, java.lang.Object value)
protected
EntityFunction(EntityFunction.Fetcher<T> fetcher, EntityFunction.SQLFunction function, EntityConditionValue nested)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSqlValue(java.lang.StringBuilder sql, java.util.Map<java.lang.String,java.lang.String> tableAliases, ModelEntity modelEntity, java.util.List<EntityConditionParam> entityConditionParams, boolean includeTableNamePrefix, Datasource datasourceinfo)
boolean
equals(java.lang.Object obj)
EntityConditionValue
freeze()
java.lang.String
getCode()
int
getId()
ModelField
getModelField(ModelEntity modelEntity)
java.lang.Object
getOriginalValue()
java.lang.Object
getValue(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map)
int
hashCode()
static EntityFunction<java.lang.Integer>
LENGTH(java.lang.Object value)
static EntityFunction<java.lang.Integer>
LENGTH(EntityConditionValue nested)
static EntityFunction<java.lang.String>
LOWER(java.lang.Object value)
static EntityFunction<java.lang.String>
LOWER(EntityConditionValue nested)
void
setModelField(ModelField field)
static EntityFunction<java.lang.String>
TRIM(java.lang.Object value)
static EntityFunction<java.lang.String>
TRIM(EntityConditionValue nested)
static EntityFunction<java.lang.String>
UPPER(java.lang.Object value)
static EntityFunction<java.lang.String>
UPPER(EntityConditionValue nested)
static EntityFunction<java.lang.String>
UPPER_FIELD(java.lang.String fieldName)
void
validateSql(ModelEntity modelEntity)
-
Methods inherited from class org.apache.ofbiz.entity.condition.EntityConditionValue
addSqlValue, CONSTANT_NUMBER, getValue, toString, toString
-
Methods inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
addValue, castBoolean, equals, getColName, getColName, getColName, getField, hashCode
-
-
-
-
Field Detail
-
ID_LENGTH
public static final int ID_LENGTH
-
ID_TRIM
public static final int ID_TRIM
-
ID_UPPER
public static final int ID_UPPER
-
ID_LOWER
public static final int ID_LOWER
-
function
protected final EntityFunction.SQLFunction function
-
nested
protected final EntityConditionValue nested
-
value
protected final java.lang.Object value
-
fetcher
protected final EntityFunction.Fetcher<T extends java.lang.Comparable<?>> fetcher
-
field
protected ModelField field
-
-
Constructor Detail
-
EntityFunction
protected EntityFunction(EntityFunction.Fetcher<T> fetcher, EntityFunction.SQLFunction function, EntityConditionValue nested)
-
EntityFunction
protected EntityFunction(EntityFunction.Fetcher<T> fetcher, EntityFunction.SQLFunction function, java.lang.Object value)
-
-
Method Detail
-
LENGTH
public static EntityFunction<java.lang.Integer> LENGTH(EntityConditionValue nested)
-
LENGTH
public static EntityFunction<java.lang.Integer> LENGTH(java.lang.Object value)
-
TRIM
public static EntityFunction<java.lang.String> TRIM(EntityConditionValue nested)
-
TRIM
public static EntityFunction<java.lang.String> TRIM(java.lang.Object value)
-
UPPER
public static EntityFunction<java.lang.String> UPPER(EntityConditionValue nested)
-
UPPER
public static EntityFunction<java.lang.String> UPPER(java.lang.Object value)
-
UPPER_FIELD
public static EntityFunction<java.lang.String> UPPER_FIELD(java.lang.String fieldName)
-
LOWER
public static EntityFunction<java.lang.String> LOWER(EntityConditionValue nested)
-
LOWER
public static EntityFunction<java.lang.String> LOWER(java.lang.Object value)
-
freeze
public EntityConditionValue freeze()
- Specified by:
freeze
in classEntityConditionValue
-
getCode
public java.lang.String getCode()
-
getOriginalValue
public java.lang.Object getOriginalValue()
-
getId
public int getId()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classEntityConditionBase
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classEntityConditionBase
-
addSqlValue
public void addSqlValue(java.lang.StringBuilder sql, java.util.Map<java.lang.String,java.lang.String> tableAliases, ModelEntity modelEntity, java.util.List<EntityConditionParam> entityConditionParams, boolean includeTableNamePrefix, Datasource datasourceinfo)
- Specified by:
addSqlValue
in classEntityConditionValue
-
getModelField
public ModelField getModelField(ModelEntity modelEntity)
- Specified by:
getModelField
in classEntityConditionValue
-
setModelField
public void setModelField(ModelField field)
- Specified by:
setModelField
in classEntityConditionValue
-
validateSql
public void validateSql(ModelEntity modelEntity) throws GenericModelException
- Specified by:
validateSql
in classEntityConditionValue
- Throws:
GenericModelException
-
getValue
public java.lang.Object getValue(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map)
- Specified by:
getValue
in classEntityConditionValue
-
-