com.konakartadmin.app
Class AdminProdAttrDesc

java.lang.Object
  extended by com.konakartadmin.app.AdminProdAttrDesc
All Implemented Interfaces:
AdminObjectIf

public class AdminProdAttrDesc
extends java.lang.Object
implements AdminObjectIf

A Product Attribute Descriptor is used to store metadata for a custom product attribute


Field Summary
static int BOOLEAN_TYPE
          The string in the Value attribute is a boolean (should contain the string true or false)
private  java.lang.String custom1
          Custom fields
private  java.lang.String custom2
           
private  java.lang.String custom3
           
static int DATE_TYPE
          The string in the Value attribute is a Date.
private  java.util.Date dateAdded
          dateAdded
static int DECIMAL_TYPE
          The string in the Value attribute is a Decimal
private  int facetNumber
          Facet number
private  int id
          id
static int INT_TYPE
          The string in the Value attribute is an int
private  java.lang.String msgCatKey
          The key used for the message catalog to look up the name to display in the store front
private  java.lang.String name
          The attribute name
private  java.lang.String setFunction
          Metadata used to display the type of entry field (i.e.
static int STRING_TYPE
          The string in the Value attribute is a String
private  java.lang.String template
          A template that can be used to format the stored data.
private  int type
          The type of attribute.
private  java.lang.String validation
          A regular expression validation string used when a new value is inserted.
private  java.lang.String value
          The value of the attribute
 
Constructor Summary
AdminProdAttrDesc()
          Constructor
AdminProdAttrDesc(com.workingdogs.village.Record vr, com.konakart.bl.KKCriteria c)
          Instantiates the attributes of the ProdAttrDesc object from a Record object
 
Method Summary
 java.lang.String getCustom1()
           
 java.lang.String getCustom2()
           
 java.lang.String getCustom3()
           
 java.util.Date getDateAdded()
           
 int getFacetNumber()
          Defines the facet field the attribute is mapped to in SOLR
 int getId()
           
 java.lang.String getMsgCatKey()
           
 java.lang.String getName()
           
 java.lang.String getSetFunction()
           
 java.lang.String getTemplate()
           
 int getType()
           
 java.lang.String getValidation()
           
 java.lang.String getValue()
           
 java.math.BigDecimal kkGetValueAsBigDecimal()
          Utility method to return a BigDecimal.
 boolean kkGetValueAsBoolean()
          Utility method to return a boolean.
 java.util.Date kkGetValueAsDate()
          Utility method to return a Date.
 int kkGetValueAsInt()
          Utility method to return an int.
 java.lang.String kkGetValueAsString()
          Utility method to return a String.
 void kkSetValueAsBigDecimal(java.math.BigDecimal _value)
          Utility method to set the tag value as a BigDecimal.
 void kkSetValueAsBoolean(boolean _value)
          Utility method to set the tag value as a boolean.
 void kkSetValueAsDate(java.util.Date _value)
          Utility method to set the tag value as a Date.
 void kkSetValueAsInt(int _value)
          Utility method to set the tag value as an int.
 void kkSetValueAsString(java.lang.String _value)
          Utility method to set the tag value as a String.
 void setCustom1(java.lang.String custom1)
           
 void setCustom2(java.lang.String custom2)
           
 void setCustom3(java.lang.String custom3)
           
 void setDateAdded(java.util.Date dateAdded)
           
 void setFacetNumber(int facetNumber)
          Defines the facet field the attribute is mapped to in SOLR
 void setId(int id)
           
 void setMsgCatKey(java.lang.String msgCatKey)
           
 void setName(java.lang.String name)
           
 void setSetFunction(java.lang.String setFunction)
           
 void setTemplate(java.lang.String template)
           
 void setType(int type)
           
 void setValidation(java.lang.String validation)
           
 void setValue(java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING_TYPE

public static final int STRING_TYPE
The string in the Value attribute is a String

See Also:
Constant Field Values

INT_TYPE

public static final int INT_TYPE
The string in the Value attribute is an int

See Also:
Constant Field Values

DECIMAL_TYPE

public static final int DECIMAL_TYPE
The string in the Value attribute is a Decimal

See Also:
Constant Field Values

DATE_TYPE

public static final int DATE_TYPE
The string in the Value attribute is a Date.

See Also:
Constant Field Values

BOOLEAN_TYPE

public static final int BOOLEAN_TYPE
The string in the Value attribute is a boolean (should contain the string true or false)

See Also:
Constant Field Values

id

private int id
id


name

private java.lang.String name
The attribute name


msgCatKey

private java.lang.String msgCatKey
The key used for the message catalog to look up the name to display in the store front


template

private java.lang.String template
A template that can be used to format the stored data. i.e. To format a date


value

private java.lang.String value
The value of the attribute


validation

private java.lang.String validation
A regular expression validation string used when a new value is inserted.


setFunction

private java.lang.String setFunction
Metadata used to display the type of entry field (i.e. drop list, text field) as well as simple length validation.


type

private int type
The type of attribute. Valid values are:
  • STRING_TYPE: The tag value is a String
  • INT_TYPE: The tag value is an integer
  • DECIMAL_TYPE: The tag value is a decimal.
  • DATE_TYPE: The tag value is a date.
  • BOOLEAN_TYPE: The tag value is a boolean and so must contain the string true or false


dateAdded

private java.util.Date dateAdded
dateAdded


facetNumber

private int facetNumber
Facet number


custom1

private java.lang.String custom1
Custom fields


custom2

private java.lang.String custom2

custom3

private java.lang.String custom3
Constructor Detail

AdminProdAttrDesc

public AdminProdAttrDesc()
Constructor


AdminProdAttrDesc

public AdminProdAttrDesc(com.workingdogs.village.Record vr,
                         com.konakart.bl.KKCriteria c)
                  throws com.workingdogs.village.DataSetException
Instantiates the attributes of the ProdAttrDesc object from a Record object

Parameters:
vr - Record containing data
c - Criteria containing column names
Throws:
com.workingdogs.village.DataSetException
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in interface AdminObjectIf
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the ProdAttrDesc object.

kkGetValueAsInt

public int kkGetValueAsInt()
                    throws KKAdminException
Utility method to return an int. An exception is thrown if the value is null or can't be parsed as an int.

Returns:
Returns an int
Throws:
KKAdminException

kkGetValueAsDate

public java.util.Date kkGetValueAsDate()
                                throws KKAdminException,
                                       java.text.ParseException
Utility method to return a Date. Null is returned if the value is null. An exception is thrown if the value isn't null but can't be parsed as a Date.

Returns:
Returns a date
Throws:
KKAdminException
java.text.ParseException

kkGetValueAsString

public java.lang.String kkGetValueAsString()
Utility method to return a String. The value is returned directly with no processing.

Returns:
Returns a String

kkGetValueAsBigDecimal

public java.math.BigDecimal kkGetValueAsBigDecimal()
Utility method to return a BigDecimal. Null is returned if the value is null. An exception is thrown if the value isn't null but can't be parsed as a BigDecimal.

Returns:
Returns a BigDecimal

kkGetValueAsBoolean

public boolean kkGetValueAsBoolean()
                            throws KKAdminException
Utility method to return a boolean. An exception is thrown if the value is null or isn't set to "true" or "false".

Returns:
Returns a boolean
Throws:
KKAdminException

kkSetValueAsInt

public void kkSetValueAsInt(int _value)
Utility method to set the tag value as an int.

Parameters:
_value -

kkSetValueAsDate

public void kkSetValueAsDate(java.util.Date _value)
Utility method to set the tag value as a Date.

Parameters:
_value -

kkSetValueAsBoolean

public void kkSetValueAsBoolean(boolean _value)
Utility method to set the tag value as a boolean.

Parameters:
_value -

kkSetValueAsString

public void kkSetValueAsString(java.lang.String _value)
Utility method to set the tag value as a String.

Parameters:
_value -

kkSetValueAsBigDecimal

public void kkSetValueAsBigDecimal(java.math.BigDecimal _value)
Utility method to set the tag value as a BigDecimal.

Parameters:
_value -

getId

public int getId()
Specified by:
getId in interface AdminObjectIf
Returns:
the id

setId

public void setId(int id)
Specified by:
setId in interface AdminObjectIf
Parameters:
id - the id to set

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getValidation

public java.lang.String getValidation()
Returns:
the validation

setValidation

public void setValidation(java.lang.String validation)
Parameters:
validation - the validation to set

getType

public int getType()
Returns:
the type

setType

public void setType(int type)
Parameters:
type - the type to set

getCustom1

public java.lang.String getCustom1()
Returns:
the custom1

setCustom1

public void setCustom1(java.lang.String custom1)
Parameters:
custom1 - the custom1 to set

getCustom2

public java.lang.String getCustom2()
Returns:
the custom2

setCustom2

public void setCustom2(java.lang.String custom2)
Parameters:
custom2 - the custom2 to set

getCustom3

public java.lang.String getCustom3()
Returns:
the custom3

setCustom3

public void setCustom3(java.lang.String custom3)
Parameters:
custom3 - the custom3 to set

getDateAdded

public java.util.Date getDateAdded()
Returns:
the dateAdded

setDateAdded

public void setDateAdded(java.util.Date dateAdded)
Parameters:
dateAdded - the dateAdded to set

getValue

public java.lang.String getValue()
Returns:
the value

setValue

public void setValue(java.lang.String value)
Parameters:
value - the value to set

getMsgCatKey

public java.lang.String getMsgCatKey()
Returns:
the msgCatKey

setMsgCatKey

public void setMsgCatKey(java.lang.String msgCatKey)
Parameters:
msgCatKey - the msgCatKey to set

getTemplate

public java.lang.String getTemplate()
Returns:
the template

setTemplate

public void setTemplate(java.lang.String template)
Parameters:
template - the template to set

getSetFunction

public java.lang.String getSetFunction()
Returns:
the setFunction

setSetFunction

public void setSetFunction(java.lang.String setFunction)
Parameters:
setFunction - the setFunction to set

getFacetNumber

public int getFacetNumber()
Defines the facet field the attribute is mapped to in SOLR

Returns:
the facetNumber

setFacetNumber

public void setFacetNumber(int facetNumber)
Defines the facet field the attribute is mapped to in SOLR

Parameters:
facetNumber - the facetNumber to set


Copyright © 2011 DS Data Systems UK Ltd.