public class CustomerTag extends java.lang.Object implements CustomerTagIf
Modifier and Type | Field and Description |
---|---|
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 ) |
static int |
DATE_TYPE
The string in the Value attribute represents a Date.
|
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
|
static int |
INT_TYPE
The string in the Value attribute is an int
|
static int |
MULTI_INT_PLUS_TIME_TYPE
The string in the Value attribute consists of multiple integer plus timestamp pairs separated
by a delimiter.
|
static int |
MULTI_INT_TYPE
The string in the Value attribute consists of multiple integers separated by a delimiter.
|
static int |
STRING_TYPE
The string in the Value attribute is a String
|
Constructor and Description |
---|
CustomerTag()
Constructor
|
CustomerTag(com.workingdogs.village.Record vr,
KKCriteria c)
Instantiates the attributes of the Tag object from a Record object
|
Modifier and Type | Method and Description |
---|---|
void |
addTimestamps()
Add timestamps to the customer tag value
|
java.lang.String |
getCustom1() |
java.lang.String |
getCustom2() |
java.lang.String |
getCustom3() |
java.lang.String |
getCustom4() |
java.lang.String |
getCustom5() |
int |
getCustomerId() |
java.util.Calendar |
getDateAdded()
The last time the value of the tag (for a customer) was modified
|
java.lang.String |
getDescription()
Description used in expression builder.
|
int |
getId() |
int |
getMaxInts()
When the tag value is of type
MULTI_INT_TYPE or
MULTI_INT_PLUS_TIME_TYPE , this attribute specifies the maximum number of
integers allowed. |
java.lang.String |
getName()
The tag name, normally in caps.
|
int |
getType()
The type of tag.
|
java.lang.String |
getValidation()
A regular expression validation string used when a new tag is inserted.
|
java.lang.String |
getValue()
The value of the tag for a customer.
|
java.math.BigDecimal |
getValueAsBigDecimal()
Utility method to return a BigDecimal.
|
boolean |
getValueAsBoolean()
Utility method to return a boolean.
|
java.util.Date |
getValueAsDate()
Utility method to return a Date.
|
int |
getValueAsInt()
Utility method to return an int.
|
IntAndTimePair[] |
getValueAsIntAndTimeArray()
Utility method to return an array of integer and timestamp pairs.
|
int[] |
getValueAsIntArray()
Utility method to return an array of integers.
|
java.lang.String |
getValueAsString()
Utility method to return a String.
|
int |
getWeighting() |
boolean |
isSetByApi()
When true the tag value can be set using the application (KKengIf) APIs
|
boolean |
isUsedInExpressions()
When true, the tag is added to the drop list of available tags in the Admin App expression
builder
|
boolean |
isValueExists() |
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.Calendar dateAdded)
The last time the value of the tag (for a customer) was modified
|
void |
setDescription(java.lang.String description)
Description used in expression builder.
|
void |
setId(int id) |
void |
setMaxInts(int maxInts)
When the tag value is of type
MULTI_INT_TYPE or
MULTI_INT_PLUS_TIME_TYPE , this attribute specifies the maximum number of
integers allowed. |
void |
setName(java.lang.String name)
The tag name, normally in caps.
|
void |
setSetByApi(boolean setByApi)
When true the tag value can be set using the application (KKengIf) APIs
|
void |
setType(int type)
The type of tag.
|
void |
setUsedInExpressions(boolean usedInExpressions)
When true, the tag is added to the drop list of available tags in the Admin App expression
builder
|
void |
setValidation(java.lang.String validation)
A regular expression validation string used when a new tag is inserted.
|
void |
setValue(java.lang.String value)
The value of the tag for a customer.
|
void |
setValueAsBigDecimal(java.math.BigDecimal value)
Utility method to set the tag value as a BigDecimal.
|
void |
setValueAsBoolean(boolean value)
Utility method to set the tag value as a boolean.
|
void |
setValueAsDate(java.util.Date value)
Utility method to set the tag value as a Date.
|
void |
setValueAsInt(int value)
Utility method to set the tag value as an int.
|
void |
setValueAsIntAndTimeArray(IntAndTimePair[] value)
Utility method to set the tag value as an array of int and time pairs.
|
void |
setValueAsIntArray(int[] value)
Utility method to set the tag value as an array of ints.
|
void |
setValueAsString(java.lang.String value)
Utility method to set the tag value as a String.
|
void |
setValueExists(boolean valueExists) |
void |
setWeighting(int weighting) |
java.lang.String |
toString() |
public static final java.lang.String DELIM
public static final int STRING_TYPE
public static final int INT_TYPE
public static final int MULTI_INT_TYPE
public static final int DECIMAL_TYPE
public static final int DATE_TYPE
public static final int BOOLEAN_TYPE
true
or false
)public static final int AGE_TYPE
public static final int MULTI_INT_PLUS_TIME_TYPE
public CustomerTag()
public CustomerTag(com.workingdogs.village.Record vr, KKCriteria c) throws com.workingdogs.village.DataSetException
vr
- Record containing datac
- Criteria containing column namescom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.lang.String toString()
toString
in class java.lang.Object
public int getValueAsInt() throws com.konakart.app.KKException
KKException
- an unexpected KKException exceptionpublic int[] getValueAsIntArray()
MULTI_INT_TYPE
or
MULTI_INT_PLUS_TIME_TYPE
tag types.public IntAndTimePair[] getValueAsIntAndTimeArray() throws com.konakart.app.KKException
KKException
- if the conversion fails - usually due to an unexpected formatpublic java.util.Date getValueAsDate() throws com.konakart.app.KKException, java.text.ParseException
KKException
- an unexpected KKException exceptionjava.text.ParseException
- an unexpected ParseException exceptionpublic java.lang.String getValueAsString()
public java.math.BigDecimal getValueAsBigDecimal()
public boolean getValueAsBoolean() throws com.konakart.app.KKException
KKException
- an unexpected KKException exceptionpublic void addTimestamps()
public void setValueAsInt(int value)
value
- the valuepublic void setValueAsIntArray(int[] value)
value
- the valuepublic void setValueAsIntAndTimeArray(IntAndTimePair[] value)
value
- the valuepublic void setValueAsDate(java.util.Date value)
value
- the valuepublic void setValueAsBoolean(boolean value)
value
- the valuepublic void setValueAsString(java.lang.String value)
value
- the valuepublic void setValueAsBigDecimal(java.math.BigDecimal value)
value
- the valuepublic int getId()
getId
in interface CustomerTagIf
public void setId(int id)
setId
in interface CustomerTagIf
id
- the id to setpublic java.lang.String getName()
CustomerTagIf
getName
in interface CustomerTagIf
public void setName(java.lang.String name)
CustomerTagIf
setName
in interface CustomerTagIf
name
- the name to setpublic java.lang.String getDescription()
CustomerTagIf
getDescription
in interface CustomerTagIf
public void setDescription(java.lang.String description)
CustomerTagIf
setDescription
in interface CustomerTagIf
description
- the description to setpublic java.lang.String getValue()
CustomerTagIf
getValue
in interface CustomerTagIf
public void setValue(java.lang.String value)
CustomerTagIf
setValue
in interface CustomerTagIf
value
- the value to setpublic java.lang.String getValidation()
CustomerTagIf
getValidation
in interface CustomerTagIf
public void setValidation(java.lang.String validation)
CustomerTagIf
setValidation
in interface CustomerTagIf
validation
- the validation to setpublic int getType()
CustomerTagIf
STRING_TYPE
=0: The tag value is a StringINT_TYPE
=1: The tag value is an integerMULTI_INT_TYPE
=2: The tag value contains one or more integers separated by a
delimiter. The maxInts
attributes determines how many integers are allowed.DECIMAL_TYPE
=3: The tag value is a decimal.DATE_TYPE
=4: The tag value is a date.BOOLEAN_TYPE
=5: The tag value is a boolean and so must contain the string
true
or false
AGE_TYPE
=6: 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.MULTI_INT_PLUS_TIME_TYPE
=7: The tag value contains one or more integer and
timestamp pairs separated by a delimiter. The maxInts
attributes determines how
many integers are allowed. The integer and timestamp are separated by a space character. The
timestamp is the number of milliseconds since 1st January 1970 (Epoch time)getType
in interface CustomerTagIf
public void setType(int type)
CustomerTagIf
STRING_TYPE
=0: The tag value is a StringINT_TYPE
=1: The tag value is an integerMULTI_INT_TYPE
=2: The tag value contains one or more integers separated by a
delimiter. The maxInts
attributes determines how many integers are allowed.DECIMAL_TYPE
=3: The tag value is a decimal.DATE_TYPE
=4: The tag value is a date.BOOLEAN_TYPE
=5: The tag value is a boolean and so must contain the string
true
or false
AGE_TYPE
=6: 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.MULTI_INT_PLUS_TIME_TYPE
=7: The tag value contains one or more integer and
timestamp pairs separated by a delimiter. The maxInts
attributes determines how
many integers are allowed. The integer and timestamp are separated by a space character. The
timestamp is the number of milliseconds since 1st January 1970 (Epoch time)setType
in interface CustomerTagIf
type
- the type to setpublic int getMaxInts()
CustomerTagIf
MULTI_INT_TYPE
or
MULTI_INT_PLUS_TIME_TYPE
, this attribute specifies the maximum number of
integers allowed.getMaxInts
in interface CustomerTagIf
public void setMaxInts(int maxInts)
CustomerTagIf
MULTI_INT_TYPE
or
MULTI_INT_PLUS_TIME_TYPE
, this attribute specifies the maximum number of
integers allowed.setMaxInts
in interface CustomerTagIf
maxInts
- the maxInts to setpublic java.lang.String getCustom1()
getCustom1
in interface CustomerTagIf
public void setCustom1(java.lang.String custom1)
setCustom1
in interface CustomerTagIf
custom1
- the custom1 to setpublic java.lang.String getCustom2()
getCustom2
in interface CustomerTagIf
public void setCustom2(java.lang.String custom2)
setCustom2
in interface CustomerTagIf
custom2
- the custom2 to setpublic java.lang.String getCustom3()
getCustom3
in interface CustomerTagIf
public void setCustom3(java.lang.String custom3)
setCustom3
in interface CustomerTagIf
custom3
- the custom3 to setpublic java.lang.String getCustom4()
getCustom4
in interface CustomerTagIf
public void setCustom4(java.lang.String custom4)
setCustom4
in interface CustomerTagIf
custom4
- the custom4 to setpublic java.lang.String getCustom5()
getCustom5
in interface CustomerTagIf
public void setCustom5(java.lang.String custom5)
setCustom5
in interface CustomerTagIf
custom5
- the custom5 to setpublic int getCustomerId()
getCustomerId
in interface CustomerTagIf
public void setCustomerId(int customerId)
setCustomerId
in interface CustomerTagIf
customerId
- the customerId to setpublic boolean isValueExists()
isValueExists
in interface CustomerTagIf
public void setValueExists(boolean valueExists)
setValueExists
in interface CustomerTagIf
valueExists
- the valueExists to setpublic java.util.Calendar getDateAdded()
CustomerTagIf
getDateAdded
in interface CustomerTagIf
public void setDateAdded(java.util.Calendar dateAdded)
CustomerTagIf
setDateAdded
in interface CustomerTagIf
dateAdded
- the dateAdded to setpublic boolean isSetByApi()
CustomerTagIf
isSetByApi
in interface CustomerTagIf
public void setSetByApi(boolean setByApi)
CustomerTagIf
setSetByApi
in interface CustomerTagIf
setByApi
- the setByApi to setpublic int getWeighting()
getWeighting
in interface CustomerTagIf
public void setWeighting(int weighting)
setWeighting
in interface CustomerTagIf
weighting
- the weighting to setpublic boolean isUsedInExpressions()
isUsedInExpressions
in interface CustomerTagIf
public void setUsedInExpressions(boolean usedInExpressions)
setUsedInExpressions
in interface CustomerTagIf
usedInExpressions
- the usedInExpressions to setCopyright © 2018 DS Data Systems UK Ltd.