# com.bea.content
Property Class

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.

Hierarchy
  `Object`
  `ContentEntity`
  `Property`

All Implemented Interfaces
  `Serializable`

## Field Summary

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

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

## Constructor Summary

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

## Method Summary

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

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

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

## Field Detail

### BINARY

    public static final int BINARY

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

### BOOLEAN

    public static final int BOOLEAN

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

### CALENDAR

    public static final int CALENDAR

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

### DOUBLE

    public static final int DOUBLE

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

### LONG

    public static final int LONG

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

### STRING

    public static final int STRING

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

### UNDEFINED

    public static final int UNDEFINED

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

## Constructor Detail

### Property

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

  Constructor with all values.

### 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.

### 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.

### 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.

## Method Detail

### addValue(Value) Method

    public void addValue(Value value)

Add a value to the current list of values

### getName() Method

    public String getName()

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

### getType() Method

    public int getType()

Gets the type of the Property.

### getValue() Method

    public Value getValue()

Gets the first Value. Useful for single value Property.

### getValues() Method

    public Value[] getValues()

Returns an Array of the Property's Values.

### hasValue() Method

    public boolean hasValue()

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

### setName(String) Method

    public void setName(String name)

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

### setType(int) Method

    public void setType(int type)

Sets the type of the Property.

### setValue(Value) Method

    public void setValue(Value value)

Sets a Value for the Property.

### setValues(Value[]) Method

    public void setValues(Value[] values)

Sets the properties values.

### toPrintString() Method

    public String toPrintString()

Returns the Property name and values as a String in the format name: value1, value2, value3, along with the property id.

### toString() Method

    public String toString()

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

Overrides
  `ContentEntity.toString()`

### valuesEqual(Value[]) Method

    public boolean valuesEqual(Value[] otherValues)