commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-commons/modeler/src/java/org/apache/commons/modeler AttributeInfo.java
Date Mon, 17 Feb 2003 00:52:45 GMT
costin      2003/02/16 16:52:45

  Modified:    modeler/src/java/org/apache/commons/modeler
                        AttributeInfo.java
  Log:
  Added a new attribute for persistence
  
  Revision  Changes    Path
  1.6       +31 -5     jakarta-commons/modeler/src/java/org/apache/commons/modeler/AttributeInfo.java
  
  Index: AttributeInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/AttributeInfo.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AttributeInfo.java	3 Feb 2003 21:42:32 -0000	1.5
  +++ AttributeInfo.java	17 Feb 2003 00:52:45 -0000	1.6
  @@ -80,7 +80,7 @@
    */
   
   public class AttributeInfo extends FeatureInfo implements Serializable {
  -
  +    static final long serialVersionUID = -2511626862303972143L;
   
       // ----------------------------------------------------- Instance Variables
   
  @@ -104,6 +104,7 @@
       protected String type = null;
   
       protected String persist;
  +    protected String defaultStringValue;
       // ------------------------------------------------------------- Properties
   
   
  @@ -228,6 +229,31 @@
       public void setWriteable(boolean writeable) {
           this.writeable = writeable;
           this.info = null;
  +    }
  +
  +    /** Persistence policy.
  +     * All persistent attributes should have this attribute set.
  +     * Valid values:
  +     *   ???
  +     */
  +    public String getPersist() {
  +        return persist;
  +    }
  +
  +    public void setPersist(String persist) {
  +        this.persist = persist;
  +    }
  +
  +    /** Default value. If set, it can provide info to the user and
  +     * it can be used by persistence mechanism to generate a more compact
  +     * representation ( a value may not be saved if it's default )
  +     */
  +    public String getDefault() {
  +        return defaultStringValue;
  +    }
  +
  +    public void setDefault(String defaultStringValue) {
  +        this.defaultStringValue = defaultStringValue;
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message