org.deduced.validation.model.implementation
Class StringValidationModelImplementation

java.lang.Object
  extended by org.deduced.AbstractPropertyCollection<K,V>
      extended by org.deduced.FixedPropertyInstanceCollection<java.lang.Object,java.lang.Object>
          extended by org.deduced.validation.model.implementation.StringValidationModelImplementation
All Implemented Interfaces:
java.lang.Cloneable, PropertyCollection<java.lang.Object,java.lang.Object>, LinkedValidationModel, NullableValidationModel, StringValidationModel, ValidationModel

public class StringValidationModelImplementation
extends FixedPropertyInstanceCollection<java.lang.Object,java.lang.Object>
implements StringValidationModel

Java Implementation used to represent the type : string validation model Class generated by org.deduced.generator.VelocityGenerator Using template : org/deduced/generator/java/JavaImplementation.vm


Nested Class Summary
 
Nested classes/interfaces inherited from class org.deduced.AbstractPropertyCollection
AbstractPropertyCollection.CollectionToDeleteMonitor
 
Field Summary
private  PropertyCollectionType defaultValidatorType
          member variable holding the value for : default validator type
private  java.lang.String invalidRegularExpression
          member variable holding the value for : invalid regular expression
private  boolean isMultipleLinesAllowed
          member variable holding the value for : is multiple lines allowed
private  boolean isNullValid
          member variable holding the value for : is null valid
static java.util.Set<java.lang.Object> KEY_SET
          list of keys held in this collection
private  java.lang.Integer maximumLength
          member variable holding the value for : maximum length
private  java.lang.Integer minimumLength
          member variable holding the value for : minimum length
private  java.lang.String validRegularExpression
          member variable holding the value for : valid regular expression
 
Fields inherited from class org.deduced.AbstractPropertyCollection
CHECK_DELETE_MODE_AUTOMATIC, CHECK_DELETE_MODE_MANUAL, COLLECTION_TO_DELETE
 
Fields inherited from interface org.deduced.validation.model.StringValidationModel
INVALID_REGULAR_EXPRESSION_INSTANCE, IS_MULTIPLE_LINES_ALLOWED_INSTANCE, MAXIMUM_LENGTH_INSTANCE, MINIMUM_LENGTH_INSTANCE, STRING_VALIDATION_MODEL_TYPE, VALID_REGULAR_EXPRESSION_INSTANCE
 
Fields inherited from interface org.deduced.validation.model.NullableValidationModel
IS_NULL_VALID_INSTANCE, NULLABLE_VALIDATION_MODEL_TYPE
 
Fields inherited from interface org.deduced.validation.model.LinkedValidationModel
DEFAULT_VALIDATOR_TYPE_INSTANCE, LINKED_VALIDATION_MODEL_TYPE
 
Fields inherited from interface org.deduced.ValidationModel
VALIDATION_MODEL_TYPE
 
Fields inherited from interface org.deduced.PropertyCollection
PROPERTY_COLLECTION_TYPE
 
Constructor Summary
StringValidationModelImplementation()
          Default constructor for the type : string validation model
 
Method Summary
 java.util.Set<java.lang.Object> asKeySet()
           
 java.lang.Object clone()
          (non-Javadoc)
static void createInstancesAndTypes()
          create instances and types
static void createKeyList()
          static method used to initialize the key list on the property collection
 boolean equals(java.lang.Object o)
          (non-Javadoc)
static void fillInstancesAndTypes()
          fill instances and types phase 1
static void fillInstancesAndTypesFromSchema(PropertyCollection<?,?> schema)
          fill instances and types from a schema
static void fillTypeLists()
          fill instances and types phase 2
 PropertyCollectionType getDefaultValidatorType()
          (non-Javadoc)
static PropertyCollection getDefaultValidatorType(PropertyCollection<?,?> collection)
          Get the value of the instance : default validator type
 java.lang.String getInvalidRegularExpression()
          (non-Javadoc)
static java.lang.String getInvalidRegularExpression(PropertyCollection<?,?> collection)
          Get the value of the instance : invalid regular expression
 java.lang.Integer getMaximumLength()
          (non-Javadoc)
static java.lang.Integer getMaximumLength(PropertyCollection<?,?> collection)
          Get the value of the instance : maximum length
 java.lang.Integer getMinimumLength()
          (non-Javadoc)
static java.lang.Integer getMinimumLength(PropertyCollection<?,?> collection)
          Get the value of the instance : minimum length
 java.lang.Object getPropertyValue(java.lang.Object key)
          (non-Javadoc)
 java.lang.String getValidRegularExpression()
          (non-Javadoc)
static java.lang.String getValidRegularExpression(PropertyCollection<?,?> collection)
          Get the value of the instance : valid regular expression
 boolean isMultipleLinesAllowed()
          (non-Javadoc)
static java.lang.Boolean isMultipleLinesAllowed(PropertyCollection<?,?> collection)
          Get the value of the instance : is multiple lines allowed
 boolean isNullValid()
          (non-Javadoc)
static java.lang.Boolean isNullValid(PropertyCollection<?,?> collection)
          Get the value of the instance : is null valid
static void resetListFixedInstances(StringValidationModel instance)
          reset all the list fixed instances
static PropertyCollection setDefaultValidatorType(PropertyCollection collection, PropertyCollection value)
          set the value of the instance : default validator type
 PropertyCollectionType setDefaultValidatorType(PropertyCollectionType setValue)
          (non-Javadoc)
static java.lang.String setInvalidRegularExpression(PropertyCollection collection, java.lang.String value)
          set the value of the instance : invalid regular expression
 java.lang.String setInvalidRegularExpression(java.lang.String setValue)
          (non-Javadoc)
 boolean setIsMultipleLinesAllowed(boolean setValue)
          (non-Javadoc)
static java.lang.Boolean setIsMultipleLinesAllowed(PropertyCollection collection, java.lang.Boolean value)
          set the value of the instance : is multiple lines allowed
 boolean setIsNullValid(boolean setValue)
          (non-Javadoc)
static java.lang.Boolean setIsNullValid(PropertyCollection collection, java.lang.Boolean value)
          set the value of the instance : is null valid
 java.lang.Integer setMaximumLength(java.lang.Integer setValue)
          (non-Javadoc)
static java.lang.Integer setMaximumLength(PropertyCollection collection, java.lang.Integer value)
          set the value of the instance : maximum length
 java.lang.Integer setMinimumLength(java.lang.Integer setValue)
          (non-Javadoc)
static java.lang.Integer setMinimumLength(PropertyCollection collection, java.lang.Integer value)
          set the value of the instance : minimum length
 java.lang.Object setProperty(java.lang.Object key, java.lang.Object value)
          (non-Javadoc)
static java.lang.String setValidRegularExpression(PropertyCollection collection, java.lang.String value)
          set the value of the instance : valid regular expression
 java.lang.String setValidRegularExpression(java.lang.String setValue)
          (non-Javadoc)
 PropertyCollectionType type()
          (non-Javadoc)
 
Methods inherited from class org.deduced.FixedPropertyInstanceCollection
addProperty, areKeysAssignedAutomatically, containsKey, getProperty, iterator, iteratorByValue, removeProperty, removePropertyInstance, removePropertyValue, size
 
