public class SortBy
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
SortBy.Order |
Modifier and Type | Field and Description |
---|---|
boolean |
active |
static boolean |
DEFAULT_ACTIVE |
static int |
DEFAULT_L_S_B |
static int |
DEFAULT_LIMIT |
static int |
DEFAULT_M_S_B |
static long |
DEFAULT_MIN |
static java.lang.String |
DEFAULT_ORDER |
java.lang.String |
expr |
int |
limit |
int |
LSB |
long |
min |
int |
MSB |
java.lang.String |
name |
java.lang.String |
order |
Constructor and Description |
---|
SortBy() |
SortBy(SortBy o)
Copy constructor
|
SortBy(java.lang.String expr,
java.lang.String order) |
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this SortBy.
|
static SortBy |
fromString(java.lang.String s)
String representation of this SortBy.
|
java.lang.String |
getExpr()
Virtual expression to compare.
|
int |
getLimit()
Maximum number of characters to use when matching string values.
0 means the entire string is used for matching. Applies to alphanumerical values only. |
int |
getLSB()
Position of the least significant bit to be considered.
|
long |
getMin()
Minimum value needed for a the document to be returned by the query.
Applies to integer and double values only. 0 means keep all documents. Discards documents with a value below the minimum. Keeps documents with undefined value for this field. |
int |
getMSB()
Position of the most significant bit to be considered.
|
java.lang.String |
getName()
Unique sort name.
|
java.lang.String |
getOrder()
Sort order
Value can be null or one of
asc
desc
|
SortBy.Order |
getOrderAsEnum()
Sort order
Value can be null or one of
asc
desc
|
static boolean |
isA(java.lang.String str,
SortBy.Order item) |
boolean |
isActive()
Defines if the sort is applied by default.
|
static boolean |
isOneOf(java.lang.String str,
SortBy.Order... items) |
SortBy |
makeCopy()
Creates and returns a deep copy of this SortBy.
|
static SortBy |
readFrom(java.io.InputStream is)
Read this SortBy from an XML fragment.
|
void |
setActive(boolean active)
Defines if the sort is applied by default.
|
void |
setExpr(java.lang.String expr)
Virtual expression to compare.
|
void |
setLimit(int limit)
Maximum number of characters to use when matching string values.
0 means the entire string is used for matching. Applies to alphanumerical values only. |
void |
setLSB(int LSB)
Position of the least significant bit to be considered.
|
void |
setMin(long min)
Minimum value needed for a the document to be returned by the query.
Applies to integer and double values only. 0 means keep all documents. Discards documents with a value below the minimum. Keeps documents with undefined value for this field. |
void |
setMSB(int MSB)
Position of the most significant bit to be considered.
|
void |
setName(java.lang.String name)
Unique sort name.
|
void |
setOrder(SortBy.Order item)
Sort order
Value can be null or one of
asc
desc
|
void |
setOrder(java.lang.String order)
Sort order
Value can be null or one of
asc
desc
|
java.lang.String |
toString()
String representation of this SortBy.
|
SortBy |
withActive(boolean active) |
SortBy |
withActive(java.lang.Boolean active) |
SortBy |
withExpr(java.lang.String expr) |
SortBy |
withLimit(int limit) |
SortBy |
withLimit(java.lang.Integer limit) |
SortBy |
withLSB(int LSB) |
SortBy |
withLSB(java.lang.Integer LSB) |
SortBy |
withMin(long min) |
SortBy |
withMin(java.lang.Long min) |
SortBy |
withMSB(int MSB) |
SortBy |
withMSB(java.lang.Integer MSB) |
SortBy |
withName(java.lang.String name) |
SortBy |
withOrder(java.lang.String order) |
void |
writeTo(java.io.OutputStream os)
Write this SortBy as an XML fragment
|
public java.lang.String name
public java.lang.String expr
public int LSB
public static final int DEFAULT_L_S_B
public int MSB
public static final int DEFAULT_M_S_B
public int limit
public static final int DEFAULT_LIMIT
public long min
public static final long DEFAULT_MIN
public java.lang.String order
public static final java.lang.String DEFAULT_ORDER
public boolean active
public static final boolean DEFAULT_ACTIVE
public SortBy()
public SortBy(java.lang.String expr, java.lang.String order)
public SortBy(SortBy o)
public static boolean isA(java.lang.String str, SortBy.Order item)
public static boolean isOneOf(java.lang.String str, SortBy.Order... items)
public void setOrder(SortBy.Order item)
public SortBy.Order getOrderAsEnum()
public void setName(java.lang.String name)
public java.lang.String getName()
public SortBy withName(java.lang.String name)
public void setExpr(java.lang.String expr)
public java.lang.String getExpr()
public SortBy withExpr(java.lang.String expr)
public void setLSB(int LSB)
public int getLSB()
public SortBy withLSB(int LSB)
public SortBy withLSB(java.lang.Integer LSB)
public void setMSB(int MSB)
public int getMSB()
public SortBy withMSB(int MSB)
public SortBy withMSB(java.lang.Integer MSB)
public void setLimit(int limit)
public int getLimit()
public SortBy withLimit(int limit)
public SortBy withLimit(java.lang.Integer limit)
public void setMin(long min)
public long getMin()
public SortBy withMin(long min)
public SortBy withMin(java.lang.Long min)
public void setOrder(java.lang.String order)
public java.lang.String getOrder()
public SortBy withOrder(java.lang.String order)
public void setActive(boolean active)
public boolean isActive()
public SortBy withActive(boolean active)
public SortBy withActive(java.lang.Boolean active)
public SortBy makeCopy()
public static SortBy readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static SortBy fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.