Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.rules.sdk.editor.datamodel
Class Property

`java.lang.Object
java.util.AbstractMap
java.util.HashMap
oracle.rules.sdk.editor.datamodel.ModelComponent
oracle.rules.sdk.editor.datamodel.Property`

All Implemented Interfaces:
  java.lang.Cloneable, java.util.Map, java.io.Serializable

public class Property
extends ModelComponent

Represent either a Java Bean Propety or a RL Class slot

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `PROP_ALLOW_CHAINING`
`static java.lang.String` | `PROP_DEFAULT_VALUE`
`static java.lang.String` | `PROP_READABLE`
`static java.lang.String` | `PROP_TYPE`
`static java.lang.String` | `PROP_WRITABLE`
`static java.lang.String` | `PROP_XMLNAME`

Fields inherited from class oracle.rules.sdk.editor.datamodel.ModelComponent
`m_dm, m_parent, PROP_ALIAS, PROP_ID, PROP_NAME, PROP_PROPERTIES, PROP_VISIBLE`

Method Summary
`java.lang.Object` | `get(java.lang.Object key)` Overwrite hashtable get method.
`boolean` | `getAllowChaining()` Allow expression chaining, e.g. a.b.foo().
`InitValue` | `getDefaultValue()` Get default of the property
`boolean` | `getIsReadable()` Whether it is a readable property.
`boolean` | `getIsWritable()` Whether it is a writable property.
`java.lang.String` | `getType()` Get alias of the type of the property
`java.lang.String[]` | `getTypeOptions()` Get property type options.
`int` | `getTypeSelected()` Get the index of the selected value for the property type options.
`java.lang.String` | `getXMLName()` Get the XML name of the Property.
`boolean` | `isTypePrimitive()` Whether the type of the property is primitive (i.e. int, char, double etc.)?
`java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)` Overwrite hashtable put method.
`void` | `setAllowChaining(boolean allowChaining)` Set to allow the proeprty to be chained to make up new expressions
`void` | `setType(java.lang.String typeAlias)` Set type of the property
`void` | `validate()` valid the model component

Methods inherited from class oracle.rules.sdk.editor.datamodel.ModelComponent
`getAlias, getDataModel, getID, getName, getParent, getProperties, getVisible, setAlias, setName, setVisible`

Methods inherited from class java.util.HashMap
`clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values`

Methods inherited from class java.util.AbstractMap
`equals, hashCode, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### PROP_WRITABLE

    public static final java.lang.String PROP_WRITABLE

  See Also:
    Constant Field Values

### PROP_READABLE

    public static final java.lang.String PROP_READABLE

  See Also:
    Constant Field Values

### PROP_TYPE

    public static final java.lang.String PROP_TYPE

  See Also:
    Constant Field Values

### PROP_DEFAULT_VALUE

    public static final java.lang.String PROP_DEFAULT_VALUE

  See Also:
    Constant Field Values

### PROP_XMLNAME

    public static final java.lang.String PROP_XMLNAME

  See Also:
    Constant Field Values

### PROP_ALLOW_CHAINING

    public static final java.lang.String PROP_ALLOW_CHAINING

  See Also:
    Constant Field Values

Method Detail

### getIsWritable

    public boolean getIsWritable()

  Whether it is a writable property. A writable property has a corresponding setter method.
  Returns:
    true to indicate the property is writable

### getIsReadable

    public boolean getIsReadable()

  Whether it is a readable property. A readable property has a corresponding getter method.
  Returns:
    true to indicate the property is readable

### getType

    public java.lang.String getType()

  Get alias of the type of the property
  Returns:
    the alias of the type of the property

### setType

    public void setType(java.lang.String typeAlias)

  Set type of the property
  Parameters:
    `typeAlias` - the alias of the type of the property

### getTypeOptions

    public java.lang.String[] getTypeOptions()

  Get property type options.
  Returns:
    the list of fact type alias includeing primitive, RL and Java Fact types, but excluding void

### getTypeSelected

    public int getTypeSelected()

  Get the index of the selected value for the property type options.
  Returns:
    the index of the selected value for the type choice list

### getDefaultValue

    public InitValue getDefaultValue()

  Get default of the property
  Returns:
    default value of the property

### getXMLName

    public java.lang.String getXMLName()

  Get the XML name of the Property. Applicable to the property which is generated from XML, i.e. A property in a JAXB class
  Returns:
    xml name of the property. Null if no xml name

### isTypePrimitive

    public boolean isTypePrimitive()

  Whether the type of the property is primitive (i.e. int, char, double etc.)?
  Returns:
    true if type is primitive; false if type is java or RL class

### getAllowChaining

    public boolean getAllowChaining()

  Allow expression chaining, e.g. a.b.foo(). It only applies to the Properties of complex type. In another word, if the type of the property is primitive, the method always return false.
  Returns:
    true to indicate the property can be chained to make up new expressions

### setAllowChaining

    public void setAllowChaining(boolean allowChaining)

  Set to allow the proeprty to be chained to make up new expressions
  Parameters:
    `allowChaining` - true indicates that the property can be chained to make up new expressions

### validate

    public void validate()
                  throws RulesSDKDMValidationException

  Description copied from class: `ModelComponent`
  valid the model component
  Overrides:
    `validate` in class `ModelComponent`
  Throws:
    `RulesSDKDMValidationException`

### get

    public java.lang.Object get(java.lang.Object key)

  Overwrite hashtable get method. For property "Type", "Type_Selected", Type_Options we don't return the hashtable entry directly. Instead, we compute them dynamically.
  Specified by:
    `get` in interface `java.util.Map`
  Overrides:
    `get` in class `ModelComponent`
  Parameters:
    `key` - a String containing the property name to be fetched.
  Returns:
    the value corresponding to the key

### put

    public java.lang.Object put(java.lang.Object key,
                                java.lang.Object value)

  Overwrite hashtable put method. For property "type" we don't put the value (alias) directly. We get id of the type from alias, then put it into the table.
  Parameters:
    `key` - a String containing the property name to be saved.
    `value` - a String corresponding to the key to be saved

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006, Oracle. All rights reserved.