Class FilterClause<E extends EntityType>
- All Implemented Interfaces:
SQLFilterClause<E>
there is 2 way to create an object of FilterClause
- create object with constructor ->
FilterClause(Class)in which developer must passClassobject of entity type - create Object with constructor ->
FilterClause()()} in which developer must createClassinstance by callingcreateInstance(EntityType)
- Author:
- alireza_bayat created on 10/19/21
- See Also:
-
Field Summary
Fields inherited from class com.hades.builder.sqlCommand.clauseBuilder.ClauseElements
clause -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionand()to append `and` key word in where clauseto append `and` key word and let some filter to be run in parenthesescreateInstance(E e) create instanceClassof given entity to be used in filter clausescustomClause(String customClause) any customized filter that is not supported by mainSQLFilterClausecan be specifies by this functionequal operand in standard query language main purpose is to set equality operand between given field and filterPhraseequal operand in standard query language main purpose is to set equality operand between given field and filterPhraseexists operand in standard languageIn operand in standard languageIn operand in standard languagelike operand in standard query language to generate like phrase in between given fieldsnot()to append `not` key word in where clauseto append `not` key word and let some filter to be run in parenthesesequal operand in standard query language main purpose is to set equality operand between given field and filterPhrasenot equal operand in standard query language main purpose is to set not equality operand between given field and filterPhrasenot exists operand in standard languagenotIn operand in standard languagenotIn operand in standard languageor()to append `or` key word in where clauseto append `or` key word and let some filter to be run in parenthesesMethods inherited from class com.hades.builder.sqlCommand.clauseBuilder.ClauseElements
getClause, setClause
-
Constructor Details
-
FilterClause
pass entity class object as param
-
FilterClause
public FilterClause()
-
-
Method Details
-
createInstance
Description copied from interface:SQLFilterClausecreate instance
Classof given entity to be used in filter clausesprobably not needed in second approach
- Specified by:
createInstancein interfaceSQLFilterClause<E extends EntityType>- Parameters:
e- passed entity object- Returns:
- SQLFilterClause
object
-
equal
Description copied from interface:SQLFilterClauseequal operand in standard query language main purpose is to set equality operand between given field and filterPhrase
- Specified by:
equalin interfaceSQLFilterClause<E extends EntityType>- Parameters:
field- field name which must be present asColumn.name()in entity classfilterPhrase- filtered value in field- Returns:
- SQLFilterClause
object
-
equal
Description copied from interface:SQLFilterClauseequal operand in standard query language main purpose is to set equality operand between given field and filterPhrase
- Specified by:
equalin interfaceSQLFilterClause<E extends EntityType>- Parameters:
selection- field name which must be present asColumn.name()in entity class stored inSelection.fieldNamefilterPhrase- filtered value in field- Returns:
- SQLFilterClause
object
-
notEqual
Description copied from interface:SQLFilterClausenot equal operand in standard query language main purpose is to set not equality operand between given field and filterPhrase
- Specified by:
notEqualin interfaceSQLFilterClause<E extends EntityType>- Parameters:
field- field name which must be present asColumn.name()in entity classfilterPhrase- filtered value in field- Returns:
- SQLFilterClause
object
-
notEqual
Description copied from interface:SQLFilterClauseequal operand in standard query language main purpose is to set equality operand between given field and filterPhrase
- Specified by:
notEqualin interfaceSQLFilterClause<E extends EntityType>- Parameters:
selection- field name which must be present asColumn.name()in entity class stored inSelection.fieldNamefilterPhrase- filtered value in field- Returns:
- SQLFilterClause
object
-
and
Description copied from interface:SQLFilterClauseto append `and` key word in where clause- Specified by:
andin interfaceSQLFilterClause<E extends EntityType>
-
and
Description copied from interface:SQLFilterClauseto append `and` key word and let some filter to be run in parentheses- Specified by:
andin interfaceSQLFilterClause<E extends EntityType>
-
or
Description copied from interface:SQLFilterClauseto append `or` key word in where clause- Specified by:
orin interfaceSQLFilterClause<E extends EntityType>
-
or
Description copied from interface:SQLFilterClauseto append `or` key word and let some filter to be run in parentheses- Specified by:
orin interfaceSQLFilterClause<E extends EntityType>
-
not
Description copied from interface:SQLFilterClauseto append `not` key word in where clause- Specified by:
notin interfaceSQLFilterClause<E extends EntityType>
-
not
Description copied from interface:SQLFilterClauseto append `not` key word and let some filter to be run in parentheses- Specified by:
notin interfaceSQLFilterClause<E extends EntityType>
-
like
Description copied from interface:SQLFilterClauselike operand in standard query language to generate like phrase in between given fields
- Specified by:
likein interfaceSQLFilterClause<E extends EntityType>- Parameters:
field- field name which must be present asColumn.name()matchString- filtered value in field- Returns:
- SQLFilterClause
object
-
between
- Specified by:
betweenin interfaceSQLFilterClause<E extends EntityType>
-
in
Description copied from interface:SQLFilterClauseIn operand in standard language
- Specified by:
inin interfaceSQLFilterClause<E extends EntityType>- Parameters:
field- field name which must be present asColumn.name()in entity classitems- varargs of all the objects that will appear in final clause- Returns:
- SQLFilterClause
object
-
in
Description copied from interface:SQLFilterClauseIn operand in standard language
- Specified by:
inin interfaceSQLFilterClause<E extends EntityType>- Parameters:
field- field name which must be present asColumn.name()in entity classcustomQuery- custom objects that will appear in final clause- Returns:
- SQLFilterClause
object
-
notIn
Description copied from interface:SQLFilterClausenotIn operand in standard language
- Specified by:
notInin interfaceSQLFilterClause<E extends EntityType>- Parameters:
field- field name which must be present asColumn.name()in entity classitems- varargs of all the objects that will appear in final clause- Returns:
- SQLFilterClause
object
-
notIn
Description copied from interface:SQLFilterClausenotIn operand in standard language
- Specified by:
notInin interfaceSQLFilterClause<E extends EntityType>- Parameters:
field- field name which must be present asColumn.name()in entity classcustomQuery- custom objects that will appear in final clause- Returns:
- SQLFilterClause
object
-
exists
Description copied from interface:SQLFilterClauseexists operand in standard language
- Specified by:
existsin interfaceSQLFilterClause<E extends EntityType>- Parameters:
customQuery- exact query will appear in final query- Returns:
- SQLFilterClause
object
-
notExists
Description copied from interface:SQLFilterClausenot exists operand in standard language
- Specified by:
notExistsin interfaceSQLFilterClause<E extends EntityType>- Parameters:
customQuery- exact query will be appeared in final query- Returns:
- SQLFilterClause
object
-
innerSelect
- Specified by:
innerSelectin interfaceSQLFilterClause<E extends EntityType>
-
customClause
Description copied from interface:SQLFilterClauseany customized filter that is not supported by main
SQLFilterClausecan be specifies by this function- Specified by:
customClausein interfaceSQLFilterClause<E extends EntityType>- Parameters:
customClause- any customized filter clause- Returns:
- SQLFilterClause
object
-