package com.abstratt.kirra;

/**
 * Represents a property.
 */
public class Property extends DataElement {

    private static final long serialVersionUID = 1;

    protected boolean unique;
    protected Object defaultValue;

    public Property() {
    }

    /**
     * An auto-generated property has its value automatically assigned.
     */
    public boolean isAutoGenerated() {
        return isUnique() && !isInitializable() && !isEditable();
    }

    /**
     * A unique property does not allow duplicated values.
     */
    public boolean isUnique() {
        return unique;
    }

    public void setUnique(boolean unique) {
        this.unique = unique;
    }
    
    public Object getDefaultValue() {
        return defaultValue;
    }
    
    public void setDefaultValue(Object value) {
        this.defaultValue = value;
    }
}
@@ -220,16 +220,51 @@
 Value;%0A%0A
+%09protected boolean autoGenerated;%0A%0A
     publ
@@ -417,78 +417,140 @@
 ) %7B%0A
- 
+%09%09return autoGenerated;%0A
     
+%7D%0A
    
-return isUnique() && !isInitializable() && !isEditable();%0A    
+ %0A    public void setAutoGenerated(boolean autoGenerated) %7B%0A%09%09this.autoGenerated = autoGenerated;%0A%09
 %7D%0A%0A 

support for property.autoGenerated