org.nuiton.wikitty.entities
Class FieldFactory

java.lang.Object
  extended by org.nuiton.wikitty.entities.FieldFactory

public class FieldFactory
extends Object


Field Summary
protected  String fieldName
           
protected  int maxOccur
           
protected  int minOccur
           
protected  ExtensionFactory parentFactory
           
protected  Map<String,String> tagValues
           
protected  WikittyTypes type
           
protected  boolean unique
           
 
Constructor Summary
FieldFactory(ExtensionFactory parentFactory, String fieldName, WikittyTypes type)
           
 
Method Summary
 FieldFactory addField(String name, WikittyTypes type)
           
 FieldFactory addTagValue(String tag, String value)
           
 FieldFactory allowed(String values)
          Ajoute la liste de valeurs autorises pour ce champs.
 FieldFactory allowedQuery(String allowedQuery)
           
protected  void append()
           
 FieldFactory choice(String values)
           
 FieldFactory choiceQuery(String choiceQuery)
           
 FieldFactory crypt(String algo, String password)
          Ajoute le tag crypt au champs
 WikittyExtension extension()
           
 FieldFactory indexed()
          Met a vrai la valeur indexed
 FieldFactory max(String v)
           
 FieldFactory maxOccur(int max)
           
 FieldFactory maxQuery(String query)
           
 FieldFactory min(String v)
           
 FieldFactory minOccur(int min)
           
 FieldFactory minQuery(String query)
           
 FieldFactory notIndexed()
          Met a false la valeur indexed
 FieldFactory notNull()
           
 FieldFactory pattern(String pattern)
          Ajout le pattern que doit respecter le champs.
 FieldFactory subtype(String type)
           
 FieldFactory unique()
          Si le champs est une collection indique que la collection ne peut pas contenir de doublon (Set)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentFactory

protected ExtensionFactory parentFactory

fieldName

protected String fieldName

type

protected WikittyTypes type

minOccur

protected int minOccur

maxOccur

protected int maxOccur

unique

protected boolean unique

tagValues

protected Map<String,String> tagValues
Constructor Detail

FieldFactory

public FieldFactory(ExtensionFactory parentFactory,
                    String fieldName,
                    WikittyTypes type)
Method Detail

addField

public FieldFactory addField(String name,
                             WikittyTypes type)

extension

public WikittyExtension extension()

append

protected void append()

maxOccur

public FieldFactory maxOccur(int max)

minOccur

public FieldFactory minOccur(int min)

unique

public FieldFactory unique()
Si le champs est une collection indique que la collection ne peut pas contenir de doublon (Set)

Returns:

notNull

public FieldFactory notNull()

crypt

public FieldFactory crypt(String algo,
                          String password)
Ajoute le tag crypt au champs

Parameters:
algo - l'algo de cryptage par exemple Blowfish
password - le mot de passe, ou null pour utiliser le mot de passe general
Returns:

allowed

public FieldFactory allowed(String values)
Ajoute la liste de valeurs autorises pour ce champs. Par exemple pour un champs de type Wikitty: "Person,Employee,Company"

Parameters:
values - La liste de valeur en representation chaine (le separateur est la virgule)
Returns:

allowedQuery

public FieldFactory allowedQuery(String allowedQuery)

choice

public FieldFactory choice(String values)

choiceQuery

public FieldFactory choiceQuery(String choiceQuery)

indexed

public FieldFactory indexed()
Met a vrai la valeur indexed

Returns:

notIndexed

public FieldFactory notIndexed()
Met a false la valeur indexed

Returns:

pattern

public FieldFactory pattern(String pattern)
Ajout le pattern que doit respecter le champs. Exemple: "A.*" pour un champs commencant par A

Parameters:
pattern -
Returns:

subtype

public FieldFactory subtype(String type)

min

public FieldFactory min(String v)

minQuery

public FieldFactory minQuery(String query)

max

public FieldFactory max(String v)

maxQuery

public FieldFactory maxQuery(String query)

addTagValue

public FieldFactory addTagValue(String tag,
                                String value)


Copyright © 2009-2012 CodeLutin. All Rights Reserved.