GriffonModelClass (Griffon 0.9.5-rc2)
Date: 2012-03-09

Overview | Package | Class | Deprecated | Index | Help
| Griffon 0.9.5-rc2
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## griffon.core
[Java] Interface GriffonModelClass

    griffon.core.ApplicationHandler
      griffon.core.GriffonClass
          griffon.core.GriffonModelClass

All Superinterfaces:
  ApplicationHandler, GriffonClass

    public interface GriffonModelClass
    extends GriffonClass

Represents a Model class in Griffon.

Authors:
  Andres Almiray

Since:
  0.9.1

Field Summary
`String` | `TRAILING` "Model"
`String` | `TYPE` "model"

Fields inherited from interface GriffonClass
STANDARD_PROPERTIES

Method Summary
`String[]` | `getEventNames()` Matches all public methods and closure properties whose name matches the event handler convention, i.e, starts with "on" and is followed by at least one uppercase character.
`Object` | `getModelPropertyValue(GriffonModel model, String propertyName)` Returns the value of a model property.
`String[]` | `getPropertyNames()` Matches all public properties that are not event handlers nor have a Closure as their value.
`void` | `setModelPropertyValue(GriffonModel model, String propertyName, Object value)` Sets a value of a model property.

Methods inherited from interface GriffonClass
getArtifactType, getClazz, getFullName, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyName, getPropertyValue, getPropertyValue, getReferenceInstance, getShortName, hasProperty, newInstance

Methods inherited from interface ApplicationHandler
getApp

Field Detail

### TRAILING

    public String TRAILING

  "Model"

### TYPE

    public String TYPE

  "model"

Method Detail

### getEventNames

    public String[] getEventNames()

  Matches all public methods and closure properties whose name matches the event handler convention, i.e, starts with "on" and is followed by at least one uppercase character.

  Returns:
    an array containing the names of all event handlers.

### getModelPropertyValue

    public Object getModelPropertyValue(GriffonModel model, String propertyName)

  Returns the value of a model property.
  Parameters:
    `model` - the model to query
    `propertyName` - the name of the property to query
  Returns:
    the value of the property

### getPropertyNames

    public String[] getPropertyNames()

  Matches all public properties that are not event handlers nor have a Closure as their value.

  Returns:
    an array containing the names of all model properties.

### setModelPropertyValue

    public void setModelPropertyValue(GriffonModel model, String propertyName, Object value)

  Sets a value of a model property.
  Parameters:
    `model` - the model to be affected
    `propertyName` - the name of the property to update
    `value` - new value

Groovy Documentation