org.ujoframework.extensions
Interface UjoMiddle<UJO_IMPL extends UjoMiddle>

All Superinterfaces:
Ujo
All Known Subinterfaces:
UjoExt<UJO_IMPL>
All Known Implementing Classes:
AbstractUjoExt, ArrayUjoExt, BeanUjoExt, DbProcedure, FieldUjoExt, MapImplUjoMiddle, MapUjoExt, QuickUjoMid, RegistrarUjoExt, UjoPropertyRow

public interface UjoMiddle<UJO_IMPL extends UjoMiddle>
extends Ujo

This is an middle extended Ujo interface designed for a more conventional property access evaluated by developers.
Sample of usage:

public class Person extends MapUjoExt {

  public static final UjoProperty<Person, String > NAME = newProperty("Name", String.class);
  public static final UjoProperty<Person, Double > CASH = newProperty("Cash", Double.class);
  public static final UjoProperty<Person, Person> CHILD = newProperty("Child", Person.class);
    
  public void init() {
    set(NAME, "George");
    String name = get(NAME);
    double cash = get(CHILD, CASH);
  }
}

Since:
UJO release 0.85
Author:
Pavel Ponec

Method Summary
<UJO extends UJO_IMPL,VALUE>
VALUE
get(UjoProperty<UJO,VALUE> property)
          Getter based on one UjoProperty
 java.lang.String getText(UjoProperty property)
          Returns a String value by a NULL context.
<UJO extends UJO_IMPL,VALUE>
Ujo
set(UjoProperty<UJO,VALUE> property, VALUE value)
          Setter based on UjoProperty.
 void setText(UjoProperty property, java.lang.String value)
          Set value from a String format by a NULL context.
 
Methods inherited from interface org.ujoframework.Ujo
readAuthorization, readProperties, readValue, writeValue
 

Method Detail

get

<UJO extends UJO_IMPL,VALUE> VALUE get(UjoProperty<UJO,VALUE> property)
Getter based on one UjoProperty


set

<UJO extends UJO_IMPL,VALUE> Ujo set(UjoProperty<UJO,VALUE> property,
                                     VALUE value)
Setter based on UjoProperty. Type of value is checked in the runtime.


getText

java.lang.String getText(UjoProperty property)
Returns a String value by a NULL context. otherwise method returns an instance of String.
The method can be an alias for a method readValueString(...)

Parameters:
property - A Property
Returns:
If property type is "container" then result is null.

setText

void setText(UjoProperty property,
             java.lang.String value)
Set value from a String format by a NULL context. Property can't be an "container" type (Ujo, List, Object[]).
The method can be an alias for a method writeValueString(...)

Parameters:
property - Property
value - String value


Copyright © 2010. All Rights Reserved.