Methods inherited from class org.deduced.AbstractPropertyCollection
activate, addListener, asPropertyList, asPropertyMap, asValueList, asValueMap, callObjectClone, classLogger, cleanNewlyClonedValue, clear, clearCollectionMonitoredForDelete, cloneCollection, containsInstance, containsValue, createUniqueID, delete, deleteClearAllProperties, deleteClearListenerList, deleteFireDeleteEvent, deleteProcessCompletedValidation, deleteRemoveLocalObjectFromParent, deleteValidateEmptyListenerList, deleteValidateNoPendingReferences, firePropertyChangeEvent, flushCollectionsWithNewParent, flushCollectionsWithNewParent, getActionInvoker, getCheckDeleteMode, getCheckDeleteRunner, getFixedInstance, getInstanceIdentityKey, hashCode, id, instanceKey, internalFirePropertyChangeEvent, invokeAction, isActivated, isDeleteCheckedOnClearParent, isEmpty, isListenerRegistered, isParentOrKeyNull, keyOnParent, parent, removeListener, requiresChangeEvent, setActionInvoker, setCheckDeleteMode, setCheckDeleteRunner, setDeleteCheckedOnClearParent, setFixedInstance, setParent, toString, updateReference, updateReferenceWithReferenceFlag, validateAllPropertyInstances, validateNoListener, validateNoParentRecursion, validateParentIsNull, validateParentIsNull, valueKey
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deduced.PropertyCollection
activate, addListener, addProperty, areKeysAssignedAutomatically, asPropertyList, asPropertyMap, asValueList, asValueMap, clear, containsInstance, containsKey, containsValue, delete, getFixedInstance, getProperty, id, instanceKey, invokeAction, isActivated, isEmpty, isListenerRegistered, iterator, iteratorByValue, keyOnParent, parent, removeListener, removeProperty, removePropertyInstance, removePropertyValue, setFixedInstance, setParent, size, valueKey
 

Field Detail

KEY_SET

public static java.util.Set<java.lang.Object> KEY_SET
list of keys held in this collection


minimumLength

private java.lang.Integer minimumLength
member variable holding the value for : minimum length


maximumLength

private java.lang.Integer maximumLength
member variable holding the value for : maximum length


validRegularExpression

private java.lang.String validRegularExpression
member variable holding the value for : valid regular expression


invalidRegularExpression

private java.lang.String invalidRegularExpression
member variable holding the value for : invalid regular expression


isMultipleLinesAllowed

private boolean isMultipleLinesAllowed
member variable holding the value for : is multiple lines allowed


isNullValid

private boolean isNullValid
member variable holding the value for : is null valid


defaultValidatorType

private PropertyCollectionType defaultValidatorType
member variable holding the value for : default validator type

Constructor Detail

StringValidationModelImplementation

public StringValidationModelImplementation()
Default constructor for the type : string validation model

Method Detail

asKeySet

public java.util.Set<java.lang.Object> asKeySet()
Specified by:
asKeySet in interface PropertyCollection<java.lang.Object,java.lang.Object>
Returns:
the key set

type

public PropertyCollectionType type()
(non-Javadoc)

Specified by:
type in interface PropertyCollection<java.lang.Object,java.lang.Object>
Returns:
the property description
See Also:
PropertyCollection.type()

createKeyList

public static void createKeyList()
static method used to initialize the key list on the property collection


getMinimumLength

public java.lang.Integer getMinimumLength()
(non-Javadoc)

Specified by:
getMinimumLength in interface StringValidationModel
Returns:
minimum length
See Also:
StringValidationModel.getMinimumLength()

getMinimumLength

public static java.lang.Integer getMinimumLength(PropertyCollection<?,?> collection)
Get the value of the instance : minimum length

Parameters:
collection - new collection from which to fetch the value
Returns:
minimum length

setMinimumLength

public java.lang.Integer setMinimumLength(java.lang.Integer setValue)
(non-Javadoc)

Specified by:
setMinimumLength in interface StringValidationModel
Parameters:
setValue - new minimum length
Returns:
minimum length value after the change
See Also:
StringValidationModel.setMinimumLength(java.lang.Integer)

setMinimumLength

public static java.lang.Integer setMinimumLength(PropertyCollection collection,
                                                 java.lang.Integer value)
set the value of the instance : minimum length

Parameters:
collection - new collection on which to set the value
value - new value for : minimum length
Returns:
minimum length

getMaximumLength

public java.lang.Integer getMaximumLength()
(non-Javadoc)

Specified by:
getMaximumLength in interface StringValidationModel
Returns:
maximum length
See Also:
StringValidationModel.getMaximumLength()

getMaximumLength

public static java.lang.Integer getMaximumLength(PropertyCollection<?,?> collection)
Get the value of the instance : maximum length

Parameters:
collection - new collection from which to fetch the value
Returns:
maximum length

setMaximumLength

public java.lang.Integer setMaximumLength(java.lang.Integer setValue)
(non-Javadoc)

