]>
iEval git - unical.git/blob - src/ro/ieval/unical/Attendee.java
1 package ro
.ieval
.unical
;
3 import android
.content
.ContentResolver
;
4 import android
.content
.Context
;
5 import android
.database
.Cursor
;
6 import android
.provider
.BaseColumns
;
7 import android
.provider
.CalendarContract
.Attendees
;
10 private static final String
[] PROJECTION
= {
13 Attendees
.ATTENDEE_NAME
,
14 Attendees
.ATTENDEE_EMAIL
,
15 Attendees
.ATTENDEE_RELATIONSHIP
,
16 Attendees
.ATTENDEE_TYPE
,
17 Attendees
.ATTENDEE_STATUS
,
21 public final long _id
;
23 public final long eventID
;
25 public final String name
;
26 /** Attendee email address **/
27 public final String email
;
29 * Attendee relationship.
31 * One of {@link CalendarContract.AttendeesColumns#RELATIONSHIP_ATTENDEE RELATIONSHIP_ATENDEE},
32 * {@link CalendarContract.AttendeesColumns#RELATIONSHIP_NONE RELATIONSHIP_NONE},
33 * {@link CalendarContract.AttendeesColumns#RELATIONSHIP_ORGANIZER RELATIONSHIP_ORGANIZER},
34 * {@link CalendarContract.AttendeesColumns#RELATIONSHIP_PERFORMER RELATIONSHIP_PERFORMER},
35 * {@link CalendarContract.AttendeesColumns#RELATIONSHIP_SPEAKER RELATIONSHIP_SPEAKER}
37 public final int relationship
;
41 * One of {@link CalendarContract.AttendeesColumns#TYPE_NONE TYPE_NONE},
42 * {@link CalendarContract.AttendeesColumns#TYPE_OPTIONAL TYPE_OPTIONAL},
43 * {@link CalendarContract.AttendeesColumns#TYPE_REQUIRED TYPE_REQUIRED},
44 * {@link CalendarContract.AttendeesColumns#TYPE_RESOURCE TYPE_RESOURCE}
46 public final int type
;
50 * One of {@link CalendarContract.AttendeesColumns#ATTENDEE_STATUS_ACCEPTED ATTENDEE_STATUS_ACCEPTED},
51 * {@link CalendarContract.AttendeesColumns#ATTENDEE_STATUS_DECLINED ATTENDEE_STATUS_DECLINED},
52 * {@link CalendarContract.AttendeesColumns#ATTENDEE_STATUS_INVITED ATTENDEE_STATUS_INVITED},
53 * {@link CalendarContract.AttendeesColumns#ATTENDEE_STATUS_NONE ATTENDEE_STATUS_NONE},
54 * {@link CalendarContract.AttendeesColumns#ATTENDEE_STATUS_TENTATIVE ATTENDEE_STATUS_TENTATIVE}
56 public final int status
;
58 private Attendee(final long _id
, final long eventID
, final String name
, final String email
, final int relationship
, final int type
, final int status
){
63 this.relationship
=relationship
;
68 public static Attendee
[] getAttendeesByEvent(final Context context
, final long eventID
){
69 final ContentResolver cr
=context
.getContentResolver();
70 final Cursor cursor
= Attendees
.query(cr
, eventID
, PROJECTION
);
72 final Attendee
[] attendees
= new Attendee
[cursor
.getCount()];
73 for(int i
=0;i
<attendees
.length
;i
++){
74 attendees
[i
]=new Attendee(cursor
.getLong(0), cursor
.getLong(1), cursor
.getString(2), cursor
.getString(3), cursor
.getInt(4), cursor
.getInt(5), cursor
.getInt(6));
This page took 0.051405 seconds and 4 git commands to generate.