Velocity Template Errors on my Model...

From: James Cicenia (jame..imijon.com)
Date: Mon Dec 03 2007 - 17:05:18 EST

  • Next message: André Koppany: "Re: EOGenerator Velocity Templates Question"

    OK -

    I put the new _Entity14.java and clicked the new switch and generated
    my eos...

    1) Error on a lot of these...

      public static UserPasswordArchive
    fetchRequiredTOSUserPasswordArchive(EOEditingContext editingContext,
    String keyName, Object value) {
         return
    _UserPasswordArchive
    .fetchRequiredTOSUserPasswordArchive(editingContext, new
    EOKeyValueQualifier(keyName, EOQualifier.QualifierOperatorEqual,
    value));
       }

    the above gives me an error saying that the arguments are wrong.

    that is then followed up by:

      public static LifeCycleState
    fetchRequiredLifeCycleState(EOEditingContext editingContext,
    EOQualifier qualifier) {
         LifeCycleState eoObject =
    _LifeCycleState.fetchLifeCycleState(editingContext, qualifier);
         if (eoObject == null) {
           throw new NoSuchElementException("There was no
    TOSLifeCycleState that matched the qualifier '" + qualifier + "'.");
         }
         return eoObject;
       }

    notice in the second method that the fetchLifeCycleState should
    actually be fetchTOSLifeCycleState

    2)

    Notice the $relationship in the following:

       public void
    addToProjectRosterMemberProjectPhaseTasksRelationship
    ($relationship.actualDestination.classNameWithDefault object) {
         addObjectToBothSidesOfRelationshipWithKey(object,
    "projectRosterMemberProjectPhaseTasks");
       }

       public void
    removeFromProjectRosterMemberProjectPhaseTasksRelationship
    ($relationship.actualDestination.classNameWithDefault object) {
         removeObjectFromBothSidesOfRelationshipWithKey(object,
    "projectRosterMemberProjectPhaseTasks");
       }

       public $relationship.actualDestination.classNameWithDefault
    createProjectRosterMemberProjectPhaseTasksRelationship() {
         EOClassDescription eoClassDesc =
    EOClassDescription
    .classDescriptionForEntityName("ProjectRosterMemberProjectPhaseTask");
         EOEnterpriseObject eo =
    eoClassDesc.createInstanceWithEditingContext(editingContext(), null);
         editingContext().insertObject(eo);
         addObjectToBothSidesOfRelationshipWithKey(eo,
    "projectRosterMemberProjectPhaseTasks");
         return ($relationship.actualDestination.classNameWithDefault) eo;
       }

       public void
    deleteProjectRosterMemberProjectPhaseTasksRelationship
    ($relationship.actualDestination.classNameWithDefault object) {
         removeObjectFromBothSidesOfRelationshipWithKey(object,
    "projectRosterMemberProjectPhaseTasks");
         editingContext().deleteObject(object);
       }

       public void
    deleteAllProjectRosterMemberProjectPhaseTasksRelationships() {
         Enumeration objects =
    projectRosterMemberProjectPhaseTasks
    ().immutableClone().objectEnumerator();
         while (objects.hasMoreElements()) {
            
    deleteProjectRosterMemberProjectPhaseTasksRelationship
    (($
    relationship
    .actualDestination.classNameWithDefault)objects.nextElement());
         }
       }

    That is it for now....

    Any thoughts?

    Thanks
    James Cicenia



    This archive was generated by hypermail 2.0.0 : Mon Dec 03 2007 - 17:06:45 EST