public class WurbletParameter extends Object implements WurbletParameterOperand
| Constructor and Description |
|---|
WurbletParameter(String text)
Constructs a parameter from a wurblet arg.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getArg()
name of the method argument.
|
Attribute |
getAttribute()
the model attribute.
|
String |
getComponentEntityName()
Gets the entity name of the component key.
|
String |
getName()
name of the database attribute.
|
Relation |
getRelation()
Gets the relation if this is a relation key.
|
String |
getRelationComponentEntityName()
Gets the component of the related entity pointed to by the relation key.
|
String |
getRelationName()
Gets the relation of the relation key.
|
String |
getRelop()
Gets the relop string.
Usually "=?" or " IS NULL" or "=value" |
String |
getSortMode()
Returns the sortmode if !isKey().
|
String |
getSqlArg() |
String |
getText()
Gets the original text.
|
String |
getValue()
predefined value (replaces the ?).
|
boolean |
isArg() |
boolean |
isComponentKey()
Returns whether this is a component key.
|
boolean |
isFixed()
fixed value (directly put into sql-statement).
|
boolean |
isRelationKey()
Returns whether this is a relation key.
|
boolean |
isSortKey()
Returns true if this is a sorting parameter.
|
boolean |
isSqlArg() |
void |
setArg(String arg)
name of the method argument.
|
void |
setAttribute(Attribute attribute)
the model attribute.
|
void |
setFixed(boolean fixed)
fixed value (directly put into sql-statement).
|
void |
setName(String name)
name of the database attribute.
|
void |
setRelation(Relation relation)
Sets the relation if this is a relation key.
|
void |
setRelop(String relop)
relational operator.
|
void |
setValue(String value)
predefined value (replaces the ?).
|
String |
toString() |
public WurbletParameter(String text)
A parameter is of the form:
[+-][<attribute-path>]<attribute-name>[[argname]][:relop[:value]|[#value]]
where relop is optional and defaults to '='.
The special relop :null will be translated to " IS NULL" and :notnull translated to " IS NOT NULL".
"like" will translated to " LIKE ".
"notlike" will be translated to " NOT LIKE ".
A leading + or - denotes an order by field. + means ascending, - means descending. Such a parameter must not be followed by operators.
An optional leading entity name followed by a dot and the attribute denotes a so-called component-key. This is an attribute of a component of the current entity. The current entity must be a root-entity.
Examples:
poolId -> name=poolId, arg=poolId, relop="="
poolId[from]:>= -> name=poolId, arg=from, relop=">="
code:=:'Hurrz' -> name=code, arg=code, relop="=", value="'Hurz'"
code:=#'Hurrz' -> name=code, arg=code, relop="=", value="'Hurz'", fixed=true
+poolId -kurzname -> ORDER BY poolId ASC, kurzname DESC
The <attribute-path> describes the path to the attribute and is of the following form:
<component-entity>.InvoiceLine.amount
[<component-entity>].<relation>.[<component-entity>.]InvoiceLine.Product.price.User.Address.zipCode
..poolId
text - the wurblet argpublic boolean isComponentKey()
public boolean isRelationKey()
public String getComponentEntityName()
public String getRelationComponentEntityName()
public String getRelationName()
public boolean isSortKey()
public String getSortMode()
public boolean isArg()
public boolean isSqlArg()
public String getSqlArg()
public String getRelop()
public String getText()
public String getName()
public void setName(String name)
name - the name to setpublic String getArg()
public void setArg(String arg)
arg - the arg to setpublic void setRelop(String relop)
relop - the relop to setpublic String getValue()
public void setValue(String value)
value - the value to setpublic boolean isFixed()
public void setFixed(boolean fixed)
fixed - the fixed to setpublic Attribute getAttribute()
public void setAttribute(Attribute attribute)
attribute - the attribute to setpublic Relation getRelation()
public void setRelation(Relation relation)
relation - the relationCopyright © 2016 Krake Softwaretechnik. All rights reserved.