Class AppointmentDao
- java.lang.Object
-
- org.apache.openmeetings.db.dao.calendar.AppointmentDao
-
- All Implemented Interfaces:
IDataProviderDao<Appointment>
@Repository @Transactional public class AppointmentDao extends Object implements IDataProviderDao<Appointment>
-
-
Constructor Summary
Constructors Constructor Description AppointmentDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount()Count the number of instances ofIDataProviderDaolongcount(String search)Count the number of instances ofIDataProviderDaovoiddelete(Appointment a, Long userId)Delete an instance ofIDataProviderDaointdeletebyCalendar(Long calId)Bulk Deletes the Appointments related the the calId.List<Appointment>get()List<Appointment>get(long start, long count)Get a list of instances ofIDataProviderDaoAppointmentget(Long id)Get an instance of anIDataProviderDaoList<Appointment>get(String search, long start, long count, String order)Get a list of instances ofIDataProviderDaoAppointmentgetAny(Long id)List<Appointment>getbyCalendar(Long calId)Returns the Appointments related to the Calendar ID specified.AppointmentgetByRoom(Long roomId)AppointmentgetByRoom(Long userId, Long roomId)List<String>getHrefsbyCalendar(Long calId)Returns the Appointment HREF's belonging to the Calendar Id specified.List<Appointment>getInRange(Long userId, Date start, Date end)List<Appointment>getInRange(Calendar start, Calendar end)AppointmentgetNext(Long userId, Date start)List<Appointment>searchByTitle(Long userId, String title)Appointmentupdate(Appointment a, Long userId)Update an instance ofIDataProviderDaoAppointmentupdate(Appointment a, Long userId, boolean sendmails)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.openmeetings.db.dao.IDataProviderDao
get
-
-
-
-
Method Detail
-
get
public Appointment get(Long id)
Description copied from interface:IDataProviderDaoGet an instance of anIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<Appointment>- Parameters:
id- - id of instance to retrieve- Returns:
- instance with the id gived
-
getAny
public Appointment getAny(Long id)
-
get
public List<Appointment> get()
-
update
public Appointment update(Appointment a, Long userId)
Description copied from interface:IDataProviderDaoUpdate an instance ofIDataProviderDao- Specified by:
updatein interfaceIDataProviderDao<Appointment>- Parameters:
a- - entity to be updateduserId- - user performed update- Returns:
- - updated entity
-
update
public Appointment update(Appointment a, Long userId, boolean sendmails)
-
delete
public void delete(Appointment a, Long userId)
Description copied from interface:IDataProviderDaoDelete an instance ofIDataProviderDao- Specified by:
deletein interfaceIDataProviderDao<Appointment>- Parameters:
a- - entity to be deleteduserId- - user performed delete
-
getInRange
public List<Appointment> getInRange(Long userId, Date start, Date end)
-
getInRange
public List<Appointment> getInRange(Calendar start, Calendar end)
-
getNext
public Appointment getNext(Long userId, Date start)
-
searchByTitle
public List<Appointment> searchByTitle(Long userId, String title)
-
getByRoom
public Appointment getByRoom(Long userId, Long roomId)
-
getByRoom
public Appointment getByRoom(Long roomId)
-
getHrefsbyCalendar
public List<String> getHrefsbyCalendar(Long calId)
Returns the Appointment HREF's belonging to the Calendar Id specified.- Parameters:
calId- Calendar to which the Appointments are related to.- Returns:
Listof Appointment HREF's
-
getbyCalendar
public List<Appointment> getbyCalendar(Long calId)
Returns the Appointments related to the Calendar ID specified.- Parameters:
calId- Calendar ID of the calendar, to which the appointment is associated- Returns:
ListofAppointment
-
deletebyCalendar
public int deletebyCalendar(Long calId)
Bulk Deletes the Appointments related the the calId. Note: Does not automatically, commit, but gets cascaded in the function which calls it. If there is a need to commit during this function, useem.flush()andem.clear()- Parameters:
calId- Calendar Id of the Calendar Id to which the Appointments belong to.- Returns:
- Returns
-1if the there was an error executing the query, otherwise returns the number of updated rows. as described hereQuery.executeUpdate()
-
get
public List<Appointment> get(long start, long count)
Description copied from interface:IDataProviderDaoGet a list of instances ofIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<Appointment>- Parameters:
start- - the start to range to retrievecount- - maximum instance count to retrieve- Returns:
- list of instances in the range specified
-
get
public List<Appointment> get(String search, long start, long count, String order)
Description copied from interface:IDataProviderDaoGet a list of instances ofIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<Appointment>- Parameters:
search- - string search criteria to filter entitiesstart- - the start to range to retrievecount- - maximum instance count to retrieveorder- - column and sort order- Returns:
- list of instances in the range specified
-
count
public long count()
Description copied from interface:IDataProviderDaoCount the number of instances ofIDataProviderDao- Specified by:
countin interfaceIDataProviderDao<Appointment>- Returns:
- count of instances
-
count
public long count(String search)
Description copied from interface:IDataProviderDaoCount the number of instances ofIDataProviderDao- Specified by:
countin interfaceIDataProviderDao<Appointment>- Parameters:
search- - string search criteria to filter entities- Returns:
- count of instances satisfying given search criteria
-
-