|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vordel.es.FieldType
public class FieldType
A FieldType defines the type of a specific Field for a given EntityType.
Fields can be one of several primitive types, or a reference type which is
further specified by the EntityType of the Entity to which it refers. For
example, a Field of FieldType '@Book' is a field which stores an ESPK
referencing an Entity of type 'Book'.
The FieldType will also define the cardinality of a field's values, which can be:
Field Summary | |
---|---|
static java.lang.String |
BINARY
Base64 Encoded bytes |
static java.lang.String |
BOOLEAN
Primitive Type Boolean. |
protected java.util.List<Value> |
defaultValues
|
static java.lang.String |
ENCRYPTED
New type for VS 4.1 Semantically, the encrypted type is the same as the binary type, i.e. |
static java.lang.String |
INTEGER
Interpreted as a Java 'int' primitive type. |
static java.lang.String |
LONG
Interpreted as a Java 'long' primitive type. |
static java.lang.Integer |
ONE
Constant declaration of cardinality 1 as an object. |
static char |
REF_DELIMITER
Indicator that this field's values refer to another Entity via an ESPK |
protected java.lang.String |
reftype
|
static char |
SOFT_REF_DELIMITER
Indicator that this Field's values refer to another Entity in another EntityStore, and must be resolved via a portable key. |
static java.lang.String |
STRING
Java String. |
protected java.lang.String |
type
The type name: primitive string or "@EntityTypeName" |
static java.lang.String |
UTCTIME
Don't use - use 'long' instead. |
Constructor Summary | |
---|---|
protected |
FieldType(java.lang.String type,
java.lang.Object cardinality,
java.util.List<Value> defaultValues)
Create a field type definition. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
|
java.lang.Object |
getCardinality()
Get the cardinality of this FieldType definition. |
java.lang.String |
getDefault()
Get the default value for the Field. |
java.util.List<java.lang.String> |
getDefaults()
Get the default values for the Field. |
java.util.List<Value> |
getDefaultValues()
Get the actual default 'Value' object. |
int |
getMaxValueCount()
Get the maximum number of permitted values for this field |
int |
getMinValueCount()
Get the minimum number of permitted values for this field |
java.lang.String |
getRefType()
If this is a reference type, get the name of the EntityType which this FieldType references. |
java.lang.String |
getType()
Get the primitive type of this field or the reference type if it's an ESPK reference-type field, as it appears in the XML definition. |
boolean |
isNumeric()
|
boolean |
isRefType()
Determine if this type represents a reference type(for ESPKs) |
boolean |
isSoftRefType()
Determine if this type represents a soft reference to an Entity via a portable ESPK |
static boolean |
isValidPrimitiveType(java.lang.String type)
Convenience method to decide if the primitive type is supported by the framework. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BOOLEAN
public static final java.lang.String STRING
public static final java.lang.String INTEGER
public static final java.lang.String LONG
public static final java.lang.String UTCTIME
public static final java.lang.String BINARY
public static final java.lang.String ENCRYPTED
public static final java.lang.Integer ONE
public static final char REF_DELIMITER
public static final char SOFT_REF_DELIMITER
protected java.lang.String type
protected java.util.List<Value> defaultValues
protected java.lang.String reftype
Constructor Detail |
---|
protected FieldType(java.lang.String type, java.lang.Object cardinality, java.util.List<Value> defaultValues) throws java.lang.IllegalArgumentException
type
- The type of the fieldcardinality
- The number of values allowed for this fielddefaultValues
- A list of default values for the field
java.lang.IllegalArgumentException
- If the type defined is not one of the
primitive typesMethod Detail |
---|
public static boolean isValidPrimitiveType(java.lang.String type)
public boolean isNumeric()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String getType()
public java.lang.String getRefType()
public java.lang.Object getCardinality()
public java.lang.String getDefault()
public java.util.List<java.lang.String> getDefaults()
public java.util.List<Value> getDefaultValues()
public boolean isRefType()
public boolean isSoftRefType()
public int getMaxValueCount()
public int getMinValueCount()
|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |