Changeset 785


Ignore:
Timestamp:
Aug 6, 2010, 12:22:26 PM (10 years ago)
Author:
duh
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy

    r784 r785  
    3737        Map templateTermFields = [:]
    3838
    39         // keep an internal identifier for use in dynamic forms
    40         private int identifier = 0
    41         static int iterator = 0
    42 
    43         // set transients
    44         static transients = [ "identifier", "iterator" ]
    45 
    4639        // define relationships
    4740        static hasMany = [
     
    330323                        return (!error)
    331324                })
    332         }
    333 
    334         /**
    335          * Class constructor increments that static iterator
    336          * and sets the object's identifier (used in dynamic webforms)
    337          * @void
    338          */
    339         public TemplateEntity() {
    340                 if (!identifier) identifier = iterator++
    341         }
    342 
    343         /**
    344          * Return the identifier
    345          * @return int
    346          */
    347         final public int getIdentifier() {
    348                 return identifier
    349325        }
    350326
Note: See TracChangeset for help on using the changeset viewer.