public final class ContactListDAO extends Object implements IContactListDAO
Constructor and Description |
---|
ContactListDAO() |
Modifier and Type | Method and Description |
---|---|
void |
assign(int nIdContact,
int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Inserts 2 keys in association table
|
int |
countContactsForList(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
counts how many contacts are associated to the specified list
|
int |
countListsForContact(int nIdContact,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
counts how many lists the contact is associated to
|
void |
delete(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table
|
void |
insert(ContactList contactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.
|
boolean |
isAssigned(int nIdContact,
int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
returns true if a contact is assigned to a list
|
boolean |
listExists(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns true if the contactList exists
|
ContactList |
load(int nContactListId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of Contact from the table
|
int |
maxOrderContact(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculate the new max order in a list
|
int |
maxOrderContactList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculate the new max order in a list
|
Collection<ContactList> |
selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of contactsList
|
Collection<ContactList> |
selectAssignedListsFor(int nIdContact,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects assigned lists for a contact
|
Collection<ContactList> |
selectByRoleKey(String strRoleKey,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects lists for a role key
|
int |
selectContactListIdByOrder(int nContactListOrder,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a contact identifier in a distinct order
|
int |
selectContactListOrderById(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the order of a contactList
|
Collection<Contact> |
selectContactsForList(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects all contacts associated to a specified list
|
Collection<Contact> |
selectNotAssignedContactsFor(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects the list of all contacts that are not assigned to the specified list
|
Collection<ContactList> |
selectNotAssignedListsFor(int nIdContact,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
selects all lists, the contact is not associated to
|
void |
store(ContactList contactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
|
void |
storeContactListOrder(int nNewOrder,
int nId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Modify the order of a contact
|
void |
unAssign(int nIdContact,
int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Unassigns a contact of a list, or a list of a contact
|
void |
unassignContactsForList(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Unassigns all contacts for a specified list
|
void |
unassignListsForContact(int nIdContact,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Unassigns all lists, the specified contact is assigned to
|
public void insert(ContactList contactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
insert
in interface IContactListDAO
contactList
- the instance of contactList to insert into DBplugin
- the plugin contactpublic ContactList load(int nContactListId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
load
in interface IContactListDAO
nContactListId
- the Id of the contactList to loadplugin
- the plugin contactpublic Collection<ContactList> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAll
in interface IContactListDAO
plugin
- The pluginpublic Collection<ContactList> selectByRoleKey(String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectByRoleKey
in interface IContactListDAO
strRoleKey
- The role keyplugin
- the plugin contactpublic int countContactsForList(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
countContactsForList
in interface IContactListDAO
nIdContactList
- the Id of contactListplugin
- the plugin contactpublic int countListsForContact(int nIdContact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
countListsForContact
in interface IContactListDAO
nIdContact
- the Id of concerned contactplugin
- the plugin contactpublic boolean listExists(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
listExists
in interface IContactListDAO
nIdContactList
- The if of contactListplugin
- The Plugin objectpublic Collection<Contact> selectContactsForList(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectContactsForList
in interface IContactListDAO
nIdContactList
- the id of contactListplugin
- the plugin contactpublic boolean isAssigned(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
isAssigned
in interface IContactListDAO
nIdContact
- The id of the contactnIdContactList
- The id of the contactListplugin
- the plugin contactpublic void assign(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
assign
in interface IContactListDAO
nIdContact
- The id of the contactnIdContactList
- The contact List that will be associatedplugin
- The pluginpublic void unAssign(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
unAssign
in interface IContactListDAO
nIdContact
- the id of the contactnIdContactList
- the id of the contactListplugin
- The pluginpublic Collection<Contact> selectNotAssignedContactsFor(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectNotAssignedContactsFor
in interface IContactListDAO
nIdContactList
- the id of the contact Listplugin
- the plugin contactpublic Collection<ContactList> selectAssignedListsFor(int nIdContact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAssignedListsFor
in interface IContactListDAO
nIdContact
- the id of the contactplugin
- the plugin contactpublic Collection<ContactList> selectNotAssignedListsFor(int nIdContact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectNotAssignedListsFor
in interface IContactListDAO
nIdContact
- the id of the contactplugin
- the plugin contactpublic void delete(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
delete
in interface IContactListDAO
nIdContactList
- the id of contactlist to deleteplugin
- The pluginpublic void unassignContactsForList(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
unassignContactsForList
in interface IContactListDAO
nIdContactList
- the id of contactlistplugin
- the plugin contactpublic void unassignListsForContact(int nIdContact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
unassignListsForContact
in interface IContactListDAO
nIdContact
- the Id of the contactplugin
- the plugin contactpublic void store(ContactList contactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
store
in interface IContactListDAO
contactList
- The reference of contactListplugin
- The pluginpublic void storeContactListOrder(int nNewOrder, int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
storeContactListOrder
in interface IContactListDAO
nNewOrder
- The order numbernId
- The contactList identifierplugin
- The pluginpublic int selectContactListIdByOrder(int nContactListOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectContactListIdByOrder
in interface IContactListDAO
nContactListOrder
- The order numberplugin
- The pluginpublic int selectContactListOrderById(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectContactListOrderById
in interface IContactListDAO
nIdContactList
- the id of contactListplugin
- the plugin contactpublic int maxOrderContactList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
maxOrderContactList
in interface IContactListDAO
plugin
- The pluginpublic int maxOrderContact(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
maxOrderContact
in interface IContactListDAO
nIdContactList
- the id of the contact listplugin
- The pluginCopyright © 2018 City of Paris. All rights reserved.