source: mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_aquisitionmetadata.py @ 8086

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_aquisitionmetadata.py@8086
Revision 8086, 981 bytes checked in by mnagni, 8 years ago (diff)

Fixed the multiple CI_Party INSERT in the DB
Refactored the ingestion thanks to the new eq method in the imported classes DB library

Line 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19'''
20Created on 03-Feb-2012 10:41:10
21
22@author: mnagni
23'''
24
25class IF_AquisitionMetadata(object):
26    '''
27        Represents a data entity defined in a UML diagram and supposed to
28        be persisted in a relational database.
29 
30        This class has been genererated automatically using the Apache Velocity project.
31    '''
32    '''
33        Please note that any access to the inner attributes should be done using
34        the given get/set methods and NOT accessing them directly.
35    '''
36    def __init__(self):
37
38        super(IF_AquisitionMetadata, self).__init__()
39
40    def __key(self):
41        return ()
42
43    def __eq__(x, y):
44        '''
45        Cannot compare classes which do not define a "__key" attribute
46        '''
47        if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
48            return x.__key() == y.__key()
49        return id(x) == id(y)
50
51    def __hash__(self):
52        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.