Class ContactDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.contact.business.ContactDAO
-
- All Implemented Interfaces:
IContactDAO
public final class ContactDAO extends java.lang.Object implements IContactDAO
This class provides Data Access methods for Contact objects
-
-
Constructor Summary
Constructors Constructor Description ContactDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(Contact contact, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoidinsert(Contact contact, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.Contactload(int nContactId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of Contact from the tablejava.util.Collection<Contact>selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the list of contactsintselectContactIdByOrder(int nContactOrder, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns a contact identifier in a distinct orderintselectContactOrderById(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns the order of a contact in a list, using the Identifierfr.paris.lutece.util.ReferenceListselectContactsByListWithString(int nIdContactList, java.lang.String strComboItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the list of contactsvoidstore(Contact contact, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the tablevoidstoreContactOrder(int nNewOrder, int nId, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Modify the order of a contactvoidupdateHits(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update hits of the contact in contact and contact_list_contact tables
-
-
-
Method Detail
-
insert
public void insert(Contact contact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.- Specified by:
insertin interfaceIContactDAO- Parameters:
contact- The contact objectplugin- The plugin
-
load
public Contact load(int nContactId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of Contact from the table- Specified by:
loadin interfaceIContactDAO- Parameters:
nContactId- The identifier of Contactplugin- The plugin- Returns:
- the instance of the Contact
-
delete
public void delete(Contact contact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table- Specified by:
deletein interfaceIContactDAO- Parameters:
contact- The Contact objectplugin- The plugin
-
store
public void store(Contact contact, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table- Specified by:
storein interfaceIContactDAO- Parameters:
contact- The reference of contactplugin- The plugin
-
selectContactsByListWithString
public fr.paris.lutece.util.ReferenceList selectContactsByListWithString(int nIdContactList, java.lang.String strComboItem, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the list of contacts- Specified by:
selectContactsByListWithStringin interfaceIContactDAO- Parameters:
nIdContactList- The id of contact ListstrComboItem- the string to display at the top of the listplugin- The plugin- Returns:
- The Collection of the Contacts with the string at the top
-
selectAll
public java.util.Collection<Contact> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of contacts- Specified by:
selectAllin interfaceIContactDAO- Parameters:
plugin- The plugin- Returns:
- The Collection of the Contacts
-
updateHits
public void updateHits(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update hits of the contact in contact and contact_list_contact tables- Specified by:
updateHitsin interfaceIContactDAO- Parameters:
nIdContact- id of the contactnIdContactList- id of contact listplugin- the plugin Contact
-
storeContactOrder
public void storeContactOrder(int nNewOrder, int nId, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Modify the order of a contact- Specified by:
storeContactOrderin interfaceIContactDAO- Parameters:
nIdContactList- The id of contactListnNewOrder- The order numbernId- The contact identifierplugin- The plugin
-
selectContactIdByOrder
public int selectContactIdByOrder(int nContactOrder, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns a contact identifier in a distinct order- Specified by:
selectContactIdByOrderin interfaceIContactDAO- Parameters:
nIdContactList- the id of the contact ListnContactOrder- The order numberplugin- The plugin- Returns:
- The order of the Contact
-
selectContactOrderById
public int selectContactOrderById(int nIdContact, int nIdContactList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns the order of a contact in a list, using the Identifier- Specified by:
selectContactOrderByIdin interfaceIContactDAO- Parameters:
nIdContact- the id of contactnIdContactList- the id of contactListplugin- the plugin contact- Returns:
- the order of the contact in the list
-
-