kotkabeans
Class EventGroup

java.lang.Object
  |
  +--kotkabeans.EventGroup

public class EventGroup
extends java.lang.Object

implements EventGroup-object used manipulating courses eventgroups.


Field Summary
protected  java.lang.String autoRegistration
           
protected  boolean autoRegistrationChanged
           
protected  java.lang.String comment
           
protected  boolean commentChanged
           
protected  java.lang.String courseCode
           
protected  int courseID
           
protected  boolean deleted
           
protected  boolean deletedChanged
           
protected  int eventGroupID
           
protected  java.util.ArrayList events
           
static java.lang.String EXAM_TYPES
           
static int GP_STATUS_ACTIVE
           
static int GP_STATUS_OLD
           
protected  int groupTypeID
           
protected  int maxParticipants
           
protected  boolean maxParticipantsChanged
           
protected  int minParticipants
           
protected  boolean minParticipantsChanged
           
protected  java.lang.String name
           
protected  boolean nameChanged
           
protected  int queuingMethodID
           
protected  boolean queuingMethodIDChanged
           
protected  java.util.Calendar registrationBegin
           
protected  boolean registrationBeginChanged
           
protected  java.util.Calendar registrationDeadline
           
protected  boolean registrationDeadlineChanged
           
static int REGSTATUS_ACTIVE
           
static int REGSTATUS_CANNOT_REGISTER
           
static int REGSTATUS_FULL
           
static int REGSTATUS_NOT_ACTIVE
           
static int STATUS_ACTIVE
           
static int STATUS_ARCHIVED
           
static int STATUS_NOT_READY
           
static int STATUS_OLD
           
protected  int statusID
           
protected  boolean statusIDChanged
           
static int TYPE_DEMONSTRATION
           
static int TYPE_EXAM
           
static int TYPE_EXERCISE
           
static int TYPE_EXERCISE_GROUP
           
static int TYPE_EXERCISE_WORK
           
static int TYPE_FINAL_EXAM
           
static int TYPE_GUIDANCE
           
static int TYPE_LECTURE
           
static int TYPE_NET_DISCUSSION
           
static int TYPE_OTHER
           
static int TYPE_OTHER_EXAM
           
static int TYPE_PARTIAL_EXAM
           
static int TYPE_PRIVATE_GROUP
           
static int TYPE_RESERVABLE_TIME
           
static int TYPE_SEMINAR
           
static java.lang.String TYPES_TO_NOT_UNREGISTER_FROM_OTHER_GROUPS
           
protected  java.lang.String www
           
protected  boolean wwwChanged
           
 
Constructor Summary
EventGroup()
           
EventGroup(int gid, int cid, int gtid)
           
EventGroup(int gid, int cid, int gtid, boolean setEvents)
           
EventGroup(int gid, int cid, int gtid, DB db)
           
EventGroup(int gid, int cid, int gtid, DB db, boolean setEvents)
           
 
Method Summary
 int addAllCourseParticipants()
           
static int addComment(int gid, int pid, java.lang.String comment)
           
static int addComment(int gid, int pid, java.lang.String comment, DB db)
           
 void addEvent(Event e)
           
static int addParticipant(int personID, int groupID, java.lang.String comment)
           
static int addParticipant(int personID, int groupID, java.lang.String comment, boolean unregisterFromOthers, int cp_id)
           
static int addParticipant(int personID, int groupID, java.lang.String comment, boolean unregisterFromOthers, int cp_id, User user)
           
static int addParticipant(int personID, int groupID, java.lang.String comment, int cp_id)
           
static int addParticipant(int personID, int groupID, java.lang.String comment, int cp_id, User user)
           
protected  int doSave(java.lang.String set)
           
protected  int doSave(java.lang.String set, DB db)
           
 java.lang.String evaluateRanks(User user)
           
 java.lang.String getAutoRegistration()
           
 java.lang.String getComment()
           
 int getCountOfBetterRanks(long compareRank, int personID)
           
 java.lang.String getCourseCode()
           
 int getCourseID()
           
static java.lang.String getCourseName(int gid, User user)
           
