Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.iview.domain
Interface UIObject

All Superinterfaces:
  EditableObject, Named, UIEditableObject

All Known Implementing Classes:
  UIDomain, UIObjectClass, UIRefinement

    public interface UIObject

extends Named, UIEditableObject

A construct that mirrors a domain object and adds UI things. A UIObject has a base object which is its corresponding object in the domain. The contents of this object may change - it is a clone of what is in the domain. The UIObject also has a reference that can be used to identify its corresponding object in the domain (e.g. for a refinement that should be its name). Once this is set, it should not be changed. It will be needed if the domain has to work out what the original is (in case of remove or update operations)

Method Summary
`void` | `addToDomain(Domain domain)` Adds the contents of this UIObject to the domain (part of publish).
`java.util.List` | `collectChanges()` Collects the object's changes since it was last saved to draft.
`java.util.List` | `collectChangesFromOriginal()` Collects the object's changes since it was last published.
`java.lang.Class` | `getBaseClass()` Gets the class of objects that can represent this one in the domain.
`IXObject` | `getBaseObject()` Gets the object that corresponds to this one in the domain.
`java.lang.Object` | `getBaseReference()` Gets the Id that can be used to identify the base object in the domain.
`Domain` | `getDomain()` Gets the base domain.
`IXObject` | `getOriginal()` Gets the object that corresponds to this one in the original domain.
`UIDomain` | `getUIDomain()` Gets the ui domain of which this object is part.
`boolean` | `hasChanged()` Determines whether the object has changed since it was last saved to draft
`boolean` | `hasChangedFromOriginal()` Determines whether the object has changed from its original.
`boolean` | `hasOriginal()` Determines whether the object has an original in the base domain.
`boolean` | `isEmpty()` Determines whether the object has any information in it.
`void` | `loadFromDomain()` Loads the contents of this object from its corresponding domain object.
`void` | `loadFromDomain(java.lang.Object domainObject)` Loads the contents of this object from the given object.
`void` | `loadFromOriginal()` Loads the contents of this object from its original domain object.
`IXObject` | `makeBaseObject()` Makes an empty object of the right class that can represent this UIObject in the domain.
`void` | `moveToUIDomain(UIDomain uiDomain)` Move the object from its current UIDomain to the given one.
`boolean` | `nameHasChanged(java.lang.Object nameThing)` Determines whether the object's identifying fields have changed
`void` | `noteChange()` Get the UIDomain to note the change of this object.
`java.lang.String` | `print()`
`void` | `removeFromDomain(Domain domain)` Removes the object's corresponding base object from the domain.
`boolean` | `sameValue(java.lang.String field, java.lang.Object value, java.lang.Object otherValue)` Determines whether the two given values of the given field differ
`void` | `saveToDomain()` Saves the contents of this object into its corresponding domain object.
`void` | `saveToDomain(java.lang.Object domainObject)` Saves the contents of this object into the given object.
`void` | `setBaseObject(IXObject object)` Sets the object that will represent this one in the domain.
`void` | `setBaseReference(java.lang.Object id)` Sets the Id that can be used to identify the base object in the domain.
`void` | `setName(java.lang.String name)`
`boolean` | `setValue(java.lang.String field, java.lang.Object value)` Sets the given field to the given value.
`void` | `updateInDomain(Domain domain)` Updates the base object in the domain with the contents of this object.

Methods inherited from interface ix.iview.domain.UIEditableObject
`isUndefined`

Methods inherited from interface ix.iface.ui.EditableObject
`addDataChangeListener, removeDataChangeListener`

Methods inherited from interface ix.icore.domain.Named
`getName`

Method Detail

### getDomain

    Domain getDomain()

  Gets the base domain.

### getUIDomain

    UIDomain getUIDomain()

  Gets the ui domain of which this object is part.

### hasOriginal

    boolean hasOriginal()

  Determines whether the object has an original in the base domain.

  Specified by:
    `hasOriginal` in interface `UIEditableObject`

### isEmpty

    boolean isEmpty()

  Determines whether the object has any information in it.

  Specified by:
    `isEmpty` in interface `UIEditableObject`

### hasChangedFromOriginal

    boolean hasChangedFromOriginal()

  Determines whether the object has changed from its original.

  Specified by:
    `hasChangedFromOriginal` in interface `UIEditableObject`

### hasChanged

    boolean hasChanged()

  Determines whether the object has changed since it was last saved to draft

  Specified by:
    `hasChanged` in interface `UIEditableObject`

### collectChanges

    java.util.List collectChanges()

  Collects the object's changes since it was last saved to draft.

  Returns:
    list of strings describing the changes, {} if none.

### collectChangesFromOriginal

    java.util.List collectChangesFromOriginal()

  Collects the object's changes since it was last published.

  Returns:
    list of strings describing the changes, {} if none.

### setValue

    boolean setValue(java.lang.String field,
                     java.lang.Object value)

  Sets the given field to the given value. Should default to UIUtil.setObjectFieldValue(Object object, String field, Class fieldClass, Object value).

  Specified by:
    `setValue` in interface `EditableObject`

### sameValue

    boolean sameValue(java.lang.String field,
                      java.lang.Object value,
                      java.lang.Object otherValue)

  Determines whether the two given values of the given field differ

  Specified by:
    `sameValue` in interface `EditableObject`

### nameHasChanged

    boolean nameHasChanged(java.lang.Object nameThing)

  Determines whether the object's identifying fields have changed

### getBaseReference

    java.lang.Object getBaseReference()

  Gets the Id that can be used to identify the base object in the domain.

### setBaseReference

    void setBaseReference(java.lang.Object id)

  Sets the Id that can be used to identify the base object in the domain.

### getOriginal

    IXObject getOriginal()

  Gets the object that corresponds to this one in the original domain.

### getBaseObject

    IXObject getBaseObject()

  Gets the object that corresponds to this one in the domain.

  Specified by:
    `getBaseObject` in interface `UIEditableObject`

### makeBaseObject

    IXObject makeBaseObject()

  Makes an empty object of the right class that can represent this UIObject in the domain.

### setBaseObject

    void setBaseObject(IXObject object)

  Sets the object that will represent this one in the domain.

### getBaseClass

    java.lang.Class getBaseClass()

  Gets the class of objects that can represent this one in the domain.

### saveToDomain

    void saveToDomain()

  Saves the contents of this object into its corresponding domain object. This can be done without worries about the original because if the UIObject has a base object, it is always a clone of the original.

### saveToDomain

    void saveToDomain(java.lang.Object domainObject)

  Saves the contents of this object into the given object.

### loadFromDomain

    void loadFromDomain()

  Loads the contents of this object from its corresponding domain object.

### loadFromDomain

    void loadFromDomain(java.lang.Object domainObject)

  Loads the contents of this object from the given object. The given object should be of the right class (same as the result of getBaseClass()).

### loadFromOriginal

    void loadFromOriginal()

  Loads the contents of this object from its original domain object.

### noteChange

    void noteChange()

  Get the UIDomain to note the change of this object.

### addToDomain

    void addToDomain(Domain domain)

  Adds the contents of this UIObject to the domain (part of publish).

### updateInDomain

    void updateInDomain(Domain domain)

  Updates the base object in the domain with the contents of this object.

### removeFromDomain

    void removeFromDomain(Domain domain)

  Removes the object's corresponding base object from the domain.

### moveToUIDomain

    void moveToUIDomain(UIDomain uiDomain)

  Move the object from its current UIDomain to the given one.

### setName

    void setName(java.lang.String name)

### print

    java.lang.String print()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD