org.sharengo.wikitty
Class FieldType
java.lang.Object
org.sharengo.wikitty.FieldType
- All Implemented Interfaces:
- Serializable
public class FieldType
- extends Object
- implements Serializable
- Version:
- $Revision: 1 $
Last update: $Date: 2010-04-16 10:29:38 +0200 (ven., 16 avril 2010) $
by : $Author: echatellier $
- Author:
- poussin
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOLIMIT
public static final int NOLIMIT
- See Also:
- Constant Field Values
FieldType
public FieldType()
FieldType
public FieldType(FieldType.TYPE type,
int lowerBound,
int upperBound)
FieldType
public FieldType(FieldType.TYPE type,
int lowerBound,
int upperBound,
boolean unique,
boolean notNull)
addTagValue
public void addTagValue(String tag,
String value)
getTagValue
public String getTagValue(String tag)
getTagNames
public Set<String> getTagNames()
getTagValues
public Map<String,String> getTagValues()
setTagValues
public void setTagValues(Map<String,String> tagValues)
isCollection
public boolean isCollection()
- Return true if this field have upperBound > 1
- Returns:
toDefinition
public String toDefinition(String name)
- Return string definition for this field
- Parameters:
name - field name used for definition
- Returns:
getContainedValidObject
protected Object getContainedValidObject(Object value)
- Convert value in argument in right type for this FieldType. Don't support
collection
- Parameters:
value - value to convert
- Returns:
- object in type of this FieldType
getValidValue
public Object getValidValue(Object value)
throws WikittyException
- Return a valid value for this field.
- Parameters:
value - is casted if possible to an actual correct value.
- Returns:
-
- Throws:
WikittyException
isValidValue
public boolean isValidValue(Object value)
- test if value in argument is valide for this field type
- Parameters:
value - to test
- Returns:
- true if value is valid
getType
public FieldType.TYPE getType()
getLowerBound
public int getLowerBound()
getUpperBound
public int getUpperBound()
isUnique
public boolean isUnique()
isNotNull
public boolean isNotNull()
Copyright © 2009-2010 CodeLutin. All Rights Reserved.