Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content
Class Property

    java.lang.Object
      |
      +--com.bea.content.ContentEntity
            |
            +--com.bea.content.Property

All Implemented Interfaces:
  Serializable

public class Property
extends ContentEntity

Property is a name value pair, with the name being unique relative to the Node and the value is an Array of Value objects.

The Value object can represent either BinaryValue, Boolean, Calendar, Double, Long, String values.

If the property is multivalued it may contain 0..n Values. If it is not multivalued it may contain 0..1.

A Property is part of a Node and its shape is defined by a PropertyDefinition with the same name in it's Node's ObjectClass.

A property may represent both the content and meta-content for a Node.

See Also:
  Serialized Form

Field Summary
`static int` | `BINARY` A Constant to define if the Property is a Binary data type.
`static int` | `BOOLEAN` A Constant to define if the Property is a Boolean data type.
`static int` | `CALENDAR` A Constant to define if the Property is a Calendar data type.
`static int` | `DOUBLE` A Constant to define if the Property is a Double data type.
`static int` | `LONG` A Constant to define if the Property is a Long data type.
`static int` | `STRING` A Constant to define if the Property is a String data type.
`static int` | `UNDEFINED` If a Property's type is not set, it will be set to this by default.

Fields inherited from class com.bea.content.ContentEntity
`id`

Constructor Summary
`Property(ID id, String name, int type, Value[] values)` Constructor with all values.
`Property(String name)` Constructor with just the name.
`Property(String name, Value value)` Constructor for a single value without type.
`Property(String name, Value[] values)` Constructor for multiple values without type.

Method Summary
`String` | `getName()` Returns the name of the Property.
`int` | `getType()` Gets the type of the Property.
`Value` | `getValue()` Gets the first Value.
`Value[]` | `getValues()` Returns an Array of the Property's Values.
`boolean` | `hasValue()` Returns true if getValues() contains an instance of Value in the array.
`void` | `setName(String name)` Sets the name of the property that is unique to the Node.
`void` | `setType(int type)` Sets the type of the Property.
`void` | `setValue(Value value)` Sets a Value for the Property.
`void` | `setValues(Value[] values)` Sets the properties values.
`String` | `toString()` Returns the Property name and values as a String in the format name: value1, value2, value3

Methods inherited from class com.bea.content.ContentEntity
`getId, setId`

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

Field Detail

### UNDEFINED

    public static final int UNDEFINED

  If a Property's type is not set, it will be set to this by default.

  See Also:
    Constant Field Values

### BOOLEAN

    public static final int BOOLEAN

  A Constant to define if the Property is a Boolean data type.

  See Also:
    Constant Field Values

### LONG

    public static final int LONG

  A Constant to define if the Property is a Long data type.

  See Also:
    Constant Field Values

### DOUBLE

    public static final int DOUBLE

  A Constant to define if the Property is a Double data type.

  See Also:
    Constant Field Values

### STRING

    public static final int STRING

  A Constant to define if the Property is a String data type.

  See Also:
    Constant Field Values

### CALENDAR

    public static final int CALENDAR

  A Constant to define if the Property is a Calendar data type.

  See Also:
    Constant Field Values

### BINARY

    public static final int BINARY

  A Constant to define if the Property is a Binary data type.

  See Also:
    Constant Field Values

Constructor Detail

### Property

    public Property(String name)

  Constructor with just the name. This may be used when creating a property whose type is defined by the PropertyDefinition.

Parameters:
  `name` - - the unique name (relative to the Node) of this Property.

### Property

    public Property(String name,
                    Value value)

  Constructor for a single value without type. After using this constructor a call to getValue will return the value passed in. A call to getValues will return an array of size one with this value at [0]. This may be used when creating a property whose type is defined by the PropertyDefinition.

Parameters:
  `name` - - the unique name (relative to the Node) of this Property.
  `value` - - the value for this Property.

### Property

    public Property(String name,
                    Value[] values)

  Constructor for multiple values without type. This may be used when creating a property whose type is defined by the PropertyDefinition.

Parameters:
  `name` - - the unique name (relative to the Node) of this Property.
  `values` - - the array of values for this Property.

### Property

    public Property(ID id,
                    String name,
                    int type,
                    Value[] values)

  Constructor with all values.

Parameters:
  `id` - - the id for this Property.
  `name` - - the unique name (relative to the Node) of this Property.
  `type` - - the type of this Property.
  `values` - - the array of values for this Property.

Method Detail

### getName

    public String getName()

  Returns the name of the Property. This name is unique to the Node.

### setName

    public void setName(String name)

  Sets the name of the property that is unique to the Node.

### getType

    public int getType()

  Gets the type of the Property.

### setType

    public void setType(int type)

  Sets the type of the Property.

### getValue

    public Value getValue()

  Gets the first Value. Useful for single value Property.

### getValues

    public Value[] getValues()

  Returns an Array of the Property's Values.

### setValues

    public void setValues(Value[] values)

  Sets the properties values.

### setValue

    public void setValue(Value value)

  Sets a Value for the Property.

### hasValue

    public boolean hasValue()

  Returns true if getValues() contains an instance of Value in the array.

### toString

    public String toString()

  Returns the Property name and values as a String in the format name: value1, value2, value3

  Overrides:
    `toString` in class `ContentEntity`

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 BEA Systems, Inc. All Rights Reserved