|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.data.DataObject
org.opensubsystems.core.data.BasicDataObject
org.opensubsystems.core.data.ModifiableDataObject
org.opensubsystems.patterns.listdata.data.ListDefinition
public class ListDefinition
This class describes the list of data objects. It allows to specify what attributes of the data objects to load, what conditions have to data objects satisfy to be included in the list, what should be the order of data elements, etc.
| Field Summary | |
|---|---|
static int |
DEFAULT_PAGE_SIZE
Default number of items to display at once page. |
protected int[] |
m_arrOrderColumnCodes
Code of the columns to order by, for each column at the same index is in m_arrOrderDirections setup the type of ordering. |
protected java.lang.String[] |
m_arrOrderDirections
Type of the ordering ASC/DESC. |
protected int[] |
m_arrShowColumnCodes
Default list of attributes to retrieve for each data objects. |
protected int |
m_iPageSize
Default page size that is how many items are retrieved at once. |
protected SimpleRule |
m_rule
Rule, which the data objects in the list have to satisfy. |
static java.lang.String |
ORDER_ASCENDING
Order the list in ascending order by specified column. |
static java.lang.String[] |
ORDER_ASCENDING_ARRAY
Convenience constant of array type. |
static java.lang.String[] |
ORDER_ASCENDING2_ARRAY
Convenience constant of array type. |
static java.lang.String |
ORDER_DESCENDING
Order the list in descending order by specified column. |
static java.lang.String[] |
ORDER_DESCENDING_ARRAY
Convenience constant of array type. |
static java.lang.String[] |
ORDER_DESCENDING2_ARRAY
Convenience constant of array type. |
| Fields inherited from class org.opensubsystems.core.data.ModifiableDataObject |
|---|
m_modificationTimestamp |
| Fields inherited from class org.opensubsystems.core.data.BasicDataObject |
|---|
m_creationTimestamp, m_iDomainId |
| Fields inherited from class org.opensubsystems.core.data.DataObject |
|---|
NEW_ID, NEW_ID_OBJ, NEW_ID_STR |
| Constructor Summary | |
|---|---|
ListDefinition()
Empty constructor - default values |
|
ListDefinition(int[] arrOrderColumnCodes,
java.lang.String[] arrOrderDirections,
int[] arrShowColumnCodes)
Default constructor with only the necessary paramaters |
|
ListDefinition(int iId,
int iDomainId,
int iPageSize,
int[] arrOrderColumnCodes,
java.lang.String[] arrOrderDirections,
int[] arrShowColumnCodes,
SimpleRule rule,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
Complete constructor with all paramaters |
|
| Method Summary | |
|---|---|
int[] |
getOrderColumnCodes()
This is the list of column codes to order by which should be taken into account when this filter is used unless otherwise overriden. |
java.lang.String[] |
getOrderDirections()
This is the default direction of ordering (ASC/DESC) which should be fetched when this definition is used unless otherwise overriden. |
int |
getPageSize()
This is the default page size which should be retrieved and determines how many data objects are retrieved at once. |
SimpleRule |
getRule()
|
int[] |
getShowColumnCodes()
Set column codes of columns which should be displayed on GUI. |
boolean |
isSame(java.lang.Object oObject)
|
void |
setOrdering(int[] arrOrderColumnCodes,
java.lang.String[] arrOrderTypes)
|
void |
setPageSize(int iPageSize)
Set page size for items displayed on GUI. |
void |
setRule(SimpleRule rule)
Set the rule for list definition. |
void |
setShowColumnCodes(int[] wShowColumnCodes)
Set column codes of data object attributes, which should be retrieved. |
| Methods inherited from class org.opensubsystems.core.data.ModifiableDataObject |
|---|
equals, getModificationTimestamp, hashCode, restore, setModificationTimestamp |
| Methods inherited from class org.opensubsystems.core.data.BasicDataObject |
|---|
getCreationTimestamp, getDomainId, getId, getIdAsObject, restore, setCreationTimestamp, setId |
| Methods inherited from class org.opensubsystems.core.data.DataObject |
|---|
isFromPersistenceStore, setFromPersistenceStore |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_PAGE_SIZE
public static final java.lang.String ORDER_ASCENDING
public static final java.lang.String[] ORDER_ASCENDING_ARRAY
public static final java.lang.String[] ORDER_ASCENDING2_ARRAY
public static final java.lang.String ORDER_DESCENDING
public static final java.lang.String[] ORDER_DESCENDING_ARRAY
public static final java.lang.String[] ORDER_DESCENDING2_ARRAY
protected int[] m_arrOrderColumnCodes
protected java.lang.String[] m_arrOrderDirections
protected int m_iPageSize
protected int[] m_arrShowColumnCodes
protected SimpleRule m_rule
| Constructor Detail |
|---|
public ListDefinition()
public ListDefinition(int[] arrOrderColumnCodes,
java.lang.String[] arrOrderDirections,
int[] arrShowColumnCodes)
arrOrderColumnCodes - - codes for columns to order by, pass null if nonearrOrderDirections - - order directions (ASC/DESC), see ORDER_XXX constantsarrShowColumnCodes - - array of attributes to retrieve for each data object
public ListDefinition(int iId,
int iDomainId,
int iPageSize,
int[] arrOrderColumnCodes,
java.lang.String[] arrOrderDirections,
int[] arrShowColumnCodes,
SimpleRule rule,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
iId - - List definition IDiDomainId - - domain IDiPageSize - - page size determines how many items are retrieved at oncearrOrderColumnCodes - - codes for columns to order by, pass null if nonearrOrderDirections - - order directions (ASC/DESC), see ORDER_XXX constantsarrShowColumnCodes - - array of column codes to showrule - - rule which the data in the list have to satisfycreationTimestamp - - creation datemodificationTimestamp - - last modification date| Method Detail |
|---|
public java.lang.String[] getOrderDirections()
public int[] getOrderColumnCodes()
public int getPageSize()
public int[] getShowColumnCodes()
public SimpleRule getRule()
public void setRule(SimpleRule rule)
rule - - simple rulepublic void setPageSize(int iPageSize)
iPageSize - - array of column codes to showpublic void setShowColumnCodes(int[] wShowColumnCodes)
wShowColumnCodes - - array of column codes to show
public void setOrdering(int[] arrOrderColumnCodes,
java.lang.String[] arrOrderTypes)
arrOrderColumnCodes - - codes for columns to order by, pass null if nonearrOrderTypes - - types of ordering for each columnpublic boolean isSame(java.lang.Object oObject)
isSame in class org.opensubsystems.core.data.DataObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||