com.konakartadmin.app
Class AdminCustomerTag

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

public class AdminCustomerTag
extends java.lang.Object
implements AdminObjectIf

A customer tag is used to save customer related information used mainly for marketing purposes.


Field Summary
static int AGE_TYPE
          The string in the Value attribute is a Date.
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
           
private  java.lang.String custom4
           
private  java.lang.String custom5
           
private  int customerId
          customerId - Set to identify the customer when the value is set.
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
static java.lang.String DELIM
          Used as the delimiter when storing multiple integers
private  java.lang.String description
          Description used in expression builder.
private  int id
          id
static int INT_TYPE
          The string in the Value attribute is an int
private  int maxInts
          When the tag value is of type MULTI_INT_TYPE, this attribute specifies the maximum number of integers allowed.
static int MULTI_INT_TYPE
          The string in the Value attribute consists of multiple integers separated by a delimiter.
private  java.lang.String name
          The tag name, normally in caps.
static int STRING_TYPE
          The string in the Value attribute is a String
private  int type
          The type of tag.
private  java.lang.String validation
          A regular expression validation string used when a new tag is inserted.
private  java.lang.String value
          The value of the tag for a customer.
 
Constructor Summary
AdminCustomerTag()
          Constructor
AdminCustomerTag(com.workingdogs.village.Record vr, com.konakart.bl.KKCriteria c)
          Instantiates the attributes of the CustomerTag object from a Record object
 
Method Summary
 java.lang.String getCustom1()
           
 java.lang.String getCustom2()
           
 java.lang.String getCustom3()
           
 java.lang.String getCustom4()
           
 java.lang.String getCustom5()
           
 int getCustomerId()
           
 java.util.Date getDateAdded()
           
 java.lang.String getDescription()
           
 int getId()
           
 int getMaxInts()
           
 java.lang.String getName()
           
 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.
 int[] kkGetValueAsIntArray()
          Utility method to return an array of integers.
 java.lang.String kkGetValueAsString()
          Utility method to return a String.
 void kkSetValueAsBigDecimal(java.math.BigDecimal val)
          Utility method to set the tag value as a BigDecimal.
 void kkSetValueAsBoolean(boolean val)
          Utility method to set the tag value as a boolean.
 void kkSetValueAsDate(java.util.Date val)
          Utility method to set the tag value as a Date.
 void kkSetValueAsInt(int val)
          Utility method to set the tag value as an int.
 void kkSetValueAsIntArray(int[] val)
          Utility method to set the tag value as an array of ints.
 void kkSetValueAsString(java.lang.String val)
          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 setCustom4(java.lang.String custom4)
           
 void setCustom5(java.lang.String custom5)
           
 void setCustomerId(int customerId)
           
 void setDateAdded(java.util.Date dateAdded)
           
 void setDescription(java.lang.String description)
           
 void setId(int id)
           
 void setMaxInts(int maxInts)
           
 void setName(java.lang.String name)
           
 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

DELIM

public static final java.lang.String DELIM
Used as the delimiter when storing multiple integers

See Also:
Constant Field Values

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

MULTI_INT_TYPE

public static final int MULTI_INT_TYPE
The string in the Value attribute consists of multiple integers separated by a delimiter. The maxInts attributes determines how many integers are allowed.

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

AGE_TYPE

public static final int AGE_TYPE
The string in the Value attribute is a Date. When creating expressions you can define the value to be greater or less than a length of time (in seconds) rather than comparing it to a specific date.

See Also:
Constant Field Values

id

private int id
id


customerId

private int customerId
customerId - Set to identify the customer when the value is set. Negative if the value hasn't been set for a customer.


name

private java.lang.String name
The tag name, normally in caps. i.e. AGE, PRODUCTS_VIEWED, SEARCH_STRING.


description

private java.lang.String description
Description used in expression builder. i.e. Age of customer, Product recently viewed etc.


value

private java.lang.String value
The value of the tag for a customer.


validation

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


type

private int type
The type of tag. Valid values are:
  • STRING_TYPE: The tag value is a String
  • INT_TYPE: The tag value is an integer
  • MULTI_INT_TYPE: The tag value contains one or more integers separated by a delimiter. The maxInts attributes determines how many integers are allowed.
  • 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
  • AGE_TYPE: The tag value is a date. When creating expressions you can define the value to be greater or less than a length of time (in seconds) rather than comparing it to a specific date.


maxInts

private int maxInts
When the tag value is of type MULTI_INT_TYPE, this attribute specifies the maximum number of integers allowed.


dateAdded

private java.util.Date dateAdded
dateAdded


custom1

private java.lang.String custom1
Custom fields


custom2

private java.lang.String custom2

custom3

private java.lang.String custom3

custom4

private java.lang.String custom4

custom5

private java.lang.String custom5
Constructor Detail

AdminCustomerTag

public AdminCustomerTag()
Constructor


AdminCustomerTag

public AdminCustomerTag(com.workingdogs.village.Record vr,
                        com.konakart.bl.KKCriteria c)
                 throws com.workingdogs.village.DataSetException
Instantiates the attributes of the CustomerTag 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 CustomerTag 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

kkGetValueAsIntArray

public int[] kkGetValueAsIntArray()
Utility method to return an array of integers. An array of integers is stored in a String format with each integer separated by a delimiter. This method parses the String and returns an array of integers.

Returns:
Returns an array of integers.

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 val)
Utility method to set the tag value as an int.

Parameters:
val -

kkSetValueAsIntArray

public void kkSetValueAsIntArray(int[] val)
Utility method to set the tag value as an array of ints.

Parameters:
val -

kkSetValueAsDate

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

Parameters:
val -

kkSetValueAsBoolean

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

Parameters:
val -

kkSetValueAsString

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

Parameters:
val -

kkSetValueAsBigDecimal

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

Parameters:
val -

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

getDescription

public java.lang.String getDescription()
Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description 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

getMaxInts

public int getMaxInts()
Returns:
the maxInts

setMaxInts

public void setMaxInts(int maxInts)
Parameters:
maxInts - the maxInts 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

getCustom4

public java.lang.String getCustom4()
Returns:
the custom4

setCustom4

public void setCustom4(java.lang.String custom4)
Parameters:
custom4 - the custom4 to set

getCustom5

public java.lang.String getCustom5()
Returns:
the custom5

setCustom5

public void setCustom5(java.lang.String custom5)
Parameters:
custom5 - the custom5 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

getCustomerId

public int getCustomerId()
Returns:
the customerId

setCustomerId

public void setCustomerId(int customerId)
Parameters:
customerId - the customerId to set


Copyright © 2011 DS Data Systems UK Ltd.