예제 #1
0
 /**
  * @param name
  * @param value
  */
 public void addMetadata(String name, Object value) {
   // check if name is one of registred
   metadataMap.setFast(false);
   try {
     metadataMap.put(name, value);
   } finally {
     metadataMap.setFast(true);
   }
 }
 private synchronized void registerInstance() {
   if (isNew) {
     int max = 0;
     Iterator i = dsInstanceMap.keySet().iterator();
     while (i.hasNext()) {
       int key = ((Integer) i.next()).intValue();
       max = Math.max(max, key);
     }
     instanceKey = new Integer(max + 1);
     FastHashMap fhm = new FastHashMap();
     fhm.setFast(true);
     dsInstanceMap.put(instanceKey, fhm);
     isNew = false;
   }
 }
예제 #3
0
 /** @param value */
 public void setMinLength(Long value) {
   metadataMap.put(PropertyMetadata.MIN_LENGTH, value);
 }
예제 #4
0
 /** @param value */
 public void setMaxSize(Long value) {
   metadataMap.put(PropertyMetadata.MAX_SIZE, value);
 }
예제 #5
0
 /*
  * (non-Javadoc)
  *
  * @see nl.knowlogy.validation.metadata.PropertyMetadata#getMaxSize()
  */
 public Long getMaxSize() {
   return (Long) metadataMap.get(PropertyMetadata.MAX_SIZE);
 }
예제 #6
0
  public Long getMaxLength() {

    return (Long) metadataMap.get(PropertyMetadata.MAX_LENGTH);
  }
예제 #7
0
 /*
  * (non-Javadoc)
  *
  * @see nl.knowlogy.validation.metadata.PropertyMetadata#isRequired()
  */
 public Boolean isRequired() {
   Boolean value = (Boolean) metadataMap.get(PropertyMetadata.REQUIRED);
   return value != null ? value : Boolean.FALSE;
 }
예제 #8
0
 /*
  * (non-Javadoc)
  *
  * @see nl.knowlogy.validation.metadata.PropertyMetadata#setRequired(boolean)
  */
 public void setRequired(Boolean value) {
   metadataMap.put(PropertyMetadata.REQUIRED, value);
 }
예제 #9
0
 /** @param value */
 public void setAllowedValues(String value) {
   metadataMap.put(PropertyMetadata.ALLOWED_VALUES, value);
 }
예제 #10
0
 public String getAllowedValues() {
   return (String) metadataMap.get(PropertyMetadata.ALLOWED_VALUES);
 }
예제 #11
0
 /** @param pattern */
 public void setPattern(String pattern) {
   metadataMap.put(PropertyMetadata.PATTERN, pattern);
 }
예제 #12
0
 public String getPattern() {
   return (String) metadataMap.get(PropertyMetadata.PATTERN);
 }
예제 #13
0
 /** @param value */
 public void setMinSize(Long value) {
   metadataMap.put(PropertyMetadata.MIN_SIZE, value);
 }
예제 #14
0
 /*
  * (non-Javadoc)
  *
  * @see nl.knowlogy.validation.metadata.PropertyMetadata#getMinSize()
  */
 public Long getMinSize() {
   return (Long) metadataMap.get(PropertyMetadata.MIN_SIZE);
 }