Specified by:
setMaximumLength in interface StringValidationModel
Parameters:
setValue - new maximum length
Returns:
maximum length value after the change
See Also:
StringValidationModel.setMaximumLength(java.lang.Integer)

setMaximumLength

public static java.lang.Integer setMaximumLength(PropertyCollection collection,
                                                 java.lang.Integer value)
set the value of the instance : maximum length

Parameters:
collection - new collection on which to set the value
value - new value for : maximum length
Returns:
maximum length

getValidRegularExpression

public java.lang.String getValidRegularExpression()
(non-Javadoc)

Specified by:
getValidRegularExpression in interface StringValidationModel
Returns:
valid regular expression
See Also:
StringValidationModel.getValidRegularExpression()

getValidRegularExpression

public static java.lang.String getValidRegularExpression(PropertyCollection<?,?> collection)
Get the value of the instance : valid regular expression

Parameters:
collection - new collection from which to fetch the value
Returns:
valid regular expression

setValidRegularExpression

public java.lang.String setValidRegularExpression(java.lang.String setValue)
(non-Javadoc)

Specified by:
setValidRegularExpression in interface StringValidationModel
Parameters:
setValue - new valid regular expression
Returns:
valid regular expression value after the change
See Also:
StringValidationModel.setValidRegularExpression(java.lang.String)

setValidRegularExpression

public static java.lang.String setValidRegularExpression(PropertyCollection collection,
                                                         java.lang.String value)
set the value of the instance : valid regular expression

Parameters:
collection - new collection on which to set the value
value - new value for : valid regular expression
Returns:
valid regular expression

getInvalidRegularExpression

public java.lang.String getInvalidRegularExpression()
(non-Javadoc)

Specified by:
getInvalidRegularExpression in interface StringValidationModel
Returns:
invalid regular expression
See Also:
StringValidationModel.getInvalidRegularExpression()

getInvalidRegularExpression

public static java.lang.String getInvalidRegularExpression(PropertyCollection<?,?> collection)
Get the value of the instance : invalid regular expression

Parameters:
collection - new collection from which to fetch the value
Returns:
invalid regular expression

setInvalidRegularExpression

public java.lang.String setInvalidRegularExpression(java.lang.String setValue)
(non-Javadoc)

Specified by:
setInvalidRegularExpression in interface StringValidationModel
Parameters:
setValue - new invalid regular expression
Returns:
invalid regular expression value after the change
See Also:
StringValidationModel.setInvalidRegularExpression(java.lang.String)

setInvalidRegularExpression

public static java.lang.String setInvalidRegularExpression(PropertyCollection collection,
                                                           java.lang.String value)
set the value of the instance : invalid regular expression

Parameters:
collection - new collection on which to set the value
value - new value for : invalid regular expression
Returns:
invalid regular expression

isMultipleLinesAllowed

public boolean isMultipleLinesAllowed()
(non-Javadoc)

Specified by:
isMultipleLinesAllowed in interface StringValidationModel
Returns:
is multiple lines allowed
See Also:
StringValidationModel.isMultipleLinesAllowed()

isMultipleLinesAllowed

public static java.lang.Boolean isMultipleLinesAllowed(PropertyCollection<?,?> collection)
Get the value of the instance : is multiple lines allowed

Parameters:
collection - new collection from which to fetch the value
Returns:
is multiple lines allowed

setIsMultipleLinesAllowed

public boolean setIsMultipleLinesAllowed(boolean setValue)
(non-Javadoc)

Specified by:
setIsMultipleLinesAllowed in interface StringValidationModel
Parameters:
setValue - new is multiple lines allowed
Returns:
is multiple lines allowed value after the change
See Also:
StringValidationModel.setIsMultipleLinesAllowed(boolean)

setIsMultipleLinesAllowed

public static java.lang.Boolean setIsMultipleLinesAllowed(PropertyCollection collection,
                                                          java.lang.Boolean value)
set the value of the instance : is multiple lines allowed

Parameters:
collection - new collection on which to set the value
value - new value for : is multiple lines allowed
Returns:
is multiple lines allowed

isNullValid

public boolean isNullValid()
(non-Javadoc)

Specified by:
isNullValid in interface NullableValidationModel
Returns:
is null valid
See Also:
NullableValidationModel.isNullValid()

