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

## com.bea.content
Class PropertyChoice

    java.lang.Object
      com.bea.content.ContentEntity
          com.bea.content.PropertyChoice

All Implemented Interfaces:
  Serializable

public class PropertyChoice
extends ContentEntity

PropertyChoice defines a set of choices for a PropertyDefinition, and thus any Property instances based on it.

A choice can be a default, which means if the creator of a Property does not choose different values, it will be set as a Property value. By default, isDefault is false.

If the PropertyChoice value is defined as null, it allows for an empty choice. For example, a Property that has a String type could have 3 PropertyChoices - "blue", "red" and null.

See Also:
  Serialized Form

Field Summary

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

Constructor Summary
`PropertyChoice()` Empty value constructor for a null PropertyChoice.
`PropertyChoice(ID id, BinaryValue binaryValue)` BinaryValue constructor with id.
`PropertyChoice(ID id, BinaryValue binaryValue, Boolean booleanValue, Calendar calendarValue, Double doubleValue, boolean isDefault, Long longValue, String stringValue)` Constructor with all values.
`PropertyChoice(ID id, Boolean booleanValue)` Boolean constructor with id.
`PropertyChoice(ID id, Calendar calendarValue)` Calendar constructor.
`PropertyChoice(ID id, Double doubleValue)` Double constructor.
`PropertyChoice(ID id, Long longValue)` Long constructor.
`PropertyChoice(ID id, String stringValue)` String constructor.

Method Summary
`int` | `compareTo(Object obj)` Compares this PropertyChoices to obj.
`BinaryValue` | `getBinaryValue()` Gets the BinaryValue.
`Boolean` | `getBooleanValue()` The Boolean choice can be true, false, or null.
`Calendar` | `getCalendarValue()` The Calendar choice can be a Calendar instance, or null.
`Double` | `getDoubleValue()` The Double choice can be a Double instance, or null.
`Long` | `getLongValue()` The Long choice can be a Long instance, or null.
`String` | `getStringValue()` The String choice can be a String instance, or null.
`Object` | `getValue()` Gets the Value as an Object.
`Object` | `getValueByType(int type)` Return the correct value based on the type.
`boolean` | `isDefault()` Returns true if this PropertyChoice is a default.
`void` | `isDefault(boolean isDefault)` Sets if this PropertyChoice is a default.
`void` | `setBinaryValue(BinaryValue binaryValue)` Sets the BinaryValue.
`void` | `setBooleanValue(Boolean booleanValue)` Sets the Boolean value to true, false or null.
`void` | `setCalendarValue(Calendar calendarValue)` Sets the Calendar value.
`void` | `setDefault(boolean isDefault)` Sets if this PropertyChoice is a Default.
`void` | `setDoubleValue(Double doubleValue)` Sets the Double value.
`void` | `setLongValue(Long longValue)` Sets the Long value.
`void` | `setStringValue(String stringValue)` Sets the String value.
`String` | `toString()` Returns the PropertyChoice attributes as a String.

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`

Constructor Detail

### PropertyChoice

    public PropertyChoice()

  Empty value constructor for a null PropertyChoice.

### PropertyChoice

    public PropertyChoice(ID id,
                          BinaryValue binaryValue)

  BinaryValue constructor with id. IsDefault defaults to false.

### PropertyChoice

    public PropertyChoice(ID id,
                          BinaryValue binaryValue,
                          Boolean booleanValue,
                          Calendar calendarValue,
                          Double doubleValue,
                          boolean isDefault,
                          Long longValue,
                          String stringValue)

  Constructor with all values.

### PropertyChoice

    public PropertyChoice(ID id,
                          Boolean booleanValue)

  Boolean constructor with id. IsDefault defaults to false.

### PropertyChoice

    public PropertyChoice(ID id,
                          Calendar calendarValue)

  Calendar constructor. IsDefault defaults to false.

### PropertyChoice

    public PropertyChoice(ID id,
                          Double doubleValue)

  Double constructor. IsDefault defaults to false.

### PropertyChoice

    public PropertyChoice(ID id,
                          Long longValue)

  Long constructor. IsDefault defaults to false.

### PropertyChoice

    public PropertyChoice(ID id,
                          String stringValue)

  String constructor. IsDefault defaults to false.

Method Detail

### compareTo

    public int compareTo(Object obj)

  Compares this PropertyChoices to obj. This performs a native compare on all types, except Calendar is compared based on the time in milliseconds and BinaryValue is compared by name.

### getBinaryValue

    public BinaryValue getBinaryValue()

  Gets the BinaryValue.

### getBooleanValue

    public Boolean getBooleanValue()

  The Boolean choice can be true, false, or null.

### getCalendarValue

    public Calendar getCalendarValue()

  The Calendar choice can be a Calendar instance, or null.

### getDoubleValue

    public Double getDoubleValue()

  The Double choice can be a Double instance, or null.

### getLongValue

    public Long getLongValue()

  The Long choice can be a Long instance, or null.

### getStringValue

    public String getStringValue()

  The String choice can be a String instance, or null.

### getValue

    public Object getValue()

  Gets the Value as an Object.

### getValueByType

    public Object getValueByType(int type)

  Return the correct value based on the type. The user will then cast it to the appropriate object.

### isDefault

    public boolean isDefault()

  Returns true if this PropertyChoice is a default. There can only be one default per set of PropertyChoices for a PropertyDefinition.

### isDefault

    public void isDefault(boolean isDefault)

  Sets if this PropertyChoice is a default.

### setBinaryValue

    public void setBinaryValue(BinaryValue binaryValue)

  Sets the BinaryValue.

### setBooleanValue

    public void setBooleanValue(Boolean booleanValue)

  Sets the Boolean value to true, false or null.

### setCalendarValue

    public void setCalendarValue(Calendar calendarValue)

  Sets the Calendar value.

### setDefault

    public void setDefault(boolean isDefault)

  Sets if this PropertyChoice is a Default.

### setDoubleValue

    public void setDoubleValue(Double doubleValue)

  Sets the Double value.

### setLongValue

    public void setLongValue(Long longValue)

  Sets the Long value.

### setStringValue

    public void setStringValue(String stringValue)

  Sets the String value.

### toString

    public String toString()

  Returns the PropertyChoice attributes as a String.

  Overrides:
    `toString` in class `ContentEntity`

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

Copyright © 2005 BEA Systems, Inc. All Rights Reserved