public class EntityWhereString extends EntityCondition
Encapsulates SQL expressions used for where clause snippets. NOTE: This is UNSAFE and BREAKS the idea behind the Entity Engine where you avoid directly specifying SQL. So, KEEP IT MINIMAL and preferrably replace it when the feature you are getting at is implemented in a more automatic way for you.
By minimal I mean use this in conjunction with other EntityConditions like the EntityExpr, EntityExprList and EntityFieldMap objects which more cleanly encapsulate where conditions and don't require you to directly write SQL.
| Modifier | Constructor and Description |
|---|---|
protected |
EntityWhereString() |
|
EntityWhereString(String sqlString) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkCondition(ModelEntity modelEntity)
Checks this condition against the given entity.
|
int |
getParameterCount(ModelEntity modelEntity)
Returns the number of SQL parameters that would be generated for this condition.
|
String |
makeWhereString(ModelEntity modelEntity,
List<? super EntityConditionParam> entityConditionParams)
Creates a string for use in a WHERE clause, based on this condition.
|
String |
toString() |
protected String sqlString
protected EntityWhereString()
public EntityWhereString(String sqlString)
public String makeWhereString(ModelEntity modelEntity, List<? super EntityConditionParam> entityConditionParams)
EntityConditionmakeWhereString in class EntityConditionmodelEntity - the entity being queried for (required)entityConditionParams - a non-null list to which this method will add any required bind valuespublic int getParameterCount(ModelEntity modelEntity)
EntityConditiongetParameterCount in class EntityConditionmodelEntity - the entity being queried for (required)public void checkCondition(ModelEntity modelEntity) throws GenericModelException
EntityConditioncheckCondition in class EntityConditionmodelEntity - the entity being queried for (required)GenericModelException - if the condition is not metCopyright © 2018 Atlassian. All rights reserved.