--- Chuck Esterbrook <[EMAIL PROTECTED]> wrote:
> On 12/29/05, Roger Haase <[EMAIL PROTECTED]> wrote:
> > ...
> >
> > If I understand this correctly, a User record is in the process of
> > being moved into the Middlekit store, and it is expecting the old
> > mx.DateTime type of <type 'DateTime'>, but the MySQL-python module
> is
> > passing the Python 2.3/2.4 <type 'datetime.datetime'>.
> >
> > An idea was to uninstall mx and see what happened next, but yum
> > reported that MySQL-python 1.2 was dependent upon mx and would be
> > uninstalled along with it.
> >
> > Anyone have an idea of what to do to fix this?
>
> I maintain MiddleKit and I'll help you work through this. Did you
> regen your MK source code? If so and you still have the problem, can
> you send me your GenUser.py so I can look at it?
I have worked around the problem by uninstalling MySQL-python 1.2 and
installed the older MySQL-python 0.9.2. Everything seems to work OK
with the older module.
I think the problem is incompatible defauts between MiddleKit and
MySQL-python 1.2. Given the presence of both mx and Python 2.3+,
MySQL-python 1.2 is choosing to use the Python datetime module and
MiddleKit is using the mx DateTime.
I had regened the MK source code and I have attached the module. The
relevant part is the setUpdateTime method at line 936 and the failure
is the type check at line 941.
Roger Haase
__________________________________
Yahoo! for Good - Make a difference this year.
http://brand.yahoo.com/cybergivingweek2005/
'''
GenUser.py
Thu Dec 29 12:52:17 2005
Generated by MiddleKit.
'''
# MK attribute caches for setFoo() methods
_emailAttr = None
_nameAttr = None
_firstNameAttr = None
_lastNameAttr = None
_passwordAttr = None
_changePasswordAttr = None
_changePreferencesAttr = None
_jobCodeAttr = None
_connectionAttr = None
_screenWidthAttr = None
_screenHeightAttr = None
_colorDepthAttr = None
_ipAddressAttr = None
_cookieAttr = None
_browserNameAttr = None
_jscriptVersionAttr = None
_tinyImageSizeAttr = None
_smallImageSizeAttr = None
_mediumImageSizeAttr = None
_largeImageSizeAttr = None
_jumboImageSizeAttr = None
_doubleImageSizeAttr = None
_limitImageSizeAttr = None
_imageQualityAttr = None
_maximumImagesPageAttr = None
_surveySequenceAttr = None
_wikiIdAttr = None
_screenWidthLimitAttr = None
_updatedByAttr = None
_updateTimeAttr = None
_lastLogonAttr = None
import types
from mx import DateTime
from MiddleKit.Run.MiddleObject import MiddleObject
from types import InstanceType, LongType
from MiddleKit.Run.SQLObjectStore import ObjRefError
class GenUser(MiddleObject):
def __init__(self):
MiddleObject.__init__(self)
self._email = None
self._name = None
self._firstName = None
self._lastName = None
self._password = None
self._changePassword = None
self._changePreferences = None
self._jobCode = None
self._connection = None
self._screenWidth = None
self._screenHeight = None
self._colorDepth = None
self._ipAddress = None
self._cookie = None
self._browserName = None
self._jscriptVersion = None
self._tinyImageSize = None
self._smallImageSize = None
self._mediumImageSize = None
self._largeImageSize = None
self._jumboImageSize = None
self._doubleImageSize = None
self._limitImageSize = None
self._imageQuality = None
self._maximumImagesPage = None
self._surveySequence = None
self._wikiId = None
self._screenWidthLimit = None
self._updatedBy = None
self._updateTime = None
self._lastLogon = None
def email(self):
return self._email
def setEmail(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._email
self._email = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _emailAttr
if _emailAttr is None:
_emailAttr = self.klass().lookupAttr('email')
if not _emailAttr.shouldRegisterChanges():
_emailAttr = 0
if _emailAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['email'] = _emailAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def name(self):
return self._name
def setName(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._name
self._name = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _nameAttr
if _nameAttr is None:
_nameAttr = self.klass().lookupAttr('name')
if not _nameAttr.shouldRegisterChanges():
_nameAttr = 0
if _nameAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['name'] = _nameAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def firstName(self):
return self._firstName
def setFirstName(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._firstName
self._firstName = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _firstNameAttr
if _firstNameAttr is None:
_firstNameAttr = self.klass().lookupAttr('firstName')
if not _firstNameAttr.shouldRegisterChanges():
_firstNameAttr = 0
if _firstNameAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['firstName'] = _firstNameAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def lastName(self):
return self._lastName
def setLastName(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._lastName
self._lastName = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _lastNameAttr
if _lastNameAttr is None:
_lastNameAttr = self.klass().lookupAttr('lastName')
if not _lastNameAttr.shouldRegisterChanges():
_lastNameAttr = 0
if _lastNameAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['lastName'] = _lastNameAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def password(self):
return self._password
def setPassword(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._password
self._password = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _passwordAttr
if _passwordAttr is None:
_passwordAttr = self.klass().lookupAttr('password')
if not _passwordAttr.shouldRegisterChanges():
_passwordAttr = 0
if _passwordAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['password'] = _passwordAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def changePassword(self):
return self._changePassword
def setChangePassword(self, value):
if value is not None:
if type(value) is not types.IntType:
raise TypeError, 'expecting int for bool, but got value %r of type %r instead' % (value, type(value))
if value not in (0, 1):
raise ValueError, 'expecting 0 or 1 for bool, but got %s instead' % value
# set the attribute
origValue = self._changePassword
self._changePassword = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _changePasswordAttr
if _changePasswordAttr is None:
_changePasswordAttr = self.klass().lookupAttr('changePassword')
if not _changePasswordAttr.shouldRegisterChanges():
_changePasswordAttr = 0
if _changePasswordAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['changePassword'] = _changePasswordAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def changePreferences(self):
return self._changePreferences
def setChangePreferences(self, value):
if value is not None:
if type(value) is not types.IntType:
raise TypeError, 'expecting int for bool, but got value %r of type %r instead' % (value, type(value))
if value not in (0, 1):
raise ValueError, 'expecting 0 or 1 for bool, but got %s instead' % value
# set the attribute
origValue = self._changePreferences
self._changePreferences = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _changePreferencesAttr
if _changePreferencesAttr is None:
_changePreferencesAttr = self.klass().lookupAttr('changePreferences')
if not _changePreferencesAttr.shouldRegisterChanges():
_changePreferencesAttr = 0
if _changePreferencesAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['changePreferences'] = _changePreferencesAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def jobCode(self):
return self._jobCode
def setJobCode(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._jobCode
self._jobCode = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _jobCodeAttr
if _jobCodeAttr is None:
_jobCodeAttr = self.klass().lookupAttr('jobCode')
if not _jobCodeAttr.shouldRegisterChanges():
_jobCodeAttr = 0
if _jobCodeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['jobCode'] = _jobCodeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def connection(self):
return self._connection
def setConnection(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._connection
self._connection = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _connectionAttr
if _connectionAttr is None:
_connectionAttr = self.klass().lookupAttr('connection')
if not _connectionAttr.shouldRegisterChanges():
_connectionAttr = 0
if _connectionAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['connection'] = _connectionAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def screenWidth(self):
return self._screenWidth
def setScreenWidth(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._screenWidth
self._screenWidth = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _screenWidthAttr
if _screenWidthAttr is None:
_screenWidthAttr = self.klass().lookupAttr('screenWidth')
if not _screenWidthAttr.shouldRegisterChanges():
_screenWidthAttr = 0
if _screenWidthAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['screenWidth'] = _screenWidthAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def screenHeight(self):
return self._screenHeight
def setScreenHeight(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._screenHeight
self._screenHeight = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _screenHeightAttr
if _screenHeightAttr is None:
_screenHeightAttr = self.klass().lookupAttr('screenHeight')
if not _screenHeightAttr.shouldRegisterChanges():
_screenHeightAttr = 0
if _screenHeightAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['screenHeight'] = _screenHeightAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def colorDepth(self):
return self._colorDepth
def setColorDepth(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._colorDepth
self._colorDepth = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _colorDepthAttr
if _colorDepthAttr is None:
_colorDepthAttr = self.klass().lookupAttr('colorDepth')
if not _colorDepthAttr.shouldRegisterChanges():
_colorDepthAttr = 0
if _colorDepthAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['colorDepth'] = _colorDepthAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def ipAddress(self):
return self._ipAddress
def setIpAddress(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._ipAddress
self._ipAddress = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _ipAddressAttr
if _ipAddressAttr is None:
_ipAddressAttr = self.klass().lookupAttr('ipAddress')
if not _ipAddressAttr.shouldRegisterChanges():
_ipAddressAttr = 0
if _ipAddressAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['ipAddress'] = _ipAddressAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def cookie(self):
return self._cookie
def setCookie(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._cookie
self._cookie = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _cookieAttr
if _cookieAttr is None:
_cookieAttr = self.klass().lookupAttr('cookie')
if not _cookieAttr.shouldRegisterChanges():
_cookieAttr = 0
if _cookieAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['cookie'] = _cookieAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def browserName(self):
return self._browserName
def setBrowserName(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._browserName
self._browserName = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _browserNameAttr
if _browserNameAttr is None:
_browserNameAttr = self.klass().lookupAttr('browserName')
if not _browserNameAttr.shouldRegisterChanges():
_browserNameAttr = 0
if _browserNameAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['browserName'] = _browserNameAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def jscriptVersion(self):
return self._jscriptVersion
def setJscriptVersion(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._jscriptVersion
self._jscriptVersion = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _jscriptVersionAttr
if _jscriptVersionAttr is None:
_jscriptVersionAttr = self.klass().lookupAttr('jscriptVersion')
if not _jscriptVersionAttr.shouldRegisterChanges():
_jscriptVersionAttr = 0
if _jscriptVersionAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['jscriptVersion'] = _jscriptVersionAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def tinyImageSize(self):
return self._tinyImageSize
def setTinyImageSize(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._tinyImageSize
self._tinyImageSize = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _tinyImageSizeAttr
if _tinyImageSizeAttr is None:
_tinyImageSizeAttr = self.klass().lookupAttr('tinyImageSize')
if not _tinyImageSizeAttr.shouldRegisterChanges():
_tinyImageSizeAttr = 0
if _tinyImageSizeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['tinyImageSize'] = _tinyImageSizeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def smallImageSize(self):
return self._smallImageSize
def setSmallImageSize(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._smallImageSize
self._smallImageSize = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _smallImageSizeAttr
if _smallImageSizeAttr is None:
_smallImageSizeAttr = self.klass().lookupAttr('smallImageSize')
if not _smallImageSizeAttr.shouldRegisterChanges():
_smallImageSizeAttr = 0
if _smallImageSizeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['smallImageSize'] = _smallImageSizeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def mediumImageSize(self):
return self._mediumImageSize
def setMediumImageSize(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._mediumImageSize
self._mediumImageSize = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _mediumImageSizeAttr
if _mediumImageSizeAttr is None:
_mediumImageSizeAttr = self.klass().lookupAttr('mediumImageSize')
if not _mediumImageSizeAttr.shouldRegisterChanges():
_mediumImageSizeAttr = 0
if _mediumImageSizeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['mediumImageSize'] = _mediumImageSizeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def largeImageSize(self):
return self._largeImageSize
def setLargeImageSize(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._largeImageSize
self._largeImageSize = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _largeImageSizeAttr
if _largeImageSizeAttr is None:
_largeImageSizeAttr = self.klass().lookupAttr('largeImageSize')
if not _largeImageSizeAttr.shouldRegisterChanges():
_largeImageSizeAttr = 0
if _largeImageSizeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['largeImageSize'] = _largeImageSizeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def jumboImageSize(self):
return self._jumboImageSize
def setJumboImageSize(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._jumboImageSize
self._jumboImageSize = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _jumboImageSizeAttr
if _jumboImageSizeAttr is None:
_jumboImageSizeAttr = self.klass().lookupAttr('jumboImageSize')
if not _jumboImageSizeAttr.shouldRegisterChanges():
_jumboImageSizeAttr = 0
if _jumboImageSizeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['jumboImageSize'] = _jumboImageSizeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def doubleImageSize(self):
return self._doubleImageSize
def setDoubleImageSize(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._doubleImageSize
self._doubleImageSize = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _doubleImageSizeAttr
if _doubleImageSizeAttr is None:
_doubleImageSizeAttr = self.klass().lookupAttr('doubleImageSize')
if not _doubleImageSizeAttr.shouldRegisterChanges():
_doubleImageSizeAttr = 0
if _doubleImageSizeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['doubleImageSize'] = _doubleImageSizeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def limitImageSize(self):
return self._limitImageSize
def setLimitImageSize(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._limitImageSize
self._limitImageSize = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _limitImageSizeAttr
if _limitImageSizeAttr is None:
_limitImageSizeAttr = self.klass().lookupAttr('limitImageSize')
if not _limitImageSizeAttr.shouldRegisterChanges():
_limitImageSizeAttr = 0
if _limitImageSizeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['limitImageSize'] = _limitImageSizeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def imageQuality(self):
return self._imageQuality
def setImageQuality(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._imageQuality
self._imageQuality = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _imageQualityAttr
if _imageQualityAttr is None:
_imageQualityAttr = self.klass().lookupAttr('imageQuality')
if not _imageQualityAttr.shouldRegisterChanges():
_imageQualityAttr = 0
if _imageQualityAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['imageQuality'] = _imageQualityAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def maximumImagesPage(self):
return self._maximumImagesPage
def setMaximumImagesPage(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._maximumImagesPage
self._maximumImagesPage = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _maximumImagesPageAttr
if _maximumImagesPageAttr is None:
_maximumImagesPageAttr = self.klass().lookupAttr('maximumImagesPage')
if not _maximumImagesPageAttr.shouldRegisterChanges():
_maximumImagesPageAttr = 0
if _maximumImagesPageAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['maximumImagesPage'] = _maximumImagesPageAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def surveySequence(self):
return self._surveySequence
def setSurveySequence(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._surveySequence
self._surveySequence = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _surveySequenceAttr
if _surveySequenceAttr is None:
_surveySequenceAttr = self.klass().lookupAttr('surveySequence')
if not _surveySequenceAttr.shouldRegisterChanges():
_surveySequenceAttr = 0
if _surveySequenceAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['surveySequence'] = _surveySequenceAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def wikiId(self):
return self._wikiId
def setWikiId(self, value):
if value is not None:
if type(value) is not types.StringType:
raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._wikiId
self._wikiId = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _wikiIdAttr
if _wikiIdAttr is None:
_wikiIdAttr = self.klass().lookupAttr('wikiId')
if not _wikiIdAttr.shouldRegisterChanges():
_wikiIdAttr = 0
if _wikiIdAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['wikiId'] = _wikiIdAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def screenWidthLimit(self):
return self._screenWidthLimit
def setScreenWidthLimit(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._screenWidthLimit
self._screenWidthLimit = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _screenWidthLimitAttr
if _screenWidthLimitAttr is None:
_screenWidthLimitAttr = self.klass().lookupAttr('screenWidthLimit')
if not _screenWidthLimitAttr.shouldRegisterChanges():
_screenWidthLimitAttr = 0
if _screenWidthLimitAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['screenWidthLimit'] = _screenWidthLimitAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def updatedBy(self):
return self._updatedBy
def setUpdatedBy(self, value):
if value is not None:
if type(value) is types.LongType:
value = int(value)
elif type(value) is not types.IntType:
raise TypeError, 'expecting int type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._updatedBy
self._updatedBy = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _updatedByAttr
if _updatedByAttr is None:
_updatedByAttr = self.klass().lookupAttr('updatedBy')
if not _updatedByAttr.shouldRegisterChanges():
_updatedByAttr = 0
if _updatedByAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['updatedBy'] = _updatedByAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def updateTime(self):
return self._updateTime
def setUpdateTime(self, value):
# have DateTime
if value is not None:
if type(value) is type(''):
value = DateTime.DateTimeFrom(value)
if type(value) is not DateTime.DateTimeType:
raise TypeError, 'expecting datetime type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._updateTime
self._updateTime = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _updateTimeAttr
if _updateTimeAttr is None:
_updateTimeAttr = self.klass().lookupAttr('updateTime')
if not _updateTimeAttr.shouldRegisterChanges():
_updateTimeAttr = 0
if _updateTimeAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['updateTime'] = _updateTimeAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)
def lastLogon(self):
return self._lastLogon
def setLastLogon(self, value):
# have DateTime
if value is not None:
if type(value) is type(''):
value = DateTime.DateTimeFrom(value)
if type(value) is not DateTime.DateTimeType:
raise TypeError, 'expecting datetime type, but got value %r of type %r instead' % (value, type(value))
# set the attribute
origValue = self._lastLogon
self._lastLogon = value
# MiddleKit machinery
self._mk_changed = 1 # @@ original semantics, but I think this should be under "if not self._mk_initing..."
if not self._mk_initing and self._mk_serialNum>0 and value is not origValue:
global _lastLogonAttr
if _lastLogonAttr is None:
_lastLogonAttr = self.klass().lookupAttr('lastLogon')
if not _lastLogonAttr.shouldRegisterChanges():
_lastLogonAttr = 0
if _lastLogonAttr:
# Record that it has been changed
if self._mk_changedAttrs is None:
self._mk_changedAttrs = {} # maps name to attribute
self._mk_changedAttrs['lastLogon'] = _lastLogonAttr # changedAttrs is a set
# Tell ObjectStore it happened
self._mk_store.objectChanged(self)