org.mmbase.datatypes.util
Class DataTypeChanger

java.lang.Object
  extended by org.mmbase.datatypes.util.DataTypeChanger

public class DataTypeChanger
extends Object

This utility class makes it easy to configure a DataType on the fly in java. E.g. this code could be used at EO:

   new FieldType("initials",  new DataTypeChanger("line", "Voornaam").required(true).maxLength(10).finish(), 1, FieldType.UNCHANGEABLE)
 

Since:
MMBase-1.9.1
Version:
$Id: DataTypeChanger.java 35414 2009-05-25 10:03:53Z michiel $
Author:
Michiel Meeuwisen

Constructor Summary
DataTypeChanger(DataType<?> dt)
           
DataTypeChanger(Field field)
           
DataTypeChanger(String dt, String guiName)
           
 
Method Summary
 DataType<?> finish()
           
 DataTypeChanger guiName(String guiName)
           
 DataTypeChanger maxLength(long maxLength)
           
 DataTypeChanger required(boolean required)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeChanger

public DataTypeChanger(DataType<?> dt)

DataTypeChanger

public DataTypeChanger(String dt,
                       String guiName)

DataTypeChanger

public DataTypeChanger(Field field)
Method Detail

required

public DataTypeChanger required(boolean required)

maxLength

public DataTypeChanger maxLength(long maxLength)

guiName

public DataTypeChanger guiName(String guiName)

finish

public DataType<?> finish()


MMBase 2.0-SNAPSHOT - null