org.ujoframework.implementation.factory
Class FactoryUjo

java.lang.Object
  extended by org.ujoframework.extensions.AbstractUjo
      extended by org.ujoframework.implementation.factory.FactoryUjo
All Implemented Interfaces:
UjoCloneable, UjoTextable, Ujo
Direct Known Subclasses:
FactoryUjoExt

public abstract class FactoryUjo
extends AbstractUjo

The Ujo Factory. A method called readValue() create new instance of the property always by a property type.
Each the property type class (see getType() method) must have got at least one of constructor:

Since:
ujo-tool
Author:
Pavel Ponec

Constructor Summary
FactoryUjo()
           
 
Method Summary
protected static
<UJO extends Ujo,VALUE>
FactoryProperty<UJO,VALUE>
newProperty(java.lang.String name, java.lang.Class<VALUE> type)
          Returns a new instance of property where the default value is null.
 java.lang.Object readValue(UjoProperty property)
          Method readValue() creates a new instance of the property always.
 void writeValue(UjoProperty property, java.lang.Object value)
          It is an unsupported function in this implementation.
 
Methods inherited from class org.ujoframework.extensions.AbstractUjo
clone, equals, init, init, readAuthorization, readProperties, readUjoManager, readValueString, toString, writeValueString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactoryUjo

public FactoryUjo()
Method Detail

writeValue

public void writeValue(UjoProperty property,
                       java.lang.Object value)
It is an unsupported function in this implementation.

Parameters:
property - Property must be a direct type only!
See Also:
UjoProperty.setValue(Ujo,Object), UjoProperty.isDirect()

readValue

public java.lang.Object readValue(UjoProperty property)
Method readValue() creates a new instance of the property always.

Parameters:
property - Property must be a direct type only!
Returns:
Property value
See Also:
FactoryProperty.getValue(Ujo)

newProperty

protected static <UJO extends Ujo,VALUE> FactoryProperty<UJO,VALUE> newProperty(java.lang.String name,
                                                                                java.lang.Class<VALUE> type)
Returns a new instance of property where the default value is null.



Copyright © 2010. All Rights Reserved.