NAME
Object::Meta - Library to manage raw data and meta data as one object but keeping it separate
DESCRIPTION
Object::Meta implements a class to manage raw data and additional meta data as an object
Of special importance is the Index Field which is use to create an automatical index in the Object::Meta::List.
It does not require lengthly creation of definition modules.
METHODS
Constructor
new ( [ DATA ] )
This is the constructor for a new Object::Meta object.
Parameters:
DATA-
The raw data which is passed in a hash like fashion, using key and value pairs.
Administration Methods
set ( DATA )
This method will populate the raw Data Fields with values.
Parameters:
DATA-
A list which is passed in a hash like fashion, using key and value pairs.
setMeta ( DATA )
This method will assign values to Meta Data Fields.
Parameters:
DATA-
A list which is passed in a hash like fashion, using key and value pairs.
setIndexField ( INDEX_FIELD )
This method configure the Index Field for this object.
Parameters:
INDEX_FIELD-
The name of the Field which contains the Value by which the object will be indexed.
setIndexValue ( INDEX_VALUE )
This Method assigns the value for the Index Field for this object.
Parameters:
INDEX_VALUE-
The scalar value of the Field by which the object will be indexed.
Clear ()
This method removes all raw data and meta data.
Only the index field configuration is still kept.
Consultation Methods
get ( FIELD_NAME [, DEFAULT_VALUE [. IS_META ] ] )
This Method retrieves the value of the field with name FIELD_NAME for this object. It can be a Physical Field or a Meta Field.
Parameters:
FIELD_NAME-
The name of the Field which value it must return.
DEFAULT_VALUE-
The default value to return if the Field does not exist. (Otherwise it would return
undef) IS_META-
whether the
FIELD_NAMEis a Meta Field.
getMeta ( FIELD_NAME [, DEFAULT_VALUE ] )
This Method retrieves the value of the Meta Field with name FIELD_NAME for this object.
Parameters:
FIELD_NAME-
The name of the Field which value it must return.
DEFAULT_VALUE-
The default value to return if the Field does not exist. (Otherwise it would return
undef)
getIndexField ()
This method retrieves the Name of the Index Field with the object will be indexed.
The name of the Index Field is a Meta Field which is stored separately.
Returns: The Name of the Index Field or an empty String if the Field is not set.
getIndexValue ()
This method retrieves the Value of the Index Field by which the object will be indexed.