Package Camelot :: Package camelot :: Package model :: Module synchronization
[frames] | no frames]

Source Code for Module Camelot.camelot.model.synchronization

 1  #  ================================================================================== 
 2  # 
 3  #  Copyright (C) 2007-2008 Conceptive Engineering bvba. All rights reserved. 
 4  #  www.conceptive.be / project-camelot@conceptive.be 
 5  # 
 6  #  This file is part of the Camelot Library. 
 7  # 
 8  #  This file may be used under the terms of the GNU General Public 
 9  #  License version 2.0 as published by the Free Software Foundation 
10  #  and appearing in the file LICENSE.GPL included in the packaging of 
11  #  this file.  Please review the following information to ensure GNU 
12  #  General Public Licensing requirements will be met: 
13  #  http://www.trolltech.com/products/qt/opensource.html 
14  # 
15  #  If you are unsure which license is appropriate for your use, please 
16  #  review the following information: 
17  #  http://www.trolltech.com/products/qt/licensing.html or contact 
18  #  project-camelot@conceptive.be. 
19  # 
20  #  This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 
21  #  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
22  # 
23  #  For use of this library in commercial applications, please contact 
24  #  project-camelot@conceptive.be 
25  # 
26  #  ================================================================================== 
27  from camelot.model import metadata 
28  from elixir.entity import Entity 
29  from elixir.options import using_options 
30  from elixir.fields import Field 
31  from sqlalchemy.types import Unicode, Integer, DateTime 
32  from elixir.ext.associable import associable 
33  """Functionallity to synchronize elements from the camelot database against 
34  other databases 
35  """ 
36   
37  __metadata__ = metadata 
38   
39  import datetime 
40   
41 -class Synchronized( Entity ):
42 using_options( tablename = 'synchronized' ) 43 database = Field( Unicode( 30 ), index = True ) 44 tablename = Field( Unicode( 30 ), index = True ) 45 primary_key = Field( Integer(), index = True ) 46 last_update = Field( DateTime(), index = True, 47 default = datetime.datetime.now, 48 onupdate = datetime.datetime.now )
49 50 is_synchronized = associable( Synchronized ) 51