|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vordel.es.Field
public class Field
A Field is a typed component part of an Entity, containing zero, one or more
values.
An Entity typically contains several Fields. A Field's type is defined by a
corresponding FieldType, which is owned by the Entity's EntityType. A Field
is uniquely identified in an Entity by its name. A Field's values'
cardinality is defined in the EntityType.
Field Summary | |
---|---|
protected java.util.List<Value> |
vals
The Values in the field |
Constructor Summary | |
---|---|
Field(Field field)
Convenience constructor to create a duplicate field. |
|
Field(FieldType type,
java.lang.String name)
Constructor for a field with no values. |
|
Field(FieldType type,
java.lang.String name,
Value[] values)
Constructor for a field with new values. |
Method Summary | |
---|---|
void |
addValue(Value v)
Add a new value to the Field. |
Field |
clone()
|
int |
compareTo(Field other)
|
boolean |
containsReference(ESPK refPK)
Check this Field to see if it contains a reference to the specified Entity. |
static java.lang.String |
describe(Field[] fvals)
Convenience method to describe fields |
boolean |
equals(java.lang.Object other)
Determine if this field is equal to the other specified field. |
java.lang.String |
getName()
Get the name of this field |
ESPK |
getReference()
Return the reference value for the field if it's a reference type field. |
java.util.Collection<ESPK> |
getRefs()
Assume values are references, and fetch as an array. |
FieldType |
getType()
Get the type of this field |
java.util.List<Value> |
getValueList()
Get a copy of this Field's Values List |
Value[] |
getValues()
Get the values for this field as an array |
boolean |
hasValue()
Determine if this field has any values set. |
boolean |
isRefType()
Is field a Reference Type |
void |
populateNonNullSoftRefs(java.util.Set<com.vordel.es.xes.PortableESPK> set)
|
void |
setReferenceValue(int index,
ESPK targetPK)
|
boolean |
setValues(java.util.List<Value> values)
Set the values for this Field. |
void |
setValues(Value[] values)
Set all the values in the Field |
java.lang.String |
toString()
A user-friendly string description of this Field. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.List<Value> vals
Constructor Detail |
---|
public Field(FieldType type, java.lang.String name)
type
- The type of the Field.name
- The name of the field, uniquely identifying it in a
given Entity.public Field(FieldType type, java.lang.String name, Value[] values) throws EntityStoreException
name
- values
-
EntityStoreException
public Field(Field field) throws EntityStoreException
field
-
EntityStoreException
Method Detail |
---|
public Field clone()
clone
in class java.lang.Object
public void addValue(Value v) throws EntityStoreException
v
- The new Value to add to the Field.
An
- EntityStoreException if the Value contravenes the cardinality
constraints for this Field.
EntityStoreException
public void setValues(Value[] values) throws EntityStoreException
values
-
EntityStoreException
public boolean setValues(java.util.List<Value> values) throws EntityStoreException
values
- A List of Values to be set. Cardinality constraints will
be applied to the list.
EntityStoreException
- If the values contravene the cardinality
constraints.public Value[] getValues()
public java.util.List<Value> getValueList()
public java.lang.String getName()
public FieldType getType()
public boolean isRefType()
public static final java.lang.String describe(Field[] fvals)
fvals
- An array of Fields.
public java.util.Collection<ESPK> getRefs()
public boolean containsReference(ESPK refPK)
refPK
- The referenced Entity's ESPK
java.lang.IllegalArgumentException
- if the Field isn't of a reference type
or the supplied ESPK is null.public ESPK getReference()
java.lang.IllegalArgumentException
- if the field is not a reference type
or the cardinality of the field is greater than one.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean hasValue()
public int compareTo(Field other)
compareTo
in interface java.lang.Comparable<Field>
public void populateNonNullSoftRefs(java.util.Set<com.vordel.es.xes.PortableESPK> set)
public void setReferenceValue(int index, ESPK targetPK)
|
Vordel SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |