org.ztemplates.property
Class ZProperty<T>

java.lang.Object
  extended by org.ztemplates.property.ZProperty<T>
Direct Known Subclasses:
ZBigDecimalProperty, ZBooleanProperty, ZDateProperty, ZDoubleProperty, ZExceptionProperty, ZIntProperty, ZJsonProperty, ZListProperty, ZLongProperty, ZObjectProperty, ZOperation, ZSelectProperty, ZStringProperty

public abstract class ZProperty<T>
extends Object


Field Summary
static org.apache.log4j.Logger log
           
 
Constructor Summary
ZProperty()
           
 
Method Summary
 void clear()
           
abstract  String format(T obj)
           
 String getName()
          internal String identifier
 String getStringValue()
           
 String[] getStringValues()
           
 List<ZIValidator> getValidators()
           
 T getValue()
          parses only not null objects
 List<T> getValues()
          using List here because generic arrays cannot be created without passing parameters.
 boolean isEmpty()
           
 boolean isReadable()
           
 boolean isRequired()
           
 boolean isWriteable()
           
abstract  T parse(String stringValue)
           
 void setName(String name)
          internal String identifier
 void setReadable(boolean readable)
           
 void setRequired(boolean required)
           
 void setStringValue(String s)
           
 void setStringValues(String[] newStringValues)
           
 void setValue(T val)
          formats only not null objects
 void setWriteable(boolean writeable)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Logger log
Constructor Detail

ZProperty

public ZProperty()
Method Detail

format

public abstract String format(T obj)

parse

public abstract T parse(String stringValue)
                 throws Exception
Throws:
Exception

getValue

public final T getValue()
                 throws Exception
parses only not null objects

Returns:
true if the value has changed
Throws:
Exception

getValues

public final List<T> getValues()
                        throws Exception
using List here because generic arrays cannot be created without passing parameters.

Returns:
Throws:
Exception

setValue

public void setValue(T val)
formats only not null objects


isEmpty

public boolean isEmpty()

clear

public void clear()

isWriteable

public boolean isWriteable()

setWriteable

public void setWriteable(boolean writeable)

toString

public String toString()
Overrides:
toString in class Object

getStringValue

public String getStringValue()

getStringValues

public String[] getStringValues()

isReadable

public boolean isReadable()

setReadable

public void setReadable(boolean readable)

isRequired

public boolean isRequired()

setRequired

public void setRequired(boolean required)

setStringValues

public void setStringValues(String[] newStringValues)
Parameters:
newStringValue -

setStringValue

public void setStringValue(String s)

getName

public String getName()
internal String identifier

Returns:

setName

public void setName(String name)
internal String identifier


getValidators

public List<ZIValidator> getValidators()


Copyright © 2011. All Rights Reserved.