public class EntityFunctionAttribute extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String |
attr
String to identify the attribute
|
protected String |
columName
Name of the column to apply the function
|
protected String |
entityName
Name of the entity to make the query
|
protected String |
function
Function name (max, min, count(*), sum, avg ...)
|
protected Vector |
parentkeys
Column names to use as filter
|
protected Vector |
queryColumns
Column names to use in the select statement
|
protected boolean |
useDefaultKeyFilter
By default the query other entities in EntityTable class always make a
filter with the entity key.
|
protected boolean |
useNullValueToParentkeys
Boolean to know if it is necessary use NullValues when parentkey columns
have no value
|
| Constructor and Description |
|---|
EntityFunctionAttribute(String attr,
String entity,
String column,
Vector parentkeys,
String functionName)
Creates a new EntityFunctionAttribute instance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAttr()
Gets the identifier of the attribute
|
String |
getColumn()
Get the name of the columns to apply the function in
|
String |
getEntityName()
Gets the name of the entity
|
String |
getFunction()
Gets the function name
|
String |
getFunctionStringQuery()
Gets the string to use the function in the select statement with the
necessary alias
For example if function is max this returns "max(functionColumn) as attribute" |
Vector |
getParentkeys()
Gets the name of the filter columns
|
Vector |
getQueryColumns()
Gets the column names to use in the query
|
int |
hashCode() |
boolean |
isUseDefaultKeyFilter()
Returns false if the query must not use the form key as filter.
|
boolean |
isUseNullValueToParentkeys()
Checks if the query must use NullValue objects when filter columns value
is null
|
void |
setAttr(String attr)
Sets the identifier of the attribute
|
void |
setCols(String column)
Sets the column names to use in the select statement
|
void |
setEntityName(String entityName)
Sets the entity name
|
void |
setFunction(String function)
Sets the function name
|
void |
setParentkeys(Vector filter)
Sets the column to use as a filter in the select statement
|
void |
setQueryColumns(Vector queryColumns)
Sets the name of the columns to use in the query
|
void |
setUseDefaultKeyFilter(boolean useDefaultKeyFilter)
Sets the value of useDefaultKeyFilter parameter
|
void |
setUseNullValueToParentkeys(boolean useNullValueToParentkeys)
Sets the value of the useNullValueToParentkeys variable
|
String |
toString() |
protected String attr
protected String entityName
protected String columName
protected Vector parentkeys
protected String function
protected Vector queryColumns
protected boolean useNullValueToParentkeys
protected boolean useDefaultKeyFilter
public EntityFunctionAttribute(String attr, String entity, String column, Vector parentkeys, String functionName)
attr - Attribute identifierentity - Entity namecolumn - Name of the column to apply the function infilter - List of columns to use as filter in the query statementfunctionName - Name of the function (avg, sum, max, min, count(*) ...)public String getEntityName()
public void setEntityName(String entityName)
entityName - public String getColumn()
public void setCols(String column)
column - public Vector getParentkeys()
public void setParentkeys(Vector filter)
filter - public String getAttr()
public void setAttr(String attr)
attr - public boolean isUseNullValueToParentkeys()
public void setUseNullValueToParentkeys(boolean useNullValueToParentkeys)
useNullValueToParentkeys - public boolean isUseDefaultKeyFilter()
public void setUseDefaultKeyFilter(boolean useDefaultKeyFilter)
useDefaultKeyFilter - public String getFunction()
public void setFunction(String function)
function - public String getFunctionStringQuery()
public Vector getQueryColumns()
public void setQueryColumns(Vector queryColumns)
queryColumns - Copyright © 2016 Imatia Innovation S.L.. All rights reserved.