# -*- coding: ISO8859-1 -*-
"""Database wrappers.
Autogenerated by forgetSQL 2004-01-13.
"""

import forgetSQL

class _Wrapper(forgetSQL.Forgetter):
    """Just a simple wrapper class so that you may
    easily change stuff for all forgetters. Typically
    this involves subcliassing MysqlForgetter instead."""

    # Remember to change the class function cursor() so that
    # it returns a cursor connected to the database.
    # 
    ## cursor = lambda: myDatabase.cursor()
    pass



class Account(_Wrapper):
    _sqlFields =  {'ext_sync': 'ext_sync',
                  'id': 'id',
                  'login': 'login',
                  'name': 'name',
                  'password': 'password'}
    _sqlLinks =  {}
    _userClasses =  {}
    _shortView =  ()
    _sqlTable =  'Account'
    _descriptions =  {}

class Accountgroup(_Wrapper):
    _sqlFields =  {'id': 'id', 'descr': 'descr', 'name': 'name'}
    _sqlLinks =  {}
    _userClasses =  {}
    _shortView =  ()
    _sqlTable =  'AccountGroup'
    _descriptions =  {}

class Accountgroupprivilege(_Wrapper):
    _sqlFields =  {'accountgroup': 'accountgroupid',
                  'privilege': 'privilegeid',
                  'target': 'target'}
    _sqlLinks =  {}
    _userClasses =  {'privilege': 'Privilege', 'accountgroup': 'Accountgroup'}
    _shortView =  ()
    _sqlTable =  'AccountGroupPrivilege'
    _descriptions =  {}