isNullValid

public static java.lang.Boolean isNullValid(PropertyCollection<?,?> collection)
Get the value of the instance : is null valid

Parameters:
collection - new collection from which to fetch the value
Returns:
is null valid

setIsNullValid

public boolean setIsNullValid(boolean setValue)
(non-Javadoc)

Specified by:
setIsNullValid in interface NullableValidationModel
Parameters:
setValue - new is null valid
Returns:
is null valid value after the change
See Also:
NullableValidationModel.setIsNullValid(boolean)

setIsNullValid

public static java.lang.Boolean setIsNullValid(PropertyCollection collection,
                                               java.lang.Boolean value)
set the value of the instance : is null valid

Parameters:
collection - new collection on which to set the value
value - new value for : is null valid
Returns:
is null valid

getDefaultValidatorType

public PropertyCollectionType getDefaultValidatorType()
(non-Javadoc)

Specified by:
getDefaultValidatorType in interface LinkedValidationModel
Returns:
default validator type
See Also:
LinkedValidationModel.getDefaultValidatorType()

getDefaultValidatorType

public static PropertyCollection getDefaultValidatorType(PropertyCollection<?,?> collection)
Get the value of the instance : default validator type

Parameters:
collection - new collection from which to fetch the value
Returns:
default validator type

setDefaultValidatorType

public PropertyCollectionType setDefaultValidatorType(PropertyCollectionType setValue)
(non-Javadoc)

Specified by:
setDefaultValidatorType in interface LinkedValidationModel
Parameters:
setValue - new default validator type
Returns:
default validator type value after the change
See Also:
LinkedValidationModel.setDefaultValidatorType(org.deduced.PropertyCollectionType)

setDefaultValidatorType

public static PropertyCollection setDefaultValidatorType(PropertyCollection collection,
                                                         PropertyCollection value)
set the value of the instance : default validator type

Parameters:
collection - new collection on which to set the value
value - new value for : default validator type
Returns:
default validator type

equals

public boolean equals(java.lang.Object o)
(non-Javadoc)

Overrides:
equals in class AbstractPropertyCollection<java.lang.Object,java.lang.Object>
See Also:
Object.equals(java.lang.Object)

clone

public java.lang.Object clone()
(non-Javadoc)

Specified by:
clone in interface PropertyCollection<java.lang.Object,java.lang.Object>
Overrides:
clone in class AbstractPropertyCollection<java.lang.Object,java.lang.Object>
Returns:
the object clone
See Also:
AbstractPropertyCollection.clone()

setProperty

public java.lang.Object setProperty(java.lang.Object key,
                                    java.lang.Object value)
(non-Javadoc)

Specified by:
setProperty in interface PropertyCollection<java.lang.Object,java.lang.Object>
Overrides:
setProperty in class FixedPropertyInstanceCollection<java.lang.Object,java.lang.Object>
Parameters:
key - the key of the property
value - the new value of the property. If the property is a collection that is not by reference, this method requires that the passed collection has a parent set to null since it will reset the parent.
Returns:
the added value instance
See Also:
PropertyCollection.setProperty(java.lang.Object,java.lang.Object)

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object key)
(non-Javadoc)

Specified by:
getPropertyValue in interface PropertyCollection<java.lang.Object,java.lang.Object>
Parameters:
key - the property key
Returns:
the property value, null if the get failed
See Also:
PropertyCollection.getPropertyValue(java.lang.Object)

resetListFixedInstances

public static void resetListFixedInstances(StringValidationModel instance)
reset all the list fixed instances

Parameters:
instance - the instance that will get all its list fixed instances set

createInstancesAndTypes

public static void createInstancesAndTypes()
create instances and types


fillInstancesAndTypesFromSchema

public static void fillInstancesAndTypesFromSchema(PropertyCollection<?,?> schema)
fill instances and types from a schema

Parameters:
schema - the schema that contains the required instances and types

fillInstancesAndTypes

public static void fillInstancesAndTypes()
fill instances and types phase 1


fillTypeLists

public static void fillTypeLists()
fill instances and types phase 2