ZenMagick 0.9.6


org.zenmagick.model.catalog.ZMAttribute

Class ZMAttribute

ZMObject
|
+--ZMAttribute

public class ZMAttribute
extends ZMObject

A single attribute.

Author:
DerManoMann
Version:
$Id: ZMAttribute.php 2054 2009-03-12 03:41:22Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMAttribute(int id, string name, string type)

Create new attribute.

Method Summary
void

addValue(ZMAttributeValue value)

Add an attribute value.

void

clearValues()

Clear all values.

string

getComment()

Get the attribute comment.

int

getId()

Get the attribute id.

string

getName()

Get the attribute name.

int

getProductId()

Get the product id.

int

getSortOrder()

Get the attribute sort order.

string

getType()

Get the attribute type.

array

getValues()

Get the attribute values.

void

removeValue(mixed value)

Remove an attribute value.

void

setComment(string comment)

Set the attribute comment.

void

setId(int id)

Set the attribute id.

void

setName(string name)

Set the attribute name.

void

setProductId(int productId)

Set the product id.

void

setSortOrder(int sortOrder)

Set the attribute sort order.

string

setType(mixed type)

Set the attribute type.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMAttribute

public ZMAttribute(int id, string name, string type)

Create new attribute.

Parameters:
id - The id.
name - The name.
type - The type.

Method Detail

addValue

public void addValue(ZMAttributeValue value)

Add an attribute value.

Parameters:
value - A ZMAttributeValue.

clearValues

public void clearValues()

Clear all values. /


getComment

public string getComment()

Get the attribute comment.

Returns:
The attribute comment.

getId

public int getId()

Get the attribute id.

Returns:
The attribute id.

getName

public string getName()

Get the attribute name.

Returns:
The attribute name.

getProductId

public int getProductId()

Get the product id.

Returns:
The product id.

getSortOrder

public int getSortOrder()

Get the attribute sort order.

Returns:
The attribute sort order.

getType

public string getType()

Get the attribute type.

Returns:
The attribute type.

getValues

public array getValues()

Get the attribute values.

Returns:
A list of ZMAttributeValue objects.

removeValue

public void removeValue(mixed value)

Remove an attribute value.

Parameters:
value - Either a ZMAttributeValue instance or a value id.

setComment

public void setComment(string comment)

Set the attribute comment.

Parameters:
comment - The attribute comment.

setId

public void setId(int id)

Set the attribute id.

Parameters:
id - The attribute id.

setName

public void setName(string name)

Set the attribute name.

Parameters:
name - The attribute name.

setProductId

public void setProductId(int productId)

Set the product id.

Parameters:
productId - The product id.

setSortOrder

public void setSortOrder(int sortOrder)

Set the attribute sort order.

Parameters:
sortOrder - The attribute sort order.

setType

public string setType(mixed type)

Set the attribute type.

Returns:
The attribute type.

ZenMagick 0.9.6