class Accountingroup(_Wrapper):
    _sqlFields =  {'account': 'accountid', 'groupid': 'groupid'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'AccountInGroup'
    _descriptions =  {}

class Accountnavbar(_Wrapper):
    _sqlFields =  {'account': 'accountid',
                  'navbarlink': 'navbarlinkid',
                  'positions': 'positions'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account', 'navbarlink': 'Navbarlink'}
    _shortView =  ()
    _sqlTable =  'AccountNavbar'
    _descriptions =  {}

class Accountorg(_Wrapper):
    _sqlFields =  {'account': 'accountid', 'orgid': 'orgid'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'AccountOrg'
    _descriptions =  {}

class Accountproperty(_Wrapper):
    _sqlFields =  {'account': 'accountid', 'property': 'property', 'value': 'value'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'AccountProperty'
    _descriptions =  {}

class Alarmadresse(_Wrapper):
    _sqlFields =  {'adresse': 'adresse', 'account': 'accountid', 'type': 'type', 'id': 'id'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'Alarmadresse'
    _descriptions =  {}

class Brukerprofil(_Wrapper):
    _sqlFields =  {'account': 'accountid',
                  'id': 'id',
                  'navn': 'navn',
                  'tid': 'tid',
                  'ukedag': 'ukedag',
                  'uketid': 'uketid'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'Brukerprofil'
    _descriptions =  {}

class Brukerrettighet(_Wrapper):
    _sqlFields =  {'utstyrgruppe': 'utstyrgruppeid', 'account': 'accountid'}
    _sqlLinks =  {}
    _userClasses =  {'utstyrgruppe': 'Utstyrgruppe', 'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'BrukerRettighet'
    _descriptions =  {}

class Defaultutstyr(_Wrapper):
    _sqlFields =  {'utstyrgruppe': 'utstyrgruppeid', 'accountgroup': 'accountgroupid'}
    _sqlLinks =  {}
    _userClasses =  {'utstyrgruppe': 'Utstyrgruppe', 'accountgroup': 'Accountgroup'}
    _shortView =  ()
    _sqlTable =  'DefaultUtstyr'
    _descriptions =  {}

class Filtermatch(_Wrapper):
    _sqlFields =  {'id': 'id',
                  'matchfelt': 'matchfelt',
                  'matchtype': 'matchtype',
                  'utstyrfilter': 'utstyrfilterid',
                  'verdi': 'verdi'}
    _sqlLinks =  {}
    _userClasses =  {'utstyrfilter': 'Utstyrfilter'}
    _shortView =  ()
    _sqlTable =  'FilterMatch'
    _descriptions =  {}

class Gruppetilfilter(_Wrapper):
    _sqlFields =  {'inkluder': 'inkluder',
                  'positiv': 'positiv',
                  'prioritet': 'prioritet',
                  'utstyrfilter': 'utstyrfilterid',
                  'utstyrgruppe': 'utstyrgruppeid'}
    _sqlLinks =  {}
    _userClasses =  {'utstyrfilter': 'Utstyrfilter', 'utstyrgruppe': 'Utstyrgruppe'}
    _shortView =  ()
    _sqlTable =  'GruppeTilFilter'
    _descriptions =  {}

class Logg(_Wrapper):
    _sqlFields =  {'account': 'accountid',
                  'descr': 'descr',
                  'id': 'id',
                  'tid': 'tid',
                  'type': 'type'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'Logg'
    _descriptions =  {}

class Matchfield(_Wrapper):
    _sqlFields =  {'datatype': 'datatype',
                  'descr': 'descr',
                  'listlimit': 'listlimit',
                  'matchfieldid': 'matchfieldid',
                  'name': 'name',
                  'showlist': 'showlist',
                  'valuecategory': 'valuecategory',
                  'valuehelp': 'valuehelp',
                  'valueid': 'valueid',
                  'valuename': 'valuename',
                  'valuesort': 'valuesort'}
    _sqlLinks =  {}
    _userClasses =  {}
    _sqlPrimary =  ('matchfieldid',)
    _shortView =  ()
    _sqlTable =  'MatchField'
    _descriptions =  {}

class Navbarlink(_Wrapper):
    _sqlFields =  {'account': 'accountid', 'uri': 'uri', 'id': 'id', 'name': 'name'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'NavbarLink'
    _descriptions =  {}

class Operator(_Wrapper):
    _sqlFields =  {'matchfield': 'matchfieldid', 'operatorid': 'operatorid'}
    _sqlLinks =  {}
    _userClasses =  {'matchfield': 'Matchfield'}
    _sqlPrimary =  ('operatorid',)
    _shortView =  ()
    _sqlTable =  'Operator'
    _descriptions =  {}

class Preference(_Wrapper):
    _sqlFields =  {'account': 'accountid',
                  'activeprofile': 'activeprofile',
                  'lastsentday': 'lastsentday',
                  'lastsentweek': 'lastsentweek',
                  'queuelength': 'queuelength',
                  'sms': 'sms'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'Preference'
    _descriptions =  {}

class Privilege(_Wrapper):
    _sqlFields =  {'privilegeid': 'privilegeid', 'privilegename': 'privilegename'}
    _sqlLinks =  {}
    _userClasses =  {}
    _sqlPrimary =  ('privilegeid',)
    _shortView =  ()
    _sqlTable =  'Privilege'
    _descriptions =  {}

class Queue(_Wrapper):
    _sqlFields =  {'account': 'accountid',
                  'addrid': 'addrid',
                  'alertid': 'alertid',
                  'id': 'id',
                  'time': 'time'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'queue'
    _descriptions =  {}

class Rettighet(_Wrapper):
    _sqlFields =  {'utstyrgruppe': 'utstyrgruppeid', 'accountgroup': 'accountgroupid'}
    _sqlLinks =  {}
    _userClasses =  {'utstyrgruppe': 'Utstyrgruppe', 'accountgroup': 'Accountgroup'}
    _shortView =  ()
    _sqlTable =  'Rettighet'
    _descriptions =  {}

class Smsq(_Wrapper):
    _sqlFields =  {'account': 'accountid',
                  'id': 'id',
                  'msg': 'msg',
                  'phone': 'phone',
                  'sent': 'sent',
                  'severity': 'severity',
                  'smsid': 'smsid',
                  'time': 'time',
                  'timesent': 'timesent'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'smsq'
    _descriptions =  {}

class Tidsperiode(_Wrapper):
    _sqlFields =  {'brukerprofil': 'brukerprofilid',
                  'helg': 'helg',
                  'id': 'id',
                  'starttid': 'starttid'}
    _sqlLinks =  {}
    _userClasses =  {'brukerprofil': 'Brukerprofil'}
    _shortView =  ()
    _sqlTable =  'Tidsperiode'
    _descriptions =  {}

class Utstyrfilter(_Wrapper):
    _sqlFields =  {'account': 'accountid', 'navn': 'navn', 'id': 'id'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'Utstyrfilter'
    _descriptions =  {}

class Utstyrgruppe(_Wrapper):
    _sqlFields =  {'account': 'accountid', 'navn': 'navn', 'id': 'id', 'descr': 'descr'}
    _sqlLinks =  {}
    _userClasses =  {'account': 'Account'}
    _shortView =  ()
    _sqlTable =  'Utstyrgruppe'
    _descriptions =  {}

class Varsle(_Wrapper):
    _sqlFields =  {'alarmadresse': 'alarmadresseid',
                  'tidsperiode': 'tidsperiodeid',
                  'utstyrgruppe': 'utstyrgruppeid',
                  'vent': 'vent'}
    _sqlLinks =  {}
    _userClasses =  {'alarmadresse': 'Alarmadresse',
                    'tidsperiode': 'Tidsperiode',
                    'utstyrgruppe': 'Utstyrgruppe'}
    _shortView =  ()
    _sqlTable =  'Varsle'
    _descriptions =  {}



# Prepare them all. We need to send in our local
# namespace.
forgetSQL.prepareClasses(locals())

