|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.content.ContentEntity
com.bea.content.Property
public class Property
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, or ID (link property -- link to a node) 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.
Link properties have some special restrictions. They can only be created in extended repositories. A node must exist at the specified ID when the link property is created or saved.
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 |
LINK
A Constant to define if the Property is a Link property type (holds an ID which refers to a Node). |
static int |
LONG
A Constant to define if the Property is a Long data type. |
static int |
NESTED
A Constant to define if the Property is a nested type. |
static String |
NESTED_DELIMITER
The delimiter used for nested property names. |
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 | |
---|---|
void |
addValue(Value value)
Add a value to the current list of values |
Object |
clone()
Clones a property and its values. |
String |
getIndexedName()
Returns the indexed name of the Property. |
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. |
boolean |
isDirty()
Returns true when the value(s) for this property have change since construction. |
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 |
toPrintString()
Returns the Property name and values as a String in the format name: value1, value2, value3, along with the property id. |
String |
toString()
Returns the Property name and values as a String in the format name: value1, value2, value3 |
boolean |
valuesEqual(Value[] otherValues)
Compares property's values against a value array. |
Methods inherited from class com.bea.content.ContentEntity |
---|
getId, setId |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNDEFINED
public static final int BOOLEAN
public static final int LONG
public static final int DOUBLE
public static final int STRING
public static final int CALENDAR
public static final int BINARY
public static final int NESTED
For example: Property myProperty = new Property("myNestedProp", myNestedValue); The parameter "myNestedProp" is the name of the nested Property, which nests the properties of the ObjectClass that it represents. The parameter myNestedValue is an array of Property objects. These Property objects contain the properties and values from the nested ObjectClass.
public static final int LINK
public static final String NESTED_DELIMITER
Constructor Detail |
---|
public Property(String name)
name
- - the unique name (relative to the Node) of
this Property.public Property(String name, Value value)
name
- - the unique name (relative to the Node) of
this Property.value
- - the value for this Property.public Property(String name, Value[] values)
name
- - the unique name (relative to the Node) of
this Property.values
- - the array of values for this Property.public Property(ID id, String name, int type, Value[] values)
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 |
---|
public String getName()
NESTED_DELIMITER
between each parent and child property name.
The delimiter is not valid for use within the actual name, only to seperate the parent/child names.
public void setName(String name)
NESTED_DELIMITER
between each parent and child property name.
The delimiter is not valid for use within the actual name, only to seperate the parent/child names.
public String getIndexedName()
public int getType()
public void setType(int type)
public Value getValue()
public Value[] getValues()
public void setValues(Value[] values)
public void setValue(Value value)
public void addValue(Value value)
value
- public boolean hasValue()
public boolean valuesEqual(Value[] otherValues)
public String toString()
toString
in class ContentEntity
public String toPrintString()
public boolean isDirty()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- If the clone fails.
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |