Index: topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java:1.4 topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java:1.5 --- topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java:1.4 Fri Sep 17 13:16:45 2004 +++ topia/src/java/org/codelutin/topia/generators/jdo/ObjectModelToJDOEntityGenerator.java Fri Sep 17 15:32:56 2004 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * - * Mise a jour: $Date: 2004/09/17 13:16:45 $ - * par : $Author: mazelier $ + * Mise a jour: $Date: 2004/09/17 15:32:56 $ + * par : $Author: bpoussin $ */ package org.codelutin.topia.generators.jdo; @@ -148,6 +148,67 @@ ////////////////////////////////////////////////////////////////////// public void generateOther(Writer output, ObjectModelClassifier clazzifier) throws IOException { + ////////////////////////////////////////////////////////////////////// + // all next method are in abstract class before + +if(!hasParent){ +/*{ + + protected String _topiaId_ = null; + protected String _version_; + protected Date _creationDate_; + protected Date _lastUpdateDate_; + protected TopiaUser _lastUpdateUser_; + + public String get_topiaId_(){ + return _topiaId_; + } + + public void set_topiaId_(String topiaId){ + if(_topiaId_ != null && !_topiaId_.equals(topiaId)){ + throw new RuntimeException("You're not allowed to change topiaId"); + } + this._topiaId_ = topiaId; + } + public String get_version_(){ + return _version_; + } + public void set_version_(String version){ + this._version_ = version; + } + + public Date get_creationDate_(){ + return _creationDate_; + } + public void set_creationDate_(Date creationDate){ + this._creationDate_ = creationDate; + } + + public Date get_lastUpdateDate_(){ + return _lastUpdateDate_; + } + public void set_lastUpdateDate_(Date lastUpdateDate){ + this._lastUpdateDate_ = lastUpdateDate; + } + + public TopiaUser get_lastUpdateUser_(){ + return _lastUpdateUser_; + } + public void set_lastUpdateUser_(TopiaUser lastUpdateUser){ + this._lastUpdateUser_ = lastUpdateUser; + } + + public JDOPersistenceHelper getPersistenceHelper(){ + PersistenceManager pm = JDOHelper.getPersistenceManager(this); + return (JDOPersistenceHelper)pm.getUserObject(); + } + + public TopiaContext getContext(){ + return getPersistenceHelper().getContext(); + } + +}*/ +} if(!(clazzifier instanceof ObjectModelClass)){ return; } @@ -310,70 +371,9 @@ public TopiaEntity getLazy(TopiaContext context) throws TopiaException { return new <%=clazzifier.getName()%>Lazy(context, get_topiaId_(), get_version_()); } - - ////////////////////////////////////////////////////////////////////// - // all next method are in abstract class before }*/ -if(!hasParent){ -/*{ - - protected String _topiaId_ = null; - protected String _version_; - protected Date _creationDate_; - protected Date _lastUpdateDate_; - protected TopiaUser _lastUpdateUser_; - - public String get_topiaId_(){ - return _topiaId_; - } - - public void set_topiaId_(String topiaId){ - if(_topiaId_ != null && !_topiaId_.equals(topiaId)){ - throw new RuntimeException("You're not allowed to change topiaId"); - } - this._topiaId_ = topiaId; - } - public String get_version_(){ - return _version_; - } - public void set_version_(String version){ - this._version_ = version; - } - - public Date get_creationDate_(){ - return _creationDate_; - } - public void set_creationDate_(Date creationDate){ - this._creationDate_ = creationDate; - } - - public Date get_lastUpdateDate_(){ - return _lastUpdateDate_; - } - public void set_lastUpdateDate_(Date lastUpdateDate){ - this._lastUpdateDate_ = lastUpdateDate; - } - - public TopiaUser get_lastUpdateUser_(){ - return _lastUpdateUser_; - } - public void set_lastUpdateUser_(TopiaUser lastUpdateUser){ - this._lastUpdateUser_ = lastUpdateUser; - } - - public JDOPersistenceHelper getPersistenceHelper(){ - PersistenceManager pm = JDOHelper.getPersistenceManager(this); - return (JDOPersistenceHelper)pm.getUserObject(); - } - - public TopiaContext getContext(){ - return getPersistenceHelper().getContext(); - } - -}*/ } - } } // ObjectModelToJDOEntityGenerator