static java.lang.String getCourseName(int gid, User user, DB db)
           
 Event getEvent(java.lang.String index)
           
 Event getEventByID(int id)
           
 int getEventCount()
           
 int getEventGroupID()
           
 java.util.ArrayList getEvents()
           
static java.lang.String getGPComment(int gid, int pid)
           
static java.lang.String getGPComment(int gid, int pid, DB db)
           
 int getGroupTypeID()
           
static int getGroupTypeIDOfGroup(int groupID)
           
 int getMax()
           
 int getMin()
           
 java.lang.String getName()
           
 Event getNextEvent()
           
static int getParticipantCount(int gid)
           
static int getParticipantCount(int gid, DB db)
           
 java.lang.String getQueuingMethodDescription(User user)
           
 int getQueuingMethodID()
           
 java.util.Calendar getRegistrationBegin()
           
 java.util.Calendar getRegistrationDeadline()
           
 int getStatusID()
           
 java.lang.String getWww()
           
protected  void init(int gid, int cid, int gtid, boolean setEvents)
           
protected  void init(int gid, int cid, int gtid, DB db, boolean setEvents)
           
 boolean isAutoRegistrationChanged()
           
 boolean isCommentChanged()
           
 boolean isDeleted()
           
 boolean isDeletedChanged()
           
 boolean isMaxParticipantsChanged()
           
 boolean isMinParticipantsChanged()
           
 boolean isNameChanged()
           
 boolean isQueuingMethodIDChanged()
           
 boolean isRegistrationBeginChanged()
           
 boolean isRegistrationDeadlineChanged()
           
 boolean isRegistrationTimeActive()
           
 boolean isStatusIDChanged()
           
 boolean isWwwChanged()
           
static java.lang.String modifyDeleteFlagOfEventgroupAndEvents(User user, int eventgroupID, boolean newValue)
           
 java.util.HashMap registrationStatus(java.lang.String studentID, java.lang.String timeStamp, boolean forceEvaluation)
          Returns a status flag if user would like to register for this course.
static int removeParticipant(int personID, int groupID)
           
 int save()
           
 int save(DB db)
           
 void setAttributes()
           
 void setAttributes(DB db)
           
 void setAutoRegistration(java.lang.String auto)
           
 void setAutoRegistrationChanged(boolean c)
           
 void setComment(java.lang.String c)
           
 void setCommentChanged(boolean b)
           
 void setCourseCode(java.lang.String code)
           
 void setCourseID(int cid)
           
 void setDeleted(boolean d)
           
 void setDeletedChanged(boolean c)
           
 void setEvent(java.lang.String index, Event event)
           
 void setEventGroupID(int id)
           
 void setEvents()
           
 void setGroupTypeID(int gid)
           
 void setMax(int maxParticipants)
           
 void setMaxParticipantsChanged(boolean c)
           
 void setMin(int minParticipants)
           
 void setMinParticipantsChanged(boolean c)
           
 void setName(java.lang.String name)
           
 void setNameChanged(boolean c)
           
 void setQueuingMethodID(int m)
           
 void setQueuingMethodIDChanged(boolean c)
           
 void setRegistrationBegin(java.util.Calendar c)
           
 void setRegistrationBegin(java.lang.String s)
           
 void setRegistrationBeginChanged(boolean b)
           
 void setRegistrationDeadline(java.util.Calendar c)
           
 void setRegistrationDeadline(java.lang.String s)
           
 void setRegistrationDeadlineChanged(boolean b)
           
 void setStatusID(int id)
           
 void setStatusIDChanged(boolean b)
           
 void setWww(java.lang.String www)
           
 void setWwwChanged(boolean c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_DEMONSTRATION

public static int TYPE_DEMONSTRATION

TYPE_GUIDANCE

public static int TYPE_GUIDANCE

TYPE_EXAM

public static int TYPE_EXAM

TYPE_LECTURE

public static int TYPE_LECTURE

TYPE_EXERCISE_WORK

public static int TYPE_EXERCISE_WORK

TYPE_OTHER

public static int TYPE_OTHER

TYPE_PRIVATE_GROUP

public static int TYPE_PRIVATE_GROUP

TYPE_EXERCISE

public static int TYPE_EXERCISE

TYPE_EXERCISE_GROUP

public static int TYPE_EXERCISE_GROUP

TYPE_RESERVABLE_TIME

public static int TYPE_RESERVABLE_TIME

TYPE_SEMINAR

public static int TYPE_SEMINAR

TYPE_PARTIAL_EXAM

public static int TYPE_PARTIAL_EXAM

TYPE_FINAL_EXAM

public static int TYPE_FINAL_EXAM

TYPE_OTHER_EXAM

public static int TYPE_OTHER_EXAM

TYPE_NET_DISCUSSION

public static int TYPE_NET_DISCUSSION

STATUS_NOT_READY

public static int STATUS_NOT_READY

STATUS_ACTIVE

public static int STATUS_ACTIVE

STATUS_OLD

public static int STATUS_OLD

STATUS_ARCHIVED

public static int STATUS_ARCHIVED

GP_STATUS_ACTIVE

public static int GP_STATUS_ACTIVE

GP_STATUS_OLD

public static int GP_STATUS_OLD

EXAM_TYPES

public static java.lang.String EXAM_TYPES

TYPES_TO_NOT_UNREGISTER_FROM_OTHER_GROUPS

public static java.lang.String TYPES_TO_NOT_UNREGISTER_FROM_OTHER_GROUPS

REGSTATUS_CANNOT_REGISTER

public static final int REGSTATUS_CANNOT_REGISTER
See Also:
Constant Field Values

REGSTATUS_ACTIVE

public static final int REGSTATUS_ACTIVE
See Also:
Constant Field Values

REGSTATUS_NOT_ACTIVE

public static final int REGSTATUS_NOT_ACTIVE
See Also:
Constant Field Values

REGSTATUS_FULL

public static final int REGSTATUS_FULL
See Also:
Constant Field Values

eventGroupID

protected int eventGroupID

maxParticipants

protected int maxParticipants

minParticipants

protected int minParticipants

name

protected java.lang.String name

www

protected java.lang.String www

comment

protected java.lang.String comment

autoRegistration

protected java.lang.String autoRegistration

events

protected java.util.ArrayList events

courseID

protected int courseID

courseCode

protected java.lang.String courseCode

groupTypeID

protected int groupTypeID

statusID

protected int statusID

deleted

protected boolean deleted

registrationBegin

protected java.util.Calendar registrationBegin

registrationDeadline

protected java.util.Calendar registrationDeadline

queuingMethodID

protected int queuingMethodID

nameChanged

protected boolean nameChanged

wwwChanged

protected boolean wwwChanged

maxParticipantsChanged

protected boolean maxParticipantsChanged

commentChanged

protected boolean commentChanged

minParticipantsChanged

protected boolean minParticipantsChanged

autoRegistrationChanged

protected boolean autoRegistrationChanged

deletedChanged

protected boolean deletedChanged

registrationBeginChanged

protected boolean registrationBeginChanged

registrationDeadlineChanged

protected boolean registrationDeadlineChanged

statusIDChanged

protected boolean statusIDChanged

queuingMethodIDChanged

protected boolean queuingMethodIDChanged
Constructor Detail

EventGroup

public EventGroup()

EventGroup

public EventGroup(int gid,
                  int cid,
                  int gtid)
           throws java.lang.Exception

EventGroup

public EventGroup(int gid,
                  int cid,
                  int gtid,
                  DB db)

EventGroup

public EventGroup(int gid,
                  int cid,
                  int gtid,
                  boolean setEvents)

EventGroup

public EventGroup(int gid,
                  int cid,
                  int gtid,
                  DB db,
                  boolean setEvents)
Method Detail

init

protected void init(int gid,
                    int cid,
                    int gtid,
                    DB db,
                    boolean setEvents)

init

protected void init(int gid,
                    int cid,
                    int gtid,
                    boolean setEvents)

setCourseID

public void setCourseID(int cid)

setCourseCode

public void setCourseCode(java.lang.String code)

setGroupTypeID

public void setGroupTypeID(int gid)

setEventGroupID

public void setEventGroupID(int id)

setMax

public void setMax(int maxParticipants)

setMin

public void setMin(int minParticipants)

setName

public void setName(java.lang.String name)

setWww

public void setWww(java.lang.String www)

setComment

public void setComment(java.lang.String c)

setAutoRegistration

public void setAutoRegistration(java.lang.String auto)

setStatusID

public void setStatusID(int id)

setDeleted

public void setDeleted(boolean d)

setQueuingMethodID

public void setQueuingMethodID(int m)

getQueuingMethodID

public int getQueuingMethodID()

isQueuingMethodIDChanged

public boolean isQueuingMethodIDChanged()

setRegistrationBegin

public void setRegistrationBegin(java.util.Calendar c)

setRegistrationDeadline

public void setRegistrationDeadline(java.util.Calendar c)

setRegistrationBegin

public void setRegistrationBegin(java.lang.String s)

setRegistrationDeadline

public void setRegistrationDeadline(java.lang.String s)

setNameChanged

public void setNameChanged(boolean c)

setQueuingMethodIDChanged

public void setQueuingMethodIDChanged(boolean c)

setMinParticipantsChanged

public void setMinParticipantsChanged(boolean c)

setMaxParticipantsChanged

public void setMaxParticipantsChanged(boolean c)

setWwwChanged

public void setWwwChanged(boolean c)

setCommentChanged

public void setCommentChanged(boolean b)

setAutoRegistrationChanged

public void setAutoRegistrationChanged(boolean c)

setStatusIDChanged

public void setStatusIDChanged(boolean b)

setDeletedChanged

public void setDeletedChanged(boolean c)

setRegistrationBeginChanged

public void setRegistrationBeginChanged(boolean b)

setRegistrationDeadlineChanged

public void setRegistrationDeadlineChanged(boolean b)

getCourseID

public int getCourseID()

getCourseCode

public java.lang.String getCourseCode()

getGroupTypeID

public int getGroupTypeID()

getMax

public int getMax()

getMin

public int getMin()

getEventGroupID

public int getEventGroupID()

getName

public java.lang.String getName()

getWww

public java.lang.String getWww()

getComment

public java.lang.String getComment()

getAutoRegistration

public java.lang.String getAutoRegistration()

getRegistrationBegin

public java.util.Calendar getRegistrationBegin()

getRegistrationDeadline

public java.util.Calendar getRegistrationDeadline()

getStatusID

public int getStatusID()

isDeleted

public boolean isDeleted()

isStatusIDChanged

public boolean isStatusIDChanged()

isNameChanged

public boolean isNameChanged()

isMinParticipantsChanged

public boolean isMinParticipantsChanged()

isMaxParticipantsChanged

public boolean isMaxParticipantsChanged()

isWwwChanged

public boolean isWwwChanged()

isAutoRegistrationChanged

public boolean isAutoRegistrationChanged()

isCommentChanged

public boolean isCommentChanged()

isDeletedChanged

public boolean isDeletedChanged()

isRegistrationBeginChanged

public boolean isRegistrationBeginChanged()

isRegistrationDeadlineChanged

public boolean isRegistrationDeadlineChanged()

setAttributes

public void setAttributes(DB db)
                   throws java.lang.Exception
java.lang.Exception

setAttributes

public void setAttributes()
                   throws java.lang.Exception
java.lang.Exception

getEventCount

public int getEventCount()

setEvents

public void setEvents()
               throws java.lang.Exception
java.lang.Exception

getCourseName

public static java.lang.String getCourseName(int gid,
                                             User user,
                                             DB db)
                                      throws java.lang.Exception
java.lang.Exception

getCourseName

public static java.lang.String getCourseName(int gid,
                                             User user)
                                      throws java.lang.Exception
java.lang.Exception

getGPComment

public static java.lang.String getGPComment(int gid,
                                            int pid,
                                            DB db)
                                     throws java.lang.Exception
java.lang.Exception

getGPComment

public static java.lang.String getGPComment(int gid,
                                            int pid)
                                     throws java.lang.Exception
java.lang.Exception

addComment

public static int addComment(int gid,
                             int pid,
                             java.lang.String comment,
                             DB db)
                      throws java.lang.Exception
java.lang.Exception

addComment

public static int addComment(int gid,
                             int pid,
                             java.lang.String comment)
                      throws java.lang.Exception
java.lang.Exception

addParticipant

public static int addParticipant(int personID,
                                 int groupID,
                                 java.lang.String comment)
                          throws java.lang.Exception
java.lang.Exception

addParticipant

public static int addParticipant(int personID,
                                 int groupID,
                                 java.lang.String comment,
                                 int cp_id,
                                 User user)
                          throws java.lang.Exception
java.lang.Exception

addParticipant

public static int addParticipant(int personID,
                                 int groupID,
                                 java.lang.String comment,
                                 int cp_id)
                          throws java.lang.Exception
java.lang.Exception

addParticipant

public static int addParticipant(int personID,
                                 int groupID,
                                 java.lang.String comment,
                                 boolean unregisterFromOthers,
                                 int cp_id)
                          throws java.lang.Exception
java.lang.Exception

addParticipant

public static int addParticipant(int personID,
                                 int groupID,
                                 java.lang.String comment,
                                 boolean unregisterFromOthers,
                                 int cp_id,
                                 User user)
                          throws java.lang.Exception
java.lang.Exception

getParticipantCount

public static int getParticipantCount(int gid,
                                      DB db)
                               throws java.lang.Exception
java.lang.Exception

getParticipantCount

public static int getParticipantCount(int gid)
                               throws java.lang.Exception
java.lang.Exception

removeParticipant

public static int removeParticipant(int personID,
                                    int groupID)
                             throws java.lang.Exception
java.lang.Exception

addAllCourseParticipants

public int addAllCourseParticipants()
                             throws java.lang.Exception
java.lang.Exception

addEvent

public void addEvent(Event e)

setEvent

public void setEvent(java.lang.String index,
                     Event event)

getEvent

public Event getEvent(java.lang.String index)

getEvents

public java.util.ArrayList getEvents()

getNextEvent

public Event getNextEvent()

getEventByID

public Event getEventByID(int id)

registrationStatus

public java.util.HashMap registrationStatus(java.lang.String studentID,
                                            java.lang.String timeStamp,
                                            boolean forceEvaluation)
                                     throws java.lang.Exception
Returns a status flag if user would like to register for this course. returns a status flag if user would like to register for this course. 0 = cannot register 1 = can register normally; if queuing method used, second returned value is the queuing rank in this case. 2 = reg time not active 3 = course is full; if queuing method used and it permits registration, then the second returned value is the queuing rank if user registers now.

java.lang.Exception

getCountOfBetterRanks

public int getCountOfBetterRanks(long compareRank,
                                 int personID)
                          throws java.lang.Exception
java.lang.Exception

isRegistrationTimeActive

public boolean isRegistrationTimeActive()

getQueuingMethodDescription

public java.lang.String getQueuingMethodDescription(User user)

doSave

protected int doSave(java.lang.String set,
                     DB db)
              throws java.lang.Exception
java.lang.Exception

doSave

protected int doSave(java.lang.String set)
              throws java.lang.Exception
java.lang.Exception

save

public int save()
         throws java.lang.Exception
java.lang.Exception

save

public int save(DB db)
         throws java.lang.Exception
java.lang.Exception

evaluateRanks

public java.lang.String evaluateRanks(User user)
                               throws java.lang.Exception
java.lang.Exception

modifyDeleteFlagOfEventgroupAndEvents

public static java.lang.String modifyDeleteFlagOfEventgroupAndEvents(User user,
                                                                     int eventgroupID,
                                                                     boolean newValue)
                                                              throws java.lang.Exception
java.lang.Exception

getGroupTypeIDOfGroup

public static int getGroupTypeIDOfGroup(int groupID)
                                 throws java.lang.Exception
java.lang.Exception