fr.cnes.sitools.dataset.database
Class DatabaseRequestParameters

java.lang.Object
  extended by fr.cnes.sitools.dataset.database.DatabaseRequestParameters

public class DatabaseRequestParameters
extends java.lang.Object

Object to store the parameters for a particular Database request

Author:
m.gond (AKKA Technologies) [#3355053]
2011/07/06 d.arpin {Change the name and the return of the method getColumnFromQuery -> getColumnFromDistinctQuery}

Field Summary
static int RETURN_ALL
          Return datasource limit ( limit=-1 specified )
static int RETURN_FIRST_PAGE
          Constant used when returning first page ( no limit specified )
 
Constructor Summary
DatabaseRequestParameters()
          default parameter
DatabaseRequestParameters(SitoolsDataSource db, int startIndex, java.lang.Boolean distinct, boolean isCountDone, DataSet dataset, java.util.List<Predicat> predicats, java.util.List<Structure> structures, Multisort orderBy, Column columnFromDistinctQuery, java.util.List<Column> sqlVisibleColumns, int paginationExtend, java.lang.String baseRef, java.lang.String[] idList, java.util.List<Range> ranges, java.util.List<Column> allVisibleColumns)
          Create a new DatabaseRequestParameters
 
Method Summary
 java.util.List<Column> getAllVisibleColumns()
          Gets the list of all the visible columns in the request set to visible or asked (SQL + Virtual) NoClientAccess column are not added
 java.lang.String getBaseRef()
          Gets the baseRef value
 Column getColumnFromDistinctQuery()
          Get a Column of the specified ColumnALias
 DataSet getDataset()
          Gets the DataSet value
 java.lang.String getDatasetId()
          Gets the datasetId value
 SitoolsDataSource getDb()
          Gets the DataSource value
 java.lang.Boolean getDistinct()
          Gets the distinct value
 java.lang.String[] getIdList()
          Gets the idList value
 int getMaxrows()
          Gets the max rows value
 Multisort getOrderBy()
          Gets the orderBy value
 int getPaginationExtend()
          Gets the paginationExtend value
 java.util.List<Predicat> getPredicats()
          Gets the predicates value
 java.util.List<Range> getRanges()
          Gets the ranges value
 java.util.List<Column> getSqlVisibleColumns()
          Gets the list of the sql visible columns used in the database request
 int getStartIndex()
          Gets the startIndex value
 java.util.List<Structure> getStructures()
          Gets the structures value
 boolean isCountDone()
          Gets the isCountDone value
 void setAllVisibleColumns(java.util.List<Column> allVisibleColumns)
          Sets the list of all the visible columns in the request (SQL + Virtual)
 void setBaseRef(java.lang.String baseRef)
          Sets the value of baseRef
 void setColumnFromDisctinctQuery(Column columnFromDistinctQuery)
          Sets the value of columnFromDistinctQuery
 void setCountDone(boolean isCountDone)
          Sets the value of isCountDone Set it to true to do a count before the request, false otherwise
 void setDataset(DataSet dataset)
          Sets the value of DataSet
 void setDatasetId(java.lang.String datasetId)
          Sets the value of datasetId
 void setDb(SitoolsDataSource db)
          Sets the value of DataSource
 void setDistinct(java.lang.Boolean distinct)
          Sets the value of distinct
 void setIdList(java.lang.String[] idList)
          Sets the value of idList
 void setMaxrows(int maxrows)
          Sets the value of max rows
 void setOrderBy(Multisort orderBy)
          Sets the value of orderBy
 void setPaginationExtend(int paginationExtend)
          Sets the value of paginationExtend
 void setPredicats(java.util.List<Predicat> predicats)
          Sets the value of predicates
 void setRanges(java.util.List<Range> ranges)
          Sets the value of ranges
 void setSqlVisibleColumns(java.util.List<Column> sqlVisibleColumns)
          Sets the list of the sql visible columns used in the database request
 void setStartIndex(int startIndex)
          Sets the value of startIndex
 void setStructures(java.util.List<Structure> structures)
          Sets the value of structures
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RETURN_FIRST_PAGE

public static final int RETURN_FIRST_PAGE
Constant used when returning first page ( no limit specified )

See Also:
Constant Field Values

RETURN_ALL

public static final int RETURN_ALL
Return datasource limit ( limit=-1 specified )

See Also:
Constant Field Values
Constructor Detail

DatabaseRequestParameters

public DatabaseRequestParameters()
default parameter


DatabaseRequestParameters

public DatabaseRequestParameters(SitoolsDataSource db,
                                 int startIndex,
                                 java.lang.Boolean distinct,
                                 boolean isCountDone,
                                 DataSet dataset,
                                 java.util.List<Predicat> predicats,
                                 java.util.List<Structure> structures,
                                 Multisort orderBy,
                                 Column columnFromDistinctQuery,
                                 java.util.List<Column> sqlVisibleColumns,
                                 int paginationExtend,
                                 java.lang.String baseRef,
                                 java.lang.String[] idList,
                                 java.util.List<Range> ranges,
                                 java.util.List<Column> allVisibleColumns)
Create a new DatabaseRequestParameters

Parameters:
db - the DataSource
startIndex - the start index
distinct - true if the request must return distinct records. Used for auto-completion.
isCountDone - Indicates if the count is done
dataset - The DataSet
predicats - The list of predicates
structures - the list of structures
orderBy - orderBy
columnFromDistinctQuery - the from column list
sqlVisibleColumns - the visible column list
paginationExtend - the pagination needed
baseRef - baseRef
idList - the list of ids needed
ranges - the list of range needed
allVisibleColumns - list of all visible columns
Method Detail

getDb

public final SitoolsDataSource getDb()
Gets the DataSource value

Returns:
the DataSource

setDb

public final void setDb(SitoolsDataSource db)
Sets the value of DataSource

Parameters:
db - the DataSource to set

getStartIndex

public final int getStartIndex()
Gets the startIndex value

Returns:
the startIndex

setStartIndex

public final void setStartIndex(int startIndex)
Sets the value of startIndex

Parameters:
startIndex - the startIndex to set

getDistinct

public final java.lang.Boolean getDistinct()
Gets the distinct value

Returns:
the distinct

setDistinct

public final void setDistinct(java.lang.Boolean distinct)
Sets the value of distinct

Parameters:
distinct - the distinct to set

isCountDone

public final boolean isCountDone()
Gets the isCountDone value

Returns:
the isCountDone

setCountDone

public final void setCountDone(boolean isCountDone)
Sets the value of isCountDone

Set it to true to do a count before the request, false otherwise

Parameters:
isCountDone - the isCountDone to set

getDataset

public final DataSet getDataset()
Gets the DataSet value

Returns:
the DataSet

setDataset

public final void setDataset(DataSet dataset)
Sets the value of DataSet

Parameters:
dataset - the DataSet to set

getPredicats

public final java.util.List<Predicat> getPredicats()
Gets the predicates value

Returns:
the predicates

setPredicats

public final void setPredicats(java.util.List<Predicat> predicats)
Sets the value of predicates

Parameters:
predicats - the predicates to set

getStructures

public final java.util.List<Structure> getStructures()
Gets the structures value

Returns:
the structures

setStructures

public final void setStructures(java.util.List<Structure> structures)
Sets the value of structures

Parameters:
structures - the structures to set

getOrderBy

public final Multisort getOrderBy()
Gets the orderBy value

Returns:
the orderBy

setOrderBy

public final void setOrderBy(Multisort orderBy)
Sets the value of orderBy

Parameters:
orderBy - the orderBy to set

getColumnFromDistinctQuery

public final Column getColumnFromDistinctQuery()
Get a Column of the specified ColumnALias

Returns:
a column

setColumnFromDisctinctQuery

public final void setColumnFromDisctinctQuery(Column columnFromDistinctQuery)
Sets the value of columnFromDistinctQuery

Parameters:
columnFromDistinctQuery - the columnFromDistinctQuery to set

getSqlVisibleColumns

public java.util.List<Column> getSqlVisibleColumns()
Gets the list of the sql visible columns used in the database request

Returns:
the sqlVisibleColumns

setSqlVisibleColumns

public void setSqlVisibleColumns(java.util.List<Column> sqlVisibleColumns)
Sets the list of the sql visible columns used in the database request

Parameters:
sqlVisibleColumns - the sqlVisibleColumn to set

getPaginationExtend

public final int getPaginationExtend()
Gets the paginationExtend value

Returns:
the paginationExtend

setPaginationExtend

public final void setPaginationExtend(int paginationExtend)
Sets the value of paginationExtend

Parameters:
paginationExtend - the paginationExtend to set

getBaseRef

public final java.lang.String getBaseRef()
Gets the baseRef value

Returns:
the baseRef

setBaseRef

public final void setBaseRef(java.lang.String baseRef)
Sets the value of baseRef

Parameters:
baseRef - the baseRef to set

setDatasetId

public final void setDatasetId(java.lang.String datasetId)
Sets the value of datasetId

Parameters:
datasetId - the datasetId to set

getDatasetId

public final java.lang.String getDatasetId()
Gets the datasetId value

Returns:
the datasetId

getMaxrows

public final int getMaxrows()
Gets the max rows value

Returns:
the max rows

setMaxrows

public final void setMaxrows(int maxrows)
Sets the value of max rows

Parameters:
maxrows - the max rows to set

setIdList

public final void setIdList(java.lang.String[] idList)
Sets the value of idList

Parameters:
idList - the idList to set

getIdList

public final java.lang.String[] getIdList()
Gets the idList value

Returns:
the idList

setRanges

public void setRanges(java.util.List<Range> ranges)
Sets the value of ranges

Parameters:
ranges - the ranges to set

getRanges

public java.util.List<Range> getRanges()
Gets the ranges value

Returns:
the ranges

getAllVisibleColumns

public java.util.List<Column> getAllVisibleColumns()
Gets the list of all the visible columns in the request set to visible or asked (SQL + Virtual) NoClientAccess column are not added

Returns:
the allVisibleColumns

setAllVisibleColumns

public void setAllVisibleColumns(java.util.List<Column> allVisibleColumns)
Sets the list of all the visible columns in the request (SQL + Virtual)

Parameters:
allVisibleColumns - the allVisibleColumns to set


Copyright © 2010-2013 CNES. All Rights Reserved.