nl.knowlogy.validation.metadata
Class PropertyMetadataImpl

java.lang.Object
  extended by nl.knowlogy.validation.metadata.PropertyMetadataImpl
All Implemented Interfaces:
PropertyMetadata

public class PropertyMetadataImpl
extends Object
implements PropertyMetadata

Author:
Robert

Field Summary
 
Fields inherited from interface nl.knowlogy.validation.metadata.PropertyMetadata
ALLOWED_VALUES, MAX_LENGTH, MAX_SIZE, MIN_LENGTH, MIN_SIZE, PATTERN, REQUIRED
 
Constructor Summary
PropertyMetadataImpl(String propertyName)
           
 
Method Summary
 void addMetadata(String name, Object value)
           
 String getAllowedValues()
          Returns a string with the allowed values.
 Long getMaxLength()
           
 Long getMaxSize()
          Return a maxsize of a number value
 Map getMetadata()
          Retuns a map with metadata.
 Long getMinLength()
           
 Long getMinSize()
          Returns a minsize of a number value.
 String getPattern()
           
 String getPropertyName()
          Returns the propertyName from the property to which this propertyMetadata belongs.
 Boolean isRequired()
          Return true if a value for this property is required.
 void setAllowedValues(String value)
           
 void setMaxLength(Long value)
           
 void setMaxSize(Long value)
           
 void setMinLength(Long value)
           
 void setMinSize(Long value)
           
 void setPattern(String pattern)
           
 void setRequired(Boolean value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyMetadataImpl

public PropertyMetadataImpl(String propertyName)
Method Detail

getPropertyName

public String getPropertyName()
Description copied from interface: PropertyMetadata
Returns the propertyName from the property to which this propertyMetadata belongs.

Specified by:
getPropertyName in interface PropertyMetadata
Returns:
the propertyName from the property to which this propertyMetadata belongs.

setRequired

public void setRequired(Boolean value)
Specified by:
setRequired in interface PropertyMetadata

isRequired

public Boolean isRequired()
Description copied from interface: PropertyMetadata
Return true if a value for this property is required.

Specified by:
isRequired in interface PropertyMetadata
Returns:
Returns the isRequired.

setMaxLength

public void setMaxLength(Long value)
Specified by:
setMaxLength in interface PropertyMetadata

getMaxLength

public Long getMaxLength()
Specified by:
getMaxLength in interface PropertyMetadata
Returns:
Returns the maxLength.

getMaxSize

public Long getMaxSize()
Description copied from interface: PropertyMetadata
Return a maxsize of a number value

Specified by:
getMaxSize in interface PropertyMetadata
Returns:

setMaxSize

public void setMaxSize(Long value)
Specified by:
setMaxSize in interface PropertyMetadata

setMinLength

public void setMinLength(Long value)
Specified by:
setMinLength in interface PropertyMetadata

getMinLength

public Long getMinLength()
Specified by:
getMinLength in interface PropertyMetadata
Returns:
Returns the minLength.

getMinSize

public Long getMinSize()
Description copied from interface: PropertyMetadata
Returns a minsize of a number value.

Specified by:
getMinSize in interface PropertyMetadata
Returns:
minsize of a number value

setMinSize

public void setMinSize(Long value)
Specified by:
setMinSize in interface PropertyMetadata

getPattern

public String getPattern()
Specified by:
getPattern in interface PropertyMetadata
Returns:
Returns the regEx.

setPattern

public void setPattern(String pattern)
Specified by:
setPattern in interface PropertyMetadata

getAllowedValues

public String getAllowedValues()
Description copied from interface: PropertyMetadata
Returns a string with the allowed values. Values a separeted with ','

Specified by:
getAllowedValues in interface PropertyMetadata
Returns:

setAllowedValues

public void setAllowedValues(String value)
Specified by:
setAllowedValues in interface PropertyMetadata

addMetadata

public void addMetadata(String name,
                        Object value)

getMetadata

public Map getMetadata()
Description copied from interface: PropertyMetadata
Retuns a map with metadata. Standard keys ared maxSize, minSize, required,minlength, maxlenght, pattern

Specified by:
getMetadata in interface PropertyMetadata
Returns:
a map with metadata. Standard keys ared maxSize, minSize, required,minlength, maxlenght, pattern .


Copyright © 2007. All Rights Reserved.