fr.paris.lutece.plugins.contact.business
Interface IContactListDAO

All Known Implementing Classes:
ContactListDAO

public interface IContactListDAO

IContactDAO Interface


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
 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<Contact> selectContactsForList(int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Selects all contacts associated to a specified list
 int selectIdByOrder(int nContactOrder, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a contact identifier in a distinct order
 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
 int selectOrderById(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a contact identifier in a distinct order
 void store(ContactList contactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void storeContactOrder(int nNewOrder, int nId, int nIdContactList, 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 contacts for a specified list
 

Method Detail

insert

void insert(ContactList contactList,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Parameters:
contactList - the instance of contactList to insert into DB
plugin - the plugin contact

load

ContactList load(int nContactListId,
                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of Contact from the table

Parameters:
nContactListId - the Id of the contactList to load
plugin - the plugin contact
Returns:
the instance of contactList object loaded

delete

void delete(int nIdContactList,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Parameters:
nIdContactList - the id of contactlist to delete
plugin - The plugin

store

void store(ContactList contactList,
           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
contactList - The reference of contactList
plugin - The plugin

selectAll

java.util.Collection<ContactList> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of contactsList

Parameters:
plugin - The plugin
Returns:
The Collection of the Contacts

countContactsForList

int countContactsForList(int nIdContactList,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
counts how many contacts are associated to the specified list

Parameters:
nIdContactList - the Id of contactList
plugin - the plugin contact
Returns:
the number of contacts for the list

selectContactsForList

java.util.Collection<Contact> selectContactsForList(int nIdContactList,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects all contacts associated to a specified list

Parameters:
nIdContactList - the id of contactList
plugin - the plugin contact
Returns:
list of contacts

isAssigned

boolean isAssigned(int nIdContact,
                   int nIdContactList,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
returns true if a contact is assigned to a list

Parameters:
nIdContact - The id of the contact
nIdContactList - The id of the contactList
plugin - the plugin contact
Returns:
boolean: true if is assigned, false if not

assign

void assign(int nIdContact,
            int nIdContactList,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Inserts 2 keys in association table

Parameters:
nIdContact - The id of the contact
nIdContactList - The contact List that will be associated
plugin - The plugin

unAssign

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

Parameters:
nIdContact - the id of the contact
nIdContactList - the id of the contactList
plugin - The plugin

selectNotAssignedContactsFor

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

Parameters:
nIdContactList - the id of the contact List
plugin - the plugin contact
Returns:
list of not assigned contacts

selectAssignedListsFor

java.util.Collection<ContactList> selectAssignedListsFor(int nIdContact,
                                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Selects assigned lists for a contact

Parameters:
nIdContact - the id of the contact
plugin - the plugin contact
Returns:
collection of lists, the contact is associated to

selectNotAssignedListsFor

java.util.Collection<ContactList> selectNotAssignedListsFor(int nIdContact,
                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
selects all lists, the contact is not associated to

Parameters:
nIdContact - the id of the contact
plugin - the plugin contact
Returns:
collection of contactLists

unassignContactsForList

void unassignContactsForList(int nIdContactList,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Unassigns all contacts for a specified list

Parameters:
nIdContactList - the id of contactlist
plugin - the plugin contact

storeContactOrder

void storeContactOrder(int nNewOrder,
                       int nId,
                       int nIdContactList,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Modify the order of a contact

Parameters:
nIdContactList - the id of contactList
nNewOrder - The order number
nId - The contact identifier
plugin - The plugin

selectIdByOrder

int selectIdByOrder(int nContactOrder,
                    int nIdContactList,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a contact identifier in a distinct order

Parameters:
nIdContactList - the id of contactList
nContactOrder - The order number
plugin - The plugin
Returns:
The order of the Contact

maxOrderContact

int maxOrderContact(int nIdContactList,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculate the new max order

Parameters:
nIdContactList - the id of contactList
plugin - The plugin
Returns:
the max order of contact

unassignListsForContact

void unassignListsForContact(int nIdContact,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Unassigns all contacts for a specified list

Parameters:
nIdContact - the id of contact
plugin - the plugin contact

selectOrderById

int selectOrderById(int nIdContact,
                    int nIdContactList,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a contact identifier in a distinct order

Parameters:
nIdContact - the id of contact
nIdContactList - the id of the contact List
plugin - The plugin
Returns:
The order of the Contact

countListsForContact

int countListsForContact(int nIdContact,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
counts how many lists the contact is associated to

Parameters:
nIdContact - the Id of concerned contact
plugin - the plugin contact
Returns:
the number of counted lists

listExists

boolean listExists(int nIdContactList,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns true if the contactList exists

Parameters:
nIdContactList - The if of contactList
plugin - The Plugin object
Returns:
boolean the existance of the list


Copyright © 2008 Mairie de Paris. All Rights Reserved.