Beispiel #1
0
 def hash(self, row):
     return content_hash(row.Resource)
Beispiel #2
0
 def hash(self, row):
     return content_hash(row.Title, row.Description, row.Standard,
                         row.Origin)
Beispiel #3
0
 def hash(self, row):
     return content_hash(row.Modified, row.RemoteID, row.CachedUntil,
                         row.Expires, row.UserID)
Beispiel #4
0
 def hash(self, row):
     return content_hash(row.Login, row.Password, row.Name, row.FirstName,
                         row.Email, row.Administrator)
Beispiel #5
0
 def hash(self, row):
     return content_hash(row.Title, row.Description, row.UsageAgreement)
Beispiel #6
0
 def hash(self, row):
     return content_hash(row.Label, row.ShortView, row.MediumView,
                         row.LongView)
Beispiel #7
0
 def hash(self, row):
     return content_hash(row.ObjectID, row.UserID, row.GroupID,
                         row.GrantPriv, row.DenyPriv)
Beispiel #8
0
 def hash(self, row):
     return content_hash(row.Modified, row.RemoteID, row.CachedUntil, row.Expires, row.UserID)
Beispiel #9
0
 def hash(self, row):
     return content_hash(row.CollectionID, (row.Flags or 0) & IMAGE_SHARED)
Beispiel #10
0
 def hash(self, row):
     return content_hash(row.Title, row.Description, row.Standard, row.Origin)
Beispiel #11
0
 def hash(self, row):
     return content_hash(row.ItemValue)
Beispiel #12
0
 def hash(self, row):
     return content_hash(row.Title, row.ResourcePath)
Beispiel #13
0
 def hash(self, row):
     return content_hash(row.Title, row.Description, row.UsageAgreement)
Beispiel #14
0
 def hash(self, row):
     return content_hash(row.AttributeValue)
Beispiel #15
0
 def hash(self, row):
     return content_hash(row.Title)
Beispiel #16
0
 def hash(self, row):
     return content_hash(row.Resource)
Beispiel #17
0
 def hash(self, row):
     return content_hash(row.Label, row.Name, row.ControlledListID)
Beispiel #18
0
 def hash(self, row):
     return content_hash(row.Title, row.UserID, row.Description, row.ArchiveFlag, row.AccessPassword)
Beispiel #19
0
 def hash(self, row):
     return content_hash(row.Login, row.Password, row.Name, row.FirstName, row.Email, row.Administrator)
Beispiel #20
0
 def hash(self, row):
     return content_hash(row.Title)
Beispiel #21
0
 def hash(self, row):
     return content_hash(row.ObjectID, row.UserID, row.GroupID,
                         row.GrantPriv, row.DenyPriv, row.MediumImageHeight,
                         row.MediumImageWidth)
Beispiel #22
0
 def hash(self, row):
     return content_hash(row.DisplayOrder, row.Annotation, row.Scratch)
Beispiel #23
0
 def hash(self, row):
     return content_hash(row.AttributeValue)
Beispiel #24
0
 def hash(self, row):
     return content_hash(row.Label, row.Name, row.ControlledListID)
Beispiel #25
0
 def hash(self, row):
     return content_hash(row.Title, row.ResourcePath)
Beispiel #26
0
 def hash(self, row):
     return content_hash(row.DCElement, row.DCRefinement)
Beispiel #27
0
 def hash(self, row):
     return content_hash(row.ItemValue)
Beispiel #28
0
 def hash(self, row):
     return content_hash(row.Label, row.ShortView, row.MediumView, row.LongView)
Beispiel #29
0
 def hash(self, row):
     return content_hash(row.CollectionID, (row.Flags or 0) & IMAGE_SHARED)
Beispiel #30
0
 def hash(self, row):
     return content_hash(row.Label, row.FieldValue, row.DisplayOrder)
Beispiel #31
0
 def hash(self, row):
     return content_hash(row.Title, row.UserID, row.Description,
                         row.ArchiveFlag, row.AccessPassword)
Beispiel #32
0
 def hash(self, row):
     return content_hash(row.ObjectID, row.UserID, row.GroupID, row.GrantPriv, row.DenyPriv)
Beispiel #33
0
 def hash(self, row):
     return content_hash(row.DisplayOrder, row.Annotation, row.Scratch)
Beispiel #34
0
 def hash(self, row):
     return content_hash(row.ObjectID, row.UserID, row.GroupID, row.GrantPriv, row.DenyPriv, row.MediumImageHeight, row.MediumImageWidth)
Beispiel #35
0
 def hash(self, row):
     return content_hash(row.DCElement, row.DCRefinement)
Beispiel #36
0
    ResetPassword=1 << 18,
    ManageAnnouncements=1 << 21,
    ManageControlledLists=1 << 23,
    ManageCollectionGroups=1 << 25,
    UserOptions=1 << 26,
    PersonalImages=1 << 27,
    ShareImages=1 << 28,
    SuggestImages=1 << 29,
    Unknown=1 << 31,
)

IMAGE_SHARED = 1
IMAGE_SUGGESTED = 2
IMAGE_REJECTED = 4

STATIC_CONTENT_HASH = content_hash('static')


class MergeObjectsException(Exception):
    def __init__(self, instance):
        super(MergeObjectsException, self).__init__()
        self.instance = instance


class MigrateModel(object):

    instance_maps = dict()

    def __init__(self,
                 cursor,
                 model,
Beispiel #37
0
 def hash(self, row):
     return content_hash(row.Label, row.FieldValue, row.DisplayOrder)
Beispiel #38
0
    ManageAnnouncements = 1 << 21,
    ManageControlledLists = 1 << 23,
    ManageCollectionGroups = 1 << 25,
    UserOptions = 1 << 26,
    PersonalImages = 1 << 27,
    ShareImages = 1 << 28,
    SuggestImages = 1 << 29,
    Unknown = 1 << 31,
)

IMAGE_SHARED = 1
IMAGE_SUGGESTED = 2
IMAGE_REJECTED = 4


STATIC_CONTENT_HASH = content_hash('static')


class MergeObjectsException(Exception):

    def __init__(self, instance):
        super(MergeObjectsException, self).__init__()
        self.instance = instance


class MigrateModel(object):

    instance_maps = dict()

    def __init__(self, cursor, model, query, label=None, m2m_model=None, type=None):
        self.model = model