public final class SortQualifier extends Object implements Serializable
One or more SortQualifiers is associated with a SortSpecification, to enable the creation of a SQL order by clause associated with various queries used in iFS.
Constructor and Description |
---|
SortQualifier(String sortAttr,
boolean sortOrder)
Constructs a SortQualifier for a simple qualifier of Attribute and
sort direction.
|
SortQualifier(String sortAttr,
boolean sortOrder,
String sortClass,
String sortAlias,
String sqlFunction)
Construct a SortQualifier for complex qualifiers.
|
Modifier and Type | Method and Description |
---|---|
String |
getAttributeName()
Gets the Attribute name.
|
String |
getClassAlias()
Get the alias for the sort attribute's class
|
String |
getClassName()
Gets the sort attribute's class name.
|
protected String |
getColumnName()
Gets the column name that will be used for
this qualifier.
|
boolean |
getSortOrder()
Gets the sort order.
|
protected String |
getSqlFunction()
Get the SQL function to apply on this qualifier.
|
protected void |
resolve(LibrarySessionInterface sess,
SortSpecification sortspec)
Resolve the column name to be used for this sort qualifier.
|
protected void |
unresolve()
Marks this instance as unresolved.
|
public SortQualifier(String sortAttr, boolean sortOrder) throws IfsException
The Attribute's ClassObject is assumed to be the default set on the parent SortSpecification. No class alias is used, nor is any SQL function applied to the qualifier.
sortAttr
- the sort attribute namesortOrder
- the corresponding sort orderIfsException
- if operation fails.public SortQualifier(String sortAttr, boolean sortOrder, String sortClass, String sortAlias, String sqlFunction) throws IfsException
sortAttr
- the sort attribute namesortOrder
- the corresponding sort order; true means ascending, false is desceding.sortClass
- the sort attribute's class namesortAlias
- an alias for the sort attribute's classsqlFunction
- SQL function to apply to the qualifier, or null
for no functionIfsException
- if operation fails.public String getAttributeName() throws IfsException
IfsException
- if operation fails.public boolean getSortOrder() throws IfsException
If it returns true, ascending order is being used. If false, descending order is in use.
IfsException
- if operation fails.public String getClassName() throws IfsException
IfsException
- if operation fails.public String getClassAlias() throws IfsException
IfsException
- if operation fails.protected String getColumnName() throws IfsException
IfsException
- if operation fails.protected String getSqlFunction() throws IfsException
IfsException
- if operation fails.protected void resolve(LibrarySessionInterface sess, SortSpecification sortspec) throws IfsException
sess
- Session contextsortspec
- the referencing sort specificationIfsException
- if operation fails.protected void unresolve()
Clears the m_ColumnName and m_ClassName members only if the class wasn't specified explicitly.
Copyright © 2023. All rights reserved.