Class QueryPattern
java.lang.Object
com.nomagic.reportwizard.tools.query.QueryPattern
Class for handler query pattern.
- Since:
- Jan 29, 2013
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(QueryAttribute queryAttr) Add attribute condition for the element.voidaddAttribute(String attrName, String attrValue, int matchingType) Add attribute condition for the element.static StringformatToCamelCase(String string) Convert text to camel-case.Return element's attribute list.getId()Return element id.Get a last attribute form attribute list.Return query pattern.getType()Return element type.booleanReturn true if element type is specific by *.booleanReturn true if :empty is set to element.booleanReturn true if query by child element .voidsetAllType(boolean allType) Set true if element type is specific by *.voidsetAttributeList(List<QueryAttribute> attributeList) Set element's attribute list.voidSet element id.voidsetNoChild(boolean noChild) Set true if :empty is set to element.voidsetOnlyChildElement(boolean isOnlyChild) Set true if query by child element.voidSet element type.
-
Constructor Details
-
QueryPattern
public QueryPattern()
-
-
Method Details
-
getType
Return element type.- Returns:
- element type
-
setType
Set element type.- Parameters:
type- element type
-
isAllType
public boolean isAllType()Return true if element type is specific by *.- Returns:
- true if element type is specific by * (all type), otherwise false
-
setAllType
public void setAllType(boolean allType) Set true if element type is specific by *.- Parameters:
allType- true if element type is specific by *. otherwise false
-
getId
Return element id.- Returns:
- element id
-
setId
Set element id.- Parameters:
id- element id
-
isNoChild
public boolean isNoChild()Return true if :empty is set to element.- Returns:
- true if :empty is set to element, otherwise false
-
setNoChild
public void setNoChild(boolean noChild) Set true if :empty is set to element.- Parameters:
noChild- true if :empty is set to element, otherwise false
-
getAttributeList
Return element's attribute list.- Returns:
- element's attribute list
-
setAttributeList
Set element's attribute list.- Parameters:
attributeList- element's attribute list
-
isOnlyChildElement
public boolean isOnlyChildElement()Return true if query by child element .- Returns:
- true if query element by child element, otherwise false
-
setOnlyChildElement
public void setOnlyChildElement(boolean isOnlyChild) Set true if query by child element.- Parameters:
isOnlyChild- true if query by child element, otherwise false
-
formatToCamelCase
Convert text to camel-case.- Parameters:
string- original string- Returns:
- string in camel-case format
-
addAttribute
Add attribute condition for the element.- Parameters:
queryAttr- a QueryAttribute
-
addAttribute
Add attribute condition for the element.- Parameters:
attrName- an attribute nameattrValue- an attribute valuematchingType- an attribute matching type
-
getLastAttribute
Get a last attribute form attribute list.- Returns:
- a last attribute
-
getQueryPatternString
Return query pattern.- Returns:
- query pattern
-