|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.wikitty.entities.FieldType
public class FieldType
| Field Summary | |
|---|---|
protected int |
lowerBound
|
static int |
NOLIMIT
|
protected WikittyTypes |
type
|
protected int |
upperBound
|
| Fields inherited from interface org.nuiton.wikitty.generator.WikittyTagValue |
|---|
TAG_ALLOWED, TAG_ALLOWED_QUERY, TAG_ALTERNATIVE_NAME, TAG_CHOICE, TAG_CHOICE_QUERY, TAG_CRYPT, TAG_DOCUMENTATION, TAG_INDEXED, TAG_MAX, TAG_MAX_QUERY, TAG_MIN, TAG_MIN_QUERY, TAG_NOT_NULL, TAG_PATTERN, TAG_PRELOAD, TAG_SORT_ORDER, TAG_SUBTYPE, TAG_TO_STRING, TAG_UNIQUE, TAG_VERSION |
| Constructor Summary | |
|---|---|
FieldType()
|
|
FieldType(WikittyTypes type,
int lowerBound,
int upperBound)
|
|
| Method Summary | |
|---|---|
void |
addTagValue(String tag,
String value)
|
String |
getAllowed()
|
List<String> |
getAllowedAsList()
|
String |
getAllowedQuery()
|
String |
getChoice()
|
String |
getChoiceQuery()
|
Object |
getContainedValidObject(Object value)
Convert value in argument in right type for this FieldType. |
String |
getCryptAlgo()
|
String |
getCryptPassword()
|
int |
getLowerBound()
|
String |
getMax()
|
String |
getMaxQuery()
|
String |
getMin()
|
String |
getMinQuery()
|
String |
getPattern()
|
String |
getSubtype()
|
Set<String> |
getTagNames()
|
String |
getTagValue(String tag)
|
Map<String,String> |
getTagValues()
|
WikittyTypes |
getType()
|
int |
getUpperBound()
|
Object |
getValidValue(Object value)
Return a valid value for this field. |
boolean |
hasAllowed()
|
boolean |
hasAllowedQuery()
|
boolean |
hasChoice()
|
boolean |
hasChoiceQuery()
|
boolean |
hasMax()
|
boolean |
hasMaxQuery()
|
boolean |
hasMin()
|
boolean |
hasMinQuery()
|
boolean |
hasPattern()
|
boolean |
isCollection()
Return true if this field have upperBound > 1. |
boolean |
isCrypted()
|
boolean |
isIndexed()
|
boolean |
isNotNull()
|
boolean |
isRestrited()
Si les extensions autorisees pour ce champs est contrainte par le tag value WikittyTagValue.TAG_ALLOWED alors retourne true, sinon false. |
boolean |
isUnique()
|
boolean |
isValidValue(Object value)
Test if value in argument is valid for this field type. |
void |
setLowerBound(int lowerBound)
|
void |
setTagValues(Map<String,String> tagValues)
|
void |
setType(WikittyTypes type)
|
void |
setUpperBound(int upperBound)
|
String |
toDefinition(String name)
Return string definition for this field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NOLIMIT
protected WikittyTypes type
protected int lowerBound
protected int upperBound
| Constructor Detail |
|---|
public FieldType()
public FieldType(WikittyTypes type,
int lowerBound,
int upperBound)
| Method Detail |
|---|
public void addTagValue(String tag,
String value)
public String getTagValue(String tag)
public Set<String> getTagNames()
public Map<String,String> getTagValues()
public void setTagValues(Map<String,String> tagValues)
public boolean isCollection()
true is field is collectionpublic String toDefinition(String name)
name - field name used for definition
public Object getContainedValidObject(Object value)
value - value to convert
public Object getValidValue(Object value)
throws WikittyException
value - is casted if possible to an actual correct value.
WikittyException - if value can't be obtainedpublic boolean isValidValue(Object value)
value - to test
public WikittyTypes getType()
public void setType(WikittyTypes type)
public int getLowerBound()
public void setLowerBound(int lowerBound)
public int getUpperBound()
public void setUpperBound(int upperBound)
public boolean isUnique()
WikittyTagValue.TAG_UNIQUEpublic boolean isNotNull()
WikittyTagValue.TAG_NOT_NULLpublic boolean isIndexed()
WikittyTagValue.TAG_INDEXEDpublic boolean hasPattern()
WikittyTagValue.TAG_PATTERNpublic String getPattern()
WikittyTagValue.TAG_PATTERNpublic boolean isCrypted()
WikittyTagValue.TAG_CRYPTpublic String getCryptAlgo()
WikittyTagValue.TAG_CRYPTpublic String getCryptPassword()
WikittyTagValue.TAG_CRYPTpublic String getSubtype()
WikittyTagValue.TAG_SUBTYPEpublic String getAllowed()
WikittyTagValue.TAG_ALLOWEDpublic String getAllowedQuery()
WikittyTagValue.TAG_ALLOWED_QUERYpublic String getChoice()
WikittyTagValue.TAG_CHOICEpublic String getChoiceQuery()
WikittyTagValue.TAG_CHOICE_QUERYpublic String getMin()
WikittyTagValue.TAG_MINpublic String getMinQuery()
WikittyTagValue.TAG_MIN_QUERYpublic String getMax()
WikittyTagValue.TAG_MAXpublic String getMaxQuery()
WikittyTagValue.TAG_MAX_QUERYpublic List<String> getAllowedAsList()
WikittyTagValue.TAG_ALLOWEDpublic boolean isRestrited()
WikittyTagValue.TAG_ALLOWED alors retourne true, sinon false.
WikittyTagValue.TAG_ALLOWEDpublic boolean hasAllowed()
public boolean hasAllowedQuery()
public boolean hasChoice()
public boolean hasChoiceQuery()
public boolean hasMin()
public boolean hasMinQuery()
public boolean hasMax()
public boolean hasMaxQuery()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||