public class DimensionFilter extends java.lang.Object implements XBRLFilterInterface
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsString()
Returns the string representation of this filter.
|
javax.xml.namespace.QName |
getDimension()
Gets the dimension.
|
static java.lang.String |
getMainFilterArgument(java.lang.String text)
If the function isTypeOfFilter returns true, some filters are very simple and only requires one single
argument to be passed in (a text string). for those cases, this function should return the filter
argument.
|
java.lang.String |
getTable()
Returns the name of a new table to be added to the filter query.
|
java.lang.String |
getTableWhere()
Returns the where clause that joins the table with the existing XBRLFactItems table.
|
java.lang.String |
getWhere()
Returns the text of the where clause (without the "and" clause)
there is only one if the
XBRLFilterInterface.hasWhereClause() function has returned true. |
boolean |
hasTables()
This shall return true if the filter requires a new table to be inserted in the
query.
|
boolean |
hasWhereClause()
Returns true if the filter is able to provide a where clause
to the query statement.
|
static boolean |
isTypeOfFilter(java.lang.String text)
Checks if is type of filter.
|
static XBRLFilterInterface |
newDimensionFilter(javax.xml.namespace.QName dimName,
FContext fc,
org.hibernate.Session session)
New dimension filter.
|
static XBRLFilterInterface |
newDimensionFilter(java.lang.String filter,
org.hibernate.Session session)
New dimension filter.
|
void |
removeFactsNotPass(java.util.List<?> lst)
Removes the facts not pass.
|
org.hibernate.Query |
setParameters(org.hibernate.Query q)
Fills in the parameter values for this query in the where clause.
|
public java.lang.String getAsString()
XBRLFilterInterface
getAsString
in interface XBRLFilterInterface
public java.lang.String getWhere() throws java.lang.IllegalAccessException
XBRLFilterInterface
XBRLFilterInterface.hasWhereClause()
function has returned true.
When preparing the returned string, f is the XBRLFact pojo instance other classes may use in the where clause
getWhere
in interface XBRLFilterInterface
java.lang.IllegalAccessException
- if the class does not implements this methodpublic boolean hasWhereClause()
XBRLFilterInterface
hasWhereClause
in interface XBRLFilterInterface
public void removeFactsNotPass(java.util.List<?> lst)
XBRLFilterInterface
removeFactsNotPass
in interface XBRLFilterInterface
lst
- the lstpublic org.hibernate.Query setParameters(org.hibernate.Query q) throws java.lang.IllegalAccessException
XBRLFilterInterface
setParameters
in interface XBRLFilterInterface
q
- the query without the parameters filled in.java.lang.IllegalAccessException
- if the class does not implements this methodpublic static XBRLFilterInterface newDimensionFilter(javax.xml.namespace.QName dimName, FContext fc, org.hibernate.Session session)
dimName
- the dim namefc
- the fcsession
- the sessionpublic static boolean isTypeOfFilter(java.lang.String text)
text
- the textpublic static XBRLFilterInterface newDimensionFilter(java.lang.String filter, org.hibernate.Session session)
filter
- the filtersession
- the sessionpublic static java.lang.String getMainFilterArgument(java.lang.String text)
text
- the textpublic javax.xml.namespace.QName getDimension()
public boolean hasTables()
XBRLFilterInterface
hasTables
in interface XBRLFilterInterface
public java.lang.String getTable() throws java.lang.IllegalAccessException
XBRLFilterInterface
getTable
in interface XBRLFilterInterface
java.lang.IllegalAccessException
- if the method is called for a filter that does not adds tablespublic java.lang.String getTableWhere() throws java.lang.IllegalAccessException
XBRLFilterInterface
getTableWhere
in interface XBRLFilterInterface
java.lang.IllegalAccessException
- if the method is called on a filter that does not adds tablesCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa