|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.plugins.contact.business.ContactListDAO
public final class ContactListDAO
This class provides Data Access methods for Contact objects
Constructor Summary | |
---|---|
ContactListDAO()
|
Method Summary | |
---|---|
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 |
java.util.Collection<ContactList> |
selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of contactsList |
java.util.Collection<ContactList> |
selectAssignedListsFor(int nIdContact,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects assigned lists for a contact |
java.util.Collection<ContactList> |
selectByRoleKey(java.lang.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 |
java.util.Collection<Contact> |
selectContactsForList(int nIdContactList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects all contacts associated to a specified list |
java.util.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 |
java.util.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContactListDAO()
Method Detail |
---|
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 contact
public java.util.Collection<ContactList> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAll
in interface IContactListDAO
plugin
- The plugin
public java.util.Collection<ContactList> selectByRoleKey(java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectByRoleKey
in interface IContactListDAO
strRoleKey
- The role keyplugin
- the plugin contact
public int countContactsForList(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
countContactsForList
in interface IContactListDAO
nIdContactList
- the Id of contactListplugin
- the plugin contact
public int countListsForContact(int nIdContact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
countListsForContact
in interface IContactListDAO
nIdContact
- the Id of concerned contactplugin
- the plugin contact
public boolean listExists(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
listExists
in interface IContactListDAO
nIdContactList
- The if of contactListplugin
- The Plugin object
public java.util.Collection<Contact> selectContactsForList(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectContactsForList
in interface IContactListDAO
nIdContactList
- the id of contactListplugin
- the plugin contact
public 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 contact
public 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 java.util.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 contact
public java.util.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 contact
public java.util.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 contact
public 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 plugin
public int selectContactListOrderById(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectContactListOrderById
in interface IContactListDAO
nIdContactList
- the id of contactListplugin
- the plugin contact
public int maxOrderContactList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
maxOrderContactList
in interface IContactListDAO
plugin
- The plugin
public int maxOrderContact(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
maxOrderContact
in interface IContactListDAO
nIdContactList
- the id of the contact listplugin
- The plugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |