public class ContextService extends Object implements IContextService
| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_SERVICE
The Constant BEAN_SERVICE.
|
| Constructor and Description |
|---|
ContextService() |
| Modifier and Type | Method and Description |
|---|---|
void |
create(Context context)
Create a new context
|
void |
doReorderContexts()
Reorder all demand types
|
void |
doReorderContextsGreaterPriority(int nCurrentPriority)
Reorder the contexts that are greater or equal to the nCurrentPriority.
|
List<Context> |
findActiveContexts()
Find active contexts
|
List<Context> |
findAll()
Find all contexts
|
Context |
findByPrimaryKey(int nIdContext)
Find context by its primary key
|
List<Context> |
findByRelativePriority(OperatorEnum operator,
int nPriority)
Find by relative priority
|
boolean |
isWellOrdered()
Check if the list of contexts are well ordered
|
void |
remove(int nIdContext)
Remove a context
|
void |
update(Context context)
Update a context
|
public static final String BEAN_SERVICE
@Transactional(value="contextinclude.transactionManager") public void create(Context context)
create in interface IContextServicecontext - the context@Transactional(value="contextinclude.transactionManager") public void update(Context context)
update in interface IContextServicecontext - a context@Transactional(value="contextinclude.transactionManager") public void remove(int nIdContext)
remove in interface IContextServicenIdContext - the id contextpublic Context findByPrimaryKey(int nIdContext)
findByPrimaryKey in interface IContextServicenIdContext - the id contextContextpublic List<Context> findAll()
findAll in interface IContextServiceContextpublic List<Context> findActiveContexts()
findActiveContexts in interface IContextServiceContextpublic List<Context> findByRelativePriority(OperatorEnum operator, int nPriority)
findByRelativePriority in interface IContextServiceoperator - the operatornPriority - the priority to compare toContextpublic boolean isWellOrdered()
isWellOrdered in interface IContextServicepublic void doReorderContexts()
doReorderContexts in interface IContextServicepublic void doReorderContextsGreaterPriority(int nCurrentPriority)
doReorderContextsGreaterPriority in interface IContextServicenCurrentPriority - the current priorityCopyright © 2015 City of Paris. All rights reserved.