Class EventTypeDB

java.lang.Object
sk.iway.iwcm.calendar.EventTypeDB

public class EventTypeDB extends Object
praca s tabulkou calendar_types
  • Field Details

  • Method Details

    • deleteType

      public static int deleteType(int typeId, javax.servlet.http.HttpServletRequest request)
      vymazem typ (!iba ak ho nepouziva nijaky event (tabulka calendar)!) typ nesmie byt zakladnym typom (type_id <= 5)
      Parameters:
      typeId - Description of the Parameter
      request - Description of the Parameter
      Returns:
      vratim pocet zmazanych zaznamov, (ak je to rozdne od 1 -> nastala chyba)
    • updateType

      public static int updateType(int typeId, String name, javax.servlet.http.HttpServletRequest request)
    • updateType

      public static int updateType(EventTypeDetails eventType)
      add/update noveho typu
      Parameters:
      eventType -
      Returns:
      0 ... OK, inak chyba
    • getTypes

      public static List<EventTypeDetails> getTypes(javax.servlet.http.HttpServletRequest request)
    • getTypes

      public static List<EventTypeDetails> getTypes()
    • getTypeName

      public static String getTypeName(int typeId, javax.servlet.http.HttpServletRequest request)
    • getTypeById

      public static EventTypeDetails getTypeById(int typeId)
      vrati typ udalosti na zaklade typeId
      Parameters:
      typeId -
      Returns:
    • getTypeBySchvalovatelId

      public static Map<Integer,EventTypeDetails> getTypeBySchvalovatelId(int userId)
      vrati vsetky typy ktore ma schvalovat urcity userId
      Parameters:
      userId -
      Returns:
    • getLastTypeId

      public static int getLastTypeId()
      vrati type_id posledneho zaznamu
      Returns: