Package com.tridion.meta
Class NameValuePair
java.lang.Object
com.tridion.meta.NameValuePair
- All Implemented Interfaces:
Serializable
This class represents a name-value pair. It has 3 properties, namely the name,
type and value.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe type for values of type Date.static final intThe type for values of type Float.static final intThe type for values of type String. -
Constructor Summary
ConstructorsConstructorDescriptionNameValuePair(String name, int type, Object value) Deprecated.Use NameValuePair(String, MetadataType, Object) instead.NameValuePair(String name, int type, List<Object> multipleValues) Deprecated.Use NameValuePair(String, MetadataType, ListNameValuePair(String name, MetadataType type, Object value) NameValuePair(String name, MetadataType type, List<Object> multipleValues) Constructing NameValuePair for multiple values. -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the value part of thisNameValuePairinstance.This type is the type the underlying storage layer uses to store the name.Returns multiple values of thisNameValuePairinstance.getName()Returns the name part of thisNameValuePairinstance.intgetType()Deprecated.getValue()Deprecated.This method is only for backwards compatibility reasons and should not be used anymore.
-
Field Details
-
TYPE_STRING
public static final int TYPE_STRINGThe type for values of type String. -
TYPE_DATE
public static final int TYPE_DATEThe type for values of type Date. -
TYPE_FLOAT
public static final int TYPE_FLOATThe type for values of type Float.
-
-
Constructor Details
-
NameValuePair
Deprecated.Use NameValuePair(String, MetadataType, Object) instead. -
NameValuePair
Deprecated.Use NameValuePair(String, MetadataType, List -
NameValuePair
-
NameValuePair
Constructing NameValuePair for multiple values.- Parameters:
name- Nametype- Type of the valuemultipleValues- values
-
-
Method Details
-
getName
Returns the name part of thisNameValuePairinstance.- Returns:
- A String indicating the name of this NameValuePair instance.
-
getMetadataType
This type is the type the underlying storage layer uses to store the name. By default this is a String.- Returns:
- A constant indicating the type in which the value is stored.
-
getType
Deprecated.This type is the type the underlying storage layer uses to store the name. By default this is a String.- Returns:
- A constant indicating the type in which the value is stored.
-
getValue
Deprecated.This method is only for backwards compatibility reasons and should not be used anymore. New method to be used isgetFirstValue().Returns the value part of thisNameValuePairinstance. This can be ajava.lang.String, ajava.util.Date, or ajava.lang.Floatinstance. -
getFirstValue
Returns the value part of thisNameValuePairinstance. This can be ajava.lang.String, ajava.util.Date, or ajava.lang.Floatinstance. -
getMultipleValues
Returns multiple values of thisNameValuePairinstance. This can be a list ofjava.lang.String, ajava.util.Date, or ajava.lang.Floatinstances. -
addValue
-