Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39704

Move EnumUserType from jobscheduler/schedule-event-model to kernel/kernel-private

    XMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.x
    • Component/s: Kernel
    • Labels:
      None

      Description

      I'd like to move a class from jobscheduler to kernel/kernel-private because it has general utility to tools using Hibernate. The class is called EnumUserType and is an implementation of the code found here:

      http://community.jboss.org/wiki/UserTypeforpersistinganEnumwithaVARCHARcolumn

      This class is useful for persisting Enum value types using Hibernate. EnumUserType uses generics to implement a custom Hibernate UserType for any Enum type you care to persist. Subclassing EnumUserType and binding its Type parameter to the Enum of interest generates the code required for Hibernate to manage that Enum type. An example can be seen in the jobscheduler/scheduler-event-model module. See org.sakaiproject.scheduler.events.hibernate.TriggerEventEnumUserType and its use in the Hibernate mapping org.sakaiproject.scheduler.events.hibernate.TriggerEventHibernateImpl.hbm.xml in the same module.

      Since kernel/kernel-private seems to have all the framework level support for Hibernate in Sakai this seemed like the appropriate place. If there are no arguments for an alternate spot I'd like to move forward on this change so EnumUserType can be used in other modules outside of jobscheduler/scheduler-event-model.

      I have attached EnumUserType to this ticket. It should be in:

      kernel/kernel-private/src/main/java/org/sakaiproject/springframework/orm/hibernate/

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  duffy Duffy Gillman (Inactive)
                  Reporter:
                  duffy Duffy Gillman (Inactive)
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration