public enum AttributeDefValidationDef extends Enum<AttributeDefValidationDef> implements AttributeDefValidationInterface
Enum Constant and Description |
---|
dateTimeMask
formatting of dateTime, the mask.
|
dontTrim
dont trim the value before saving.
|
exactLength
length in chars must be a certain value, not less not more
|
maxLength
length in chars cannot be more than this amount
|
minLength
length in chars must be at least this amount
|
regex
validate based on regex
|
required
if the value is required when the attribute is assigned
|
stringCapitalizeWords
capitalize words so each is lower and starts with upper
|
stringToLower
make the string to lower
|
stringToUpper
make the string caps
|
Modifier and Type | Method and Description |
---|---|
static int |
argumentInt(AttributeDefValidationInterface attributeDefValidationInterface,
String argument,
int argumentIndex)
make sure this argument is an int
|
static void |
argumentNone(AttributeDefValidationInterface attributeDefValidationInterface,
String argument0,
String argument1)
make sure there are no argument
|
static void |
argumentOne(AttributeDefValidationInterface attributeDefValidationInterface,
String argument0,
String argument1)
make sure there is one argument
|
static int |
argumentOneInt(AttributeDefValidationInterface attributeDefValidationInterface,
String argument0,
String argument1)
should have 1 argument, as int
|
static String |
argumentOneString(AttributeDefValidationInterface attributeDefValidationInterface,
String argument0,
String argument1)
should have 1 argument, as string
|
String |
formatFromDb(Object input,
String argument0,
String argument1)
format an input
|
Object |
formatToDb(Object input,
String argument0,
String argument1)
format an input
|
static int |
length(Object object) |
String |
validate(Object input,
String argument0,
String argument1)
validate that an object is not null
|
static AttributeDefValidationDef |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AttributeDefValidationDef[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
name
public static final AttributeDefValidationDef exactLength
public static final AttributeDefValidationDef minLength
public static final AttributeDefValidationDef maxLength
public static final AttributeDefValidationDef regex
public static final AttributeDefValidationDef required
public static final AttributeDefValidationDef dateTimeMask
public static final AttributeDefValidationDef dontTrim
public static final AttributeDefValidationDef stringToUpper
public static final AttributeDefValidationDef stringToLower
public static final AttributeDefValidationDef stringCapitalizeWords
public static AttributeDefValidationDef[] values()
for (AttributeDefValidationDef c : AttributeDefValidationDef.values()) System.out.println(c);
public static AttributeDefValidationDef valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String formatFromDb(Object input, String argument0, String argument1)
AttributeDefValidationInterface
formatFromDb
in interface AttributeDefValidationInterface
input
- could be integer, string, double, or memberIdformatFromDb(Object, String, String)
public Object formatToDb(Object input, String argument0, String argument1)
AttributeDefValidationInterface
formatToDb
in interface AttributeDefValidationInterface
AttributeDefValidationDef#formatToDb(String, String, String)
public String validate(Object input, String argument0, String argument1)
AttributeDefValidationInterface
validate
in interface AttributeDefValidationInterface
validate(Object, String, String)
public static int argumentOneInt(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1)
argument0
- argument1
- public static String argumentOneString(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1)
argument0
- argument1
- public static int argumentInt(AttributeDefValidationInterface attributeDefValidationInterface, String argument, int argumentIndex)
attributeDefValidationInterface
- argument
- argumentIndex
- public static void argumentOne(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1)
public static void argumentNone(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1)
public static int length(Object object)
object
- Copyright © 2016 Internet2. All rights